Index: trunk/LMDZ.MARS/libf/phymars/rocketduststorm_mod.F90
===================================================================
--- trunk/LMDZ.MARS/libf/phymars/rocketduststorm_mod.F90	(revision 2112)
+++ trunk/LMDZ.MARS/libf/phymars/rocketduststorm_mod.F90	(revision 2119)
@@ -569,11 +569,12 @@
        wq(nlay+1)=0.
 
-!      1) Compute wq where w < 0 (up) (NOT USEFUL FOR SEDIMENTATION)     
+!      Surface flux up:
+       if(w(1).lt.0.) wq(1)=0. ! warning : not always valid
+
+       do l = 1,nlay-1  ! loop different than when w>0
+
+!      1) Compute wq where w < 0 (up)
 !      ===============================
 
-!      Surface flux up:
-         if(w(1).lt.0.) wq(1)=0. ! warning : not always valid
-
-       do l = 1,nlay-1  ! loop different than when w>0
          if(w(l+1).le.0)then
 
@@ -607,28 +608,10 @@
                 wq(l+1) = -MQtot 
              end if
-
-             if ( masse(l)*q(l) .lt. -(wq(l+1)-wq(l)) ) then  ! particular case when the vertical velocity is very strong in the layer and null below (wq(l)=0)
-               wq(l+1) = wq(l)-masse(l)*q(l)
-             end if
-
-          endif
-         endif  ! w<0 (up)
-       enddo
-
-       do l = 1,nlay-1  ! loop different than when w>0
-
-          q(l)=q(l) +  (wq(l+1)-wq(l))/masse(l)
-
-       enddo
+          endif ! (-w(l+1).le.masse(l))
      
-!      2) Compute wq where w > 0 (down) (ALWAYS FOR SEDIMENTATION)     
+!      2) Compute wq where w > 0 (down)    
 !      ===============================
 
-!      Initialisation wq = 0 to consider now only downward flux
-         wq(:)=0. ! 
-
-       do l = 1,nlay          ! loop different than when w<0
-
-         if(w(l).gt.0.)then
+         else if(w(l).gt.0.)then
 
 !         Regular scheme (transfered mass < 1 layer)
@@ -637,5 +620,4 @@
             sigw=w(l)/masse(l)
             wq(l)=w(l)*(q(l)+0.5*(1.-sigw)*dzq(l))
-!            write(*,*),'TB14 wq after up',wq(1,:)
             
 
@@ -662,14 +644,16 @@
                 wq(l) = MQtot 
             end if
-
-             if ( masse(l)*q(l) .lt. -(wq(l+1)-wq(l)) ) then  ! particular case when the vertical velocity is very strong in the layer and null above (wq(l+1)=0)
-               wq(l) = wq(l+1)+masse(l)*q(l)
-             end if
-
           end if
-         end if ! w>0 (down)
-       enddo
+
+         end if ! w<0 (up)
+
+       enddo ! l = 1,nlay-1
        
        do l = 1,nlay          ! loop different than when w<0
+
+!         it cannot entrain more than available mass !
+          if ( (wq(l+1)-wq(l)) .lt. -(masse(l)*q(l)) ) then
+            wq(l+1) = wq(l)-masse(l)*q(l)
+          end if
 
           q(l)=q(l) +  (wq(l+1)-wq(l))/masse(l)
Index: trunk/LMDZ.MARS/libf/phymars/vlz_fi.F
===================================================================
--- trunk/LMDZ.MARS/libf/phymars/vlz_fi.F	(revision 2112)
+++ trunk/LMDZ.MARS/libf/phymars/vlz_fi.F	(revision 2119)
@@ -123,9 +123,4 @@
             end if
 
-c            it cannot entrain more than available mass !
-             if ( masse(ij,l)*q(ij,l) .lt. -(wq(ij,l+1)-wq(ij,l)) ) then
-               wq(ij,l) = wq(ij,l+1)+masse(ij,l)*q(ij,l)
-             end if
-
           end if
          end if
@@ -176,9 +171,4 @@
              end if
 
-c            it cannot entrain more than available mass !
-             if ( masse(ij,l)*q(ij,l) .lt. -(wq(ij,l+1)-wq(ij,l)) ) then
-               wq(ij,l+1) = wq(ij,l)-masse(ij,l)*q(ij,l)
-             end if
-
           endif
          endif
@@ -196,4 +186,9 @@
 ccccc       masse(ij,l)=newmasse
 
+c            it cannot entrain more than available mass !
+            if ( (wq(ij,l+1)-wq(ij,l)) .lt. -(masse(ij,l)*q(ij,l)) ) then
+              wq(ij,l+1) = wq(ij,l)-masse(ij,l)*q(ij,l)
+            end if
+
             q(ij,l)=q(ij,l) +  (wq(ij,l+1)-wq(ij,l))/masse(ij,l)
 
