Index: /LMDZ5/trunk/libf/phylmd/thermcell_plume.F90
===================================================================
--- /LMDZ5/trunk/libf/phylmd/thermcell_plume.F90	(revision 1502)
+++ /LMDZ5/trunk/libf/phylmd/thermcell_plume.F90	(revision 1503)
@@ -37,4 +37,5 @@
       INTEGER lalim(ngrid)
       integer lev_out                           ! niveau pour les print
+      integer nbpb
       real zcon2(ngrid)
     
@@ -153,5 +154,5 @@
                alim_star(ig,l)=MAX((ztv(ig,l)-ztv(ig,l+1)),0.)  &
      &                       *sqrt(zlev(ig,l+1)) 
-               lalim(:)=l+1
+               lalim(ig)=l+1
                alim_star_tot(ig)=alim_star_tot(ig)+alim_star(ig,l)
             endif
@@ -343,5 +344,4 @@
    do ig=1,ngrid
       if (activetmp(ig)) then
-        if (prt_level.ge.20) print*,'coucou calcul detr 4512: ig, l', ig, l
 ! on ecrit de maniere conservative (sat ou non)
 !          T = Tl +Lv/Cp ql
@@ -370,16 +370,14 @@
            zeps=(entr_star(ig,l)+alim_star(ig,l))/(f_star(ig,l)*zdz)
 
-if (1==0) then
-           zw2modif=zw2(ig,l)*(1-fact_epsilon/(1.+fact_gamma)*2.*zdz)
-           zdw2=2.*zbuoy/(1.+fact_gamma)*zdz
-           zw2(ig,l+1)=zw2modif+zdw2
-else
+!if (1==0) then
+!           zw2modif=zw2(ig,l)*(1-fact_epsilon/(1.+fact_gamma)*2.*zdz)
+!           zdw2=2.*zbuoy/(1.+fact_gamma)*zdz
+!           zw2(ig,l+1)=zw2modif+zdw2
+!else
            zdrag=fact_epsilon/(zalpha**expa)
            zw2fact=zbuoy/zdrag*a1
            zw2(ig,l+1)=(zw2(ig,l)-zw2fact)*exp(-2.*zdrag/(1+fact_gamma)*zdz) &
       &    +zw2fact
-
-
-endif
+!endif
 
       endif
@@ -392,8 +390,10 @@
 !---------------------------------------------------------------------------
 
+   nbpb=0
    do ig=1,ngrid
             if (zw2(ig,l+1)>0. .and. zw2(ig,l+1).lt.1.e-10) then
 !               stop'On tombe sur le cas particulier de thermcell_dry'
-                print*,'On tombe sur le cas particulier de thermcell_plume'
+!               print*,'On tombe sur le cas particulier de thermcell_plume'
+                nbpb=nbpb+1
                 zw2(ig,l+1)=0.
                 linter(ig)=l+1
@@ -418,4 +418,8 @@
         endif
    enddo
+
+   if (nbpb>0) then
+   print*,'WARNING on tombe ',nbpb,' x sur un pb pour l=',l,' dans thermcell_plume'
+   endif
 
 !=========================================================================
@@ -484,4 +488,5 @@
       INTEGER lalim(ngrid)
       integer lev_out                           ! niveau pour les print
+      integer nbpb
     
       real alim_star_tot(ngrid)
@@ -760,5 +765,4 @@
    do ig=1,ngrid
       if (activetmp(ig)) then
-        if (prt_level.ge.20) print*,'coucou calcul detr 4512: ig, l', ig, l
 ! on ecrit de maniere conservative (sat ou non)
 !          T = Tl +Lv/Cp ql
@@ -786,8 +790,10 @@
 !---------------------------------------------------------------------------
 
+   nbpb=0
    do ig=1,ngrid
             if (zw2(ig,l+1)>0. .and. zw2(ig,l+1).lt.1.e-10) then
 !               stop'On tombe sur le cas particulier de thermcell_dry'
-                print*,'On tombe sur le cas particulier de thermcell_plume'
+!               print*,'On tombe sur le cas particulier de thermcell_plume'
+                nbpb=nbpb+1
                 zw2(ig,l+1)=0.
                 linter(ig)=l+1
@@ -813,4 +819,8 @@
    enddo
 
+   if (nbpb>0) then
+   print*,'WARNING on tombe ',nbpb,' x sur un pb pour l=',l,' dans thermcell_plume'
+   endif
+
 !=========================================================================
 ! FIN DE LA BOUCLE VERTICALE
