Index: /trunk/LMDZ.GENERIC/README
===================================================================
--- /trunk/LMDZ.GENERIC/README	(revision 2092)
+++ /trunk/LMDZ.GENERIC/README	(revision 2093)
@@ -1448,2 +1448,3 @@
 - uncomment two "corrections" in thermcell_flux. They are used only if iflag_thermals_optflux is set to 0
 - remove useless parameter fact_shell in thermcell_mod
+- now take d_temp into acocunt in thermcell_plume to trigger the plume and compute first unstable layer speed.
Index: /trunk/LMDZ.GENERIC/libf/phystd/thermcell_alim.F90
===================================================================
--- /trunk/LMDZ.GENERIC/libf/phystd/thermcell_alim.F90	(revision 2092)
+++ /trunk/LMDZ.GENERIC/libf/phystd/thermcell_alim.F90	(revision 2093)
@@ -2,5 +2,5 @@
 !
 !
-      SUBROUTINE thermcell_alim(ngrid,klev,ztv,zlev,alim_star,lalim,lmin)
+      SUBROUTINE thermcell_alim(ngrid,klev,ztv2,zlev,alim_star,lalim,lmin)
       
       
@@ -27,6 +27,5 @@
       INTEGER, INTENT(IN) :: lmin(ngrid)        ! plume initial level
       
-      REAL, INTENT(IN) :: ztv(ngrid,klev)       ! Large scale virtual potential temperature
-! Virtual potential temperature offset in linf layer
+      REAL, INTENT(IN) :: ztv2(ngrid,klev)      ! Virtual potential temperature
       REAL, INTENT(IN) :: zlev(ngrid,klev+1)    ! levels altitude
       
@@ -44,5 +43,4 @@
       
       REAL :: alim_star_tot(ngrid)              ! integrated alimentation
-      REAL :: ztv2(ngrid,klev)                  ! ztv + d_temp
       
 !==============================================================================
@@ -53,7 +51,4 @@
       
       alim_star_tot(:) = 0.
-      
-      ztv2(:,:) = ztv(:,:)
-      ztv2(:,linf) = ztv2(:,linf) + d_temp
       
 !==============================================================================
Index: /trunk/LMDZ.GENERIC/libf/phystd/thermcell_plume.F90
===================================================================
--- /trunk/LMDZ.GENERIC/libf/phystd/thermcell_plume.F90	(revision 2092)
+++ /trunk/LMDZ.GENERIC/libf/phystd/thermcell_plume.F90	(revision 2093)
@@ -96,4 +96,5 @@
       REAL zqsat(ngrid)                         ! saturation vapor pressure (before mixing)
       REAL zdz                                  ! layers height
+      REAL ztv2(ngrid,klev)                     ! ztv + d_temp * Dirac(l=lmin)
       
       REAL zalpha                               !
@@ -159,4 +160,7 @@
       lmin(:)          = linf
       
+      ztv2(:,:)        = ztv(:,:)
+      ztv2(:,linf)     = ztv2(:,linf) + d_temp
+      
 !==============================================================================
 ! 0. Calcul de l'alimentation
@@ -175,5 +179,5 @@
          l = linf
          DO WHILE ((.not.active(ig)) .and. pplev(ig,l+1).gt.pres_limit .and. l.lt.klev)
-            IF (ztv(ig,l).gt.ztv(ig,l+1)) THEN
+            IF (ztv2(ig,l).gt.ztv2(ig,l+1)) THEN
                active(ig) = .true.
                lmin(ig) = l
@@ -186,5 +190,5 @@
 ! AB : On pourrait n'appeler thermcell_alim que si la plume est active
 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-      CALL thermcell_alim(ngrid,klev,ztv,zlev,alim_star,lalim,lmin)
+      CALL thermcell_alim(ngrid,klev,ztv2,zlev,alim_star,lalim,lmin)
       
 !==============================================================================
@@ -208,8 +212,7 @@
             
             zw2(ig,l+1) = 2. * RG * (zlev(ig,l+1) - zlev(ig,l))               &
-            &                * (ztv(ig,l) - ztv(ig,l+1)) / ztv(ig,l+1)
+            &                * (ztv2(ig,l) - ztv2(ig,l+1)) / ztv2(ig,l+1)
             
             w_est(ig,l+1) = zw2(ig,l+1)
-            
          ENDIF
       ENDDO
@@ -488,15 +491,4 @@
       ENDDO
       
-#undef wrgrads_thermcell
-#ifdef wrgrads_thermcell
-      call wrgradsfi(1,klev,entr_star(igout,1:klev),'esta    ','esta    ')
-      call wrgradsfi(1,klev,detr_star(igout,1:klev),'dsta    ','dsta    ')
-      call wrgradsfi(1,klev,zbuoy(igout,1:klev)    ,'buoy    ','buoy    ')
-      call wrgradsfi(1,klev,zdqt(igout,1:klev)     ,'dqt     ','dqt     ')
-      call wrgradsfi(1,klev,w_est(igout,1:klev)    ,'w_est   ','w_est   ')
-      call wrgradsfi(1,klev,w_est(igout,2:klev+1)  ,'w_es2   ','w_es2   ')
-      call wrgradsfi(1,klev,zw2(igout,1:klev)      ,'zw2A    ','zw2A    ')
-#endif
-      
       
 RETURN 
