Index: LMDZ6/trunk/libf/phylmd/pbl_surface_mod.F90
===================================================================
--- LMDZ6/trunk/libf/phylmd/pbl_surface_mod.F90	(revision 4687)
+++ LMDZ6/trunk/libf/phylmd/pbl_surface_mod.F90	(revision 4722)
@@ -348,5 +348,5 @@
     REAL, DIMENSION(klon),        INTENT(IN)        :: rugoro  ! rugosity length
     REAL, DIMENSION(klon),        INTENT(IN)        :: rmu0    ! cosine of solar zenith angle
-    REAL, DIMENSION(klon),        INTENT(IN)        :: rain_f  ! rain fall
+    REAL, DIMENSION(klon),        INTENT(INOUT)     :: rain_f  ! rain fall
     REAL, DIMENSION(klon),        INTENT(IN)        :: snow_f  ! snow fall
     REAL, DIMENSION(klon),        INTENT(IN)        :: bs_f  ! blowing snow fall
@@ -1071,5 +1071,5 @@
 !albedo SB <<<
     yrain_f = 0.0 ; ysnow_f = 0.0  ; ybs_f=0.0  ; yfder = 0.0     ; ysolsw = 0.0
-    ysollw = 0.0  ; yz0m = 0.0 ; yz0h = 0.0    ; yu1 = 0.0    
+    ysollw = 0.0  ; yz0m = 0.0 ; yz0h = 0.0    ; yz0h_oupas = 0.0 ; yu1 = 0.0    
     yv1 = 0.0     ; ypaprs = 0.0     ; ypplay = 0.0     ; yqbs1 = 0.0
     ydelp = 0.0   ; yu = 0.0         ; yv = 0.0        ; yt = 0.0         
@@ -1598,7 +1598,7 @@
         ENDDO
         CALL cdrag(knon, nsrf, &
-            speed, yt(:,1), yq(:,1), zgeo1, ypaprs(:,1),&
+            speed, yt(:,1), yq(:,1), zgeo1, ypaprs(:,1), s_pblh, &
             yts, yqsurf, yz0m, yz0h, yri0, 0, &
-            ycdragm, ycdragh, zri1, pref )
+            ycdragm, ycdragh, zri1, pref, rain_f, zxtsol, ypplay(:,1))
 
 ! --- special Dice: on force cdragm ( a defaut de forcer ustar) MPL 05082013
@@ -1632,7 +1632,7 @@
 
             CALL cdrag(knon, nsrf, &
-            speed_x, yt_x(:,1), yq_x(:,1), zgeo1_x, ypaprs(:,1),&
+            speed_x, yt_x(:,1), yq_x(:,1), zgeo1_x, ypaprs(:,1),s_pblh_x,&
             yts_x, yqsurf_x, yz0m, yz0h, yri0, 0, &
-            ycdragm_x, ycdragh_x, zri1_x, pref_x )
+            ycdragm_x, ycdragh_x, zri1_x, pref_x, rain_f, zxtsol, ypplay(:,1) )
 
 ! --- special Dice. JYG+MPL 25112013
@@ -1659,7 +1659,7 @@
         ENDDO
         CALL cdrag(knon, nsrf, &
-            speed_w, yt_w(:,1), yq_w(:,1), zgeo1_w, ypaprs(:,1),&
+            speed_w, yt_w(:,1), yq_w(:,1), zgeo1_w, ypaprs(:,1),s_pblh_w,&
             yts_w, yqsurf_w, yz0m, yz0h, yri0, 0, &
-            ycdragm_w, ycdragh_w, zri1_w, pref_w )
+            ycdragm_w, ycdragh_w, zri1_w, pref_w, rain_f, zxtsol, ypplay(:,1) )
 !
 !!!bug !!        zgeo1(:) = wake_s(:)*zgeo1_w(:) + (1.-wake_s(:))*zgeo1_x(:)
@@ -2086,5 +2086,5 @@
                yu(:,1), yv(:,1), yt(:,1), yq(:,1), zgeo1, &
                yts, yqsurf, yz0m, yz0h, ypaprs(:,1), ypplay(:,1), &
-               yt2m, yq2m, yt10m, yq10m, yu10m, yustar)
+               yt2m, yq2m, yt10m, yq10m, yu10m, yustar, ypblh, rain_f, zxtsol)
           ENDIF
           
@@ -3072,5 +3072,5 @@
        IF (iflag_split .eq.0) THEN
         IF (iflag_new_t2mq2m==1) THEN
-         CALL stdlevvarn(klon, knon, nsrf, zxli, &
+           CALL stdlevvarn(klon, knon, nsrf, zxli, &
             uzon, vmer, tair1, qair1, zgeo1, &
             tairsol, qairsol, yz0m, yz0h_oupas, psfce, patm, &
@@ -3081,5 +3081,5 @@
             uzon, vmer, tair1, qair1, zgeo1, &
             tairsol, qairsol, yz0m, yz0h_oupas, psfce, patm, &
-            yt2m, yq2m, yt10m, yq10m, yu10m, yustar)
+            yt2m, yq2m, yt10m, yq10m, yu10m, yustar, ypblh, rain_f, zxtsol)
         ENDIF
        ELSE  !(iflag_split .eq.0)
@@ -3099,9 +3099,9 @@
             uzon_x, vmer_x, tair1_x, qair1_x, zgeo1_x, &
             tairsol_x, qairsol, yz0m, yz0h_oupas, psfce, patm, &
-            yt2m_x, yq2m_x, yt10m_x, yq10m_x, yu10m_x, yustar_x)
+            yt2m_x, yq2m_x, yt10m_x, yq10m_x, yu10m_x, yustar_x, ypblh_x, rain_f, zxtsol)
         CALL stdlevvar(klon, knon, nsrf, zxli, &
             uzon_w, vmer_w, tair1_w, qair1_w, zgeo1_w, &
             tairsol_w, qairsol, yz0m, yz0h_oupas, psfce, patm, &
-            yt2m_w, yq2m_w, yt10m_w, yq10m_w, yu10m_w, yustar_w)
+            yt2m_w, yq2m_w, yt10m_w, yq10m_w, yu10m_w, yustar_w, ypblh_w, rain_f, zxtsol)
         ENDIF
 !!!
