Index: LMDZ5/trunk/DefLists/field_def_lmdz.xml
===================================================================
--- LMDZ5/trunk/DefLists/field_def_lmdz.xml	(revision 2951)
+++ LMDZ5/trunk/DefLists/field_def_lmdz.xml	(revision 2952)
@@ -475,4 +475,8 @@
         <field id="l_mix_oce"    long_name="PBL mixing length oce"    unit="m" />
         <field id="l_mix_sic"    long_name="PBL mixing length sic"    unit="m" />
+        <field id="treedrg_ter"    long_name="tree drag profile ter "    unit="-" />
+        <field id="treedrg_lic"    long_name="tree drag profile ter "    unit="-" />
+        <field id="treedrg_oce"    long_name="tree drag profile ter "    unit="-" />
+        <field id="treedrg_sic"    long_name="tree drag profile ter "    unit="-" />
         <field id="l_mixmin_ter"    long_name="min PBL mixing length ter"    unit="m" />
         <field id="l_mixmin_lic"    long_name="min PBL mixing length lic"    unit="m" />
Index: LMDZ5/trunk/DefLists/file_def_histday_lmdz.xml
===================================================================
--- LMDZ5/trunk/DefLists/file_def_histday_lmdz.xml	(revision 2951)
+++ LMDZ5/trunk/DefLists/file_def_histday_lmdz.xml	(revision 2952)
@@ -28,4 +28,8 @@
                 <field field_ref="t2m_oce" level="6" />
                 <field field_ref="t2m_sic" level="6" />
+                <field field_ref="treedrg_ter" level="6" />
+                <field field_ref="treedrg_lic" level="6" />
+                <field field_ref="treedrg_oce" level="6" />
+                <field field_ref="treedrg_sic" level="6" />
                 <field field_ref="gusts" level="1" />
                 <field field_ref="wind10m" level="1" />
Index: LMDZ5/trunk/DefLists/file_def_histhf_lmdz.xml
===================================================================
--- LMDZ5/trunk/DefLists/file_def_histhf_lmdz.xml	(revision 2951)
+++ LMDZ5/trunk/DefLists/file_def_histhf_lmdz.xml	(revision 2952)
@@ -16,5 +16,5 @@
                 <field field_ref="contfracATM" level="10" operation="once" />
                 <field field_ref="contfracOR" level="10" />
-                <field field_ref="flat" level="10" />
+                <field field_ref="flat" level="5" />
                 <field field_ref="slp" level="10" />
                 <field field_ref="ptstar" level="10" />
@@ -28,4 +28,8 @@
                 <field field_ref="t2m_oce" level="10" />
                 <field field_ref="t2m_sic" level="10" />
+                <field field_ref="treedrg_ter" level="5" />
+                <field field_ref="treedrg_lic" level="5" />
+                <field field_ref="treedrg_oce" level="5" />
+                <field field_ref="treedrg_sic" level="5" />
                 <field field_ref="gusts" level="10" />
                 <field field_ref="wind10m" level="10" />
@@ -106,5 +110,5 @@
                 <field field_ref="bils_enthalp" level="5" />
                 <field field_ref="bils_latent" level="5" />
-                <field field_ref="sens" level="10" />
+                <field field_ref="sens" level="5" />
                 <field field_ref="sens_x" level="11" />
                 <field field_ref="sens_w" level="11" />
@@ -297,5 +301,5 @@
                 <field field_ref="tpot" level="10" />
                 <field field_ref="tpote" level="10" />
-                <field field_ref="tke" level="10" />
+                <field field_ref="tke" level="5" />
                 <field field_ref="tke_ter" level="10" />
                 <field field_ref="tke_lic" level="10" />
@@ -487,5 +491,5 @@
                 <field field_ref="iwcon" level="10" />
                 <field field_ref="temp" level="10" />
-                <field field_ref="theta" level="10" />
+                <field field_ref="theta" level="5" />
                 <field field_ref="ovap" level="10" />
                 <field field_ref="ovapinit" level="10" />
@@ -493,6 +497,6 @@
                 <field field_ref="ocond" level="10" />
                 <field field_ref="geop" level="10" />
-                <field field_ref="vitu" level="6" />
-                <field field_ref="vitv" level="6" />
+                <field field_ref="vitu" level="5" />
+                <field field_ref="vitv" level="5" />
                 <field field_ref="vitw" level="6" />
                 <field field_ref="pres" level="10" />
@@ -546,6 +550,6 @@
                 <field field_ref="wake_deltaq" level="10" />
                 <field field_ref="wake_omg" level="10" />
-                <field field_ref="wdtrainA" level="4" />
-                <field field_ref="wdtrainM" level="4" />
+                <field field_ref="wdtrainA" level="10" />
+                <field field_ref="wdtrainM" level="10" />
                 <field field_ref="Vprecip" level="10" />
                 <field field_ref="ftd" level="10" />
@@ -587,6 +591,6 @@
                 <field field_ref="dtlw0" level="10" />
                 <field field_ref="dtec" level="10" />
-                <field field_ref="duvdf" level="10" />
-                <field field_ref="dvvdf" level="10" />
+                <field field_ref="duvdf" level="5" />
+                <field field_ref="dvvdf" level="5" />
                 <field field_ref="duoro" level="10" />
                 <field field_ref="dvoro" level="10" />
Index: LMDZ5/trunk/DefLists/file_def_histmth_lmdz.xml
===================================================================
--- LMDZ5/trunk/DefLists/file_def_histmth_lmdz.xml	(revision 2951)
+++ LMDZ5/trunk/DefLists/file_def_histmth_lmdz.xml	(revision 2952)
@@ -48,4 +48,8 @@
                 <field field_ref="t2m_oce" level="10" />
                 <field field_ref="t2m_sic" level="10" />
+                <field field_ref="treedrg_ter" level="10" />
+                <field field_ref="treedrg_lic" level="10" />
+                <field field_ref="treedrg_oce" level="10" />
+                <field field_ref="treedrg_sic" level="10" />
                 <field field_ref="gusts" level="1" />
                 <field field_ref="wind10m" level="1" />
Index: LMDZ5/trunk/libf/phylmd/clesphys.h
===================================================================
--- LMDZ5/trunk/libf/phylmd/clesphys.h	(revision 2951)
+++ LMDZ5/trunk/libf/phylmd/clesphys.h	(revision 2952)
@@ -1,4 +1,2 @@
-
-!
 ! $Id$
 !
@@ -15,4 +13,6 @@
        INTEGER nbapp_rad, iflag_con, nbapp_cv, nbapp_wk, iflag_ener_conserv
        REAL co2_ppm, co2_ppm0, solaire
+!FC
+       REAL Cd_frein
        LOGICAL ok_suntime_rrtm
        REAL(kind=8) RCO2, RCH4, RN2O, RCFC11, RCFC12  
@@ -111,4 +111,6 @@
      &     , qsol0,albsno0,evap0                                        &
      &     , co2_ppm0                                                   &
+!FC
+     &     , Cd_frein                                                   &
      &     , ecrit_LES                                                  &
      &     , ecrit_ins, ecrit_hf, ecrit_day                             &
Index: LMDZ5/trunk/libf/phylmd/coef_diff_turb_mod.F90
===================================================================
--- LMDZ5/trunk/libf/phylmd/coef_diff_turb_mod.F90	(revision 2951)
+++ LMDZ5/trunk/libf/phylmd/coef_diff_turb_mod.F90	(revision 2952)
@@ -14,5 +14,5 @@
   SUBROUTINE coef_diff_turb(dtime, nsrf, knon, ni, &
        ypaprs, ypplay, yu, yv, yq, yt, yts, yqsurf, ycdragm, &
-       ycoefm, ycoefh ,yq2)
+       ycoefm, ycoefh ,yq2, ydrgpro)
  
     USE dimphy
@@ -37,4 +37,7 @@
     REAL, DIMENSION(klon), INTENT(IN)          :: yts, yqsurf
     REAL, DIMENSION(klon), INTENT(IN)          :: ycdragm
+!FC
+    REAL, DIMENSION(klon,klev), INTENT(IN)     :: ydrgpro
+
 
 ! InOutput arguments
@@ -167,5 +170,6 @@
                yzlev,yzlay,yu,yv,yteta, &
                ycdragm,yq2,ykmm,ykmn,ykmq,yustar, &
-               iflag_pbl)
+               iflag_pbl,ydrgpro)
+!FC
        ENDIF
        
Index: LMDZ5/trunk/libf/phylmd/compbl.h
===================================================================
--- LMDZ5/trunk/libf/phylmd/compbl.h	(revision 2951)
+++ LMDZ5/trunk/libf/phylmd/compbl.h	(revision 2952)
@@ -5,6 +5,8 @@
 !!      integer iflag_pbl,iflag_pbl_split
 !!      common/compbl/iflag_pbl,iflag_pbl_split
-      integer iflag_pbl, iflag_pbl_split, iflag_order2_sollw
-      common/compbl/iflag_pbl, iflag_pbl_split, iflag_order2_sollw
+!!FC      integer iflag_pbl, iflag_pbl_split, iflag_order2_sollw
+!FC      common/compbl/iflag_pbl, iflag_pbl_split, iflag_order2_sollw
+      integer iflag_pbl, iflag_pbl_split, iflag_order2_sollw, ifl_pbltree
+      common/compbl/iflag_pbl, iflag_pbl_split, iflag_order2_sollw, ifl_pbltree
 !>jyg+al1
 !$OMP THREADPRIVATE(/compbl/)
Index: LMDZ5/trunk/libf/phylmd/conf_phys_m.F90
===================================================================
--- LMDZ5/trunk/libf/phylmd/conf_phys_m.F90	(revision 2951)
+++ LMDZ5/trunk/libf/phylmd/conf_phys_m.F90	(revision 2952)
@@ -189,4 +189,8 @@
     INTEGER,SAVE :: iflag_pbl_omp,lev_histhf_omp,lev_histday_omp,lev_histmth_omp
     INTEGER,SAVE :: iflag_pbl_split_omp
+!FC
+    INTEGER,SAVE :: ifl_pbltree_omp
+    REAL,SAVE :: Cd_frein_omp
+!FC
     INTEGER,SAVE :: iflag_order2_sollw_omp
     INTEGER, SAVE :: lev_histins_omp, lev_histLES_omp 
@@ -1404,4 +1408,22 @@
     iflag_pbl_omp = 1
     CALL getin('iflag_pbl',iflag_pbl_omp)
+
+!FC
+    !Config Key  = ifl_pbltree
+    !Config Desc = drag from trees 0 no activated
+    !Config Def  = 0
+    !Config Help =
+    !
+    ifl_pbltree_omp = 0
+    CALL getin('ifl_pbltree',ifl_pbltree_omp)
+!FC
+    !Config Key  = Cd_frein
+    !Config Desc = drag from trees 
+    !Config Def  = 7.5E-02 (valeur Masson mais fait planter avec des LAI eleves)
+    !Config Help =
+    !
+    Cd_frein_omp = 7.5E-02
+    CALL getin('Cd_frein',Cd_frein_omp)
+
     !
     !Config Key  = iflag_pbl_split
@@ -2199,4 +2221,7 @@
     iflag_pbl = iflag_pbl_omp
     iflag_pbl_split = iflag_pbl_split_omp
+!FC
+    ifl_pbltree = ifl_pbltree_omp
+    Cd_frein    =Cd_frein_omp
     iflag_order2_sollw = iflag_order2_sollw_omp
     lev_histhf = lev_histhf_omp
@@ -2440,4 +2465,10 @@
        CALL abort_physic('conf_phys', 'flag_bc_internal_mixture can only be activated with flag_aerosol=6',1)
     ENDIF
+
+    ! ORCHIDEE must be activated for ifl_pbltree=1
+    IF (.NOT. ok_veget .AND. ifl_pbltree==1) THEN
+       WRITE(lunout,*)' ORCHIDEE must be activated for ifl_pbltree=1'
+       CALL abort_physic('conf_phys','ok_veget and ifl_pbltree not coherent',1)
+    END IF
 
     !$OMP MASTER
@@ -2566,4 +2597,7 @@
     write(lunout,*)' freq_calNMC = ',freq_calNMC
     write(lunout,*)' iflag_pbl = ', iflag_pbl
+!FC
+    write(lunout,*)' ifl_pbltree = ', ifl_pbltree
+    write(lunout,*)' Cd_frein = ', Cd_frein
     write(lunout,*)' iflag_pbl_split = ', iflag_pbl_split
     write(lunout,*)' iflag_order2_sollw = ', iflag_order2_sollw
Index: LMDZ5/trunk/libf/phylmd/dimpft.h
===================================================================
--- LMDZ5/trunk/libf/phylmd/dimpft.h	(revision 2952)
+++ LMDZ5/trunk/libf/phylmd/dimpft.h	(revision 2952)
@@ -0,0 +1,5 @@
+!
+! $Id$
+!
+      INTEGER nvm_lmdz
+      PARAMETER (nvm_lmdz=13)
Index: LMDZ5/trunk/libf/phylmd/freinage.F90
===================================================================
--- LMDZ5/trunk/libf/phylmd/freinage.F90	(revision 2952)
+++ LMDZ5/trunk/libf/phylmd/freinage.F90	(revision 2952)
@@ -0,0 +1,133 @@
+!
+! $Id$
+!
+  SUBROUTINE freinage(knon, uu, vv,  &
+       tt,veget,lai, height,ypaprs,ypplay,drag_pro,d_u,d_v)
+
+
+    !ONLINE:
+    use dimphy, only: klon, klev
+!    USE control, ONLY: nvm
+!    USE indice_sol_mod, only : nvm_orch
+
+
+    include "YOMCST.h"
+    include "clesphys.h"
+    include "YOEGWD.h"
+!FC 
+    include "dimpft.h"
+    include "compbl.h"
+
+    ! 0. DECLARATIONS:
+
+    ! 0.1 INPUTS
+
+    REAL, DIMENSION(klon,klev), INTENT(IN)         :: ypplay
+    REAL, DIMENSION(klon,klev+1), INTENT(IN)       :: ypaprs
+
+
+     REAL, DIMENSION(klon, klev), INTENT(IN)     :: uu
+     REAL, DIMENSION(klon, klev), INTENT(IN)     :: vv
+     REAL, DIMENSION(klon, klev), INTENT(IN)     :: tt
+     REAL, DIMENSION(klon,nvm_lmdz), INTENT(IN)          :: veget,lai
+     REAL, DIMENSION(klon,nvm_lmdz), INTENT(IN)          :: height
+
+     REAL, DIMENSION(klon,klev)         :: wind
+     REAL, DIMENSION(klon, klev)        :: yzlay
+     INTEGER knon
+
+    ! 0.2 OUTPUTS
+
+      REAL, DIMENSION(klon, klev),  INTENT(OUT)       :: d_v        ! change in v
+      REAL, DIMENSION(klon, klev),  INTENT(OUT)       :: d_u        ! change in v
+    !knon nombre de points concernes 
+      REAL, DIMENSION(klon,klev)         :: sumveg        ! change in v
+    
+     REAL,  DIMENSION(klon,klev), INTENT(OUT)          :: drag_pro
+    ! (KLON, KLEV) tendencies on winds
+
+
+    INTEGER k,jv,i
+
+
+!FCCCC    REAL Cd_frein
+
+    ! 0.3.1 LOCAL VARIABLE
+
+
+    !-----------------------------------------------------------------
+
+    ! 1. INITIALISATIONS
+
+    
+!    Cd_frein = 7.5E-2 ! (0.075) ! Drag from MASSON 2009
+!FC ESSAI
+!    Cd_frein = 1.5E-2 ! (0.075) ! Drag from MASSON 2009
+!    Cd_frein = 0.005 ! (0.075) ! Drag from MASSON 2009
+
+! initialisation 
+      d_u(:,:) =0.
+      d_v(:,:) =0.
+      drag_pro(:,:) =0.
+      sumveg(:,:) =0.
+!!        print*, "Cd_frein" , Cd_frein
+      
+       wind(:,:)= sqrt(uu(:,:)*uu(:,:)+vv(:,:)*vv(:,:))
+
+       yzlay(1:knon,1)= &
+            RD*tt(1:knon,1)/(0.5*(ypaprs(1:knon,1)+ypplay(1:knon,1))) &
+            *(ypaprs(1:knon,1)-ypplay(1:knon,1))/RG
+       DO k=2,klev
+             yzlay(1:knon,k)= &
+                  yzlay(1:knon,k-1)+RD*0.5*(tt(1:knon,k-1)+tt(1:knon,k)) &
+                  /ypaprs(1:knon,k)*(ypplay(1:knon,k-1)-ypplay(1:knon,k))/RG
+       END DO
+
+!    verifier les indexes ..... 
+!!       print*, " calcul de drag_pro FC "
+   
+      do k= 1,klev
+
+      do jv=2,nvm_lmdz   !   (on peut faire 9 ?)
+
+      do i=1,knon
+
+      sumveg(i,k)= sumveg(i,k)+ veget(i,jv)
+
+!      if  ( (height(i,jv) .gt. yzlay(i,k)) .AND. (height(i,jv) .gt. 0.1) .and. LAI(i,jv).gt.0. ) then                     
+      if  ( (height(i,jv) .gt. yzlay(i,k)) .AND. (height(i,jv) .gt. 0.1) ) then                     
+!FC attention veut on le test sur le LAI ?
+         if (ifl_pbltree.eq.1) then
+      drag_pro(i,k)= drag_pro(i,k)+ &
+      veget(i,jv)
+          elseif (ifl_pbltree.eq.2) then
+      drag_pro(i,k)= drag_pro(i,k)+ &
+      6*LAI(i,jv)*veget(i,jv)*( yzlay(i,k)*(height(i,jv)-yzlay(i,k))/(height(i,jv)*height(i,jv)+ 0.01))
+          elseif (ifl_pbltree.eq.3) then
+      drag_pro(i,k)= drag_pro(i,k)+ &
+      veget(i,jv)*( yzlay(i,k)*(height(i,jv)-yzlay(i,k))/(height(i,jv)*height(i,jv)+ 0.01))
+          elseif (ifl_pbltree.eq.0) then
+          drag_pro(i,k)=0.0
+           endif
+      else
+      drag_pro(i,k)= drag_pro(i,k)
+      endif
+
+
+      enddo
+      enddo
+     enddo 
+      do k=1,klev
+        where (sumveg(1:knon,k) > 0.05 ) 
+!        drag_pro(1:knon,k)=Cd_frein*drag_pro(1:knon,k)/sumveg(1:knon,k)
+        drag_pro(1:knon,k)=Cd_frein*drag_pro(1:knon,k)
+        elsewhere
+        drag_pro(1:knon,k)=0.0
+       endwhere
+        d_u(1:knon,k) =(-1)*drag_pro(1:knon,k)*uu(1:knon,k)*wind(1:knon,k)
+        d_v(1:knon,k) =(-1)*drag_pro(1:knon,k)*vv(1:knon,k)*wind(1:knon,k)
+      enddo
+      return
+
+ END SUBROUTINE freinage
+
Index: LMDZ5/trunk/libf/phylmd/indice_sol_mod.F90
===================================================================
--- LMDZ5/trunk/libf/phylmd/indice_sol_mod.F90	(revision 2951)
+++ LMDZ5/trunk/libf/phylmd/indice_sol_mod.F90	(revision 2952)
@@ -8,4 +8,6 @@
 
             CHARACTER(len=3), DIMENSION(nbsrf), PARAMETER :: clnsurf = (/'ter', 'lic', 'oce', 'sic'/)
+!FC 
+           INTEGER, SAVE    :: nvm_orch ! Nombre de type de vegetation ds ORCHIDEE                 
 
       END MODULE indice_sol_mod
Index: LMDZ5/trunk/libf/phylmd/pbl_surface_mod.F90
===================================================================
--- LMDZ5/trunk/libf/phylmd/pbl_surface_mod.F90	(revision 2951)
+++ LMDZ5/trunk/libf/phylmd/pbl_surface_mod.F90	(revision 2952)
@@ -39,4 +39,7 @@
   integer, save :: iflag_pbl_surface_t2m_bug
   !$OMP THREADPRIVATE(iflag_pbl_surface_t2m_bug)
+!FC
+!  integer, save :: iflag_frein
+!  !$OMP THREADPRIVATE(iflag_frein)
 
 CONTAINS
@@ -138,5 +141,8 @@
     iflag_pbl_surface_t2m_bug=0
     CALL getin_p('iflag_pbl_surface_t2m_bug',iflag_pbl_surface_t2m_bug)
-
+!FC
+!    iflag_frein = 0
+!    CALL getin_p('iflag_frein',iflag_frein)
+!
   END SUBROUTINE pbl_surface_init
 !  
@@ -196,4 +202,6 @@
 !!        tke_x,     tke_w                              &
        wake_dltke                                     &
+        , treedrg                                   &
+!FC
 !!!
                         )
@@ -281,4 +289,7 @@
     INCLUDE "compbl.h"
     INCLUDE "flux_arp.h"
+!FC 
+    INCLUDE "dimpft.h"
+
 !****************************************************************************************
     REAL,                         INTENT(IN)        :: dtime   ! time interval (s)
@@ -447,4 +458,7 @@
     REAL, DIMENSION(klon, klev, nbsrf), INTENT(OUT) :: flux_u     ! u wind tension (kg m/s)/(m**2 s) or Pascal
     REAL, DIMENSION(klon, klev, nbsrf), INTENT(OUT) :: flux_v     ! v wind tension (kg m/s)/(m**2 s) or Pascal
+!FC
+    REAL, DIMENSION(klon, klev, nbsrf), INTENT(INOUT)  :: treedrg      ! tree drag (m)               
+
 
 ! Output not needed
@@ -548,4 +562,14 @@
     REAL, DIMENSION(klon,klev+1)       :: ytke
     REAL, DIMENSION(klon,nsoilmx)      :: ytsoil
+!FC 
+    REAL, DIMENSION(klon,nvm_lmdz)          :: yveget
+    REAL, DIMENSION(klon,nvm_lmdz)          :: ylai
+    REAL, DIMENSION(klon,nvm_lmdz)          :: yheight
+    REAL, DIMENSION(klon,klev)              :: y_d_u_frein
+    REAL, DIMENSION(klon,klev)              :: y_d_v_frein
+    REAL, DIMENSION(klon,klev)              :: y_treedrg
+!FC
+
+
     CHARACTER(len=80)                  :: abort_message
     CHARACTER(len=20)                  :: modname = 'pbl_surface'
@@ -929,4 +953,7 @@
     yqsol = 0.0    
     ytherm = 0.0  ; ytke=0.
+!FC 
+    y_treedrg=0.
+
     ! Martin
     ysnowhgt = 0.0; yqsnow = 0.0     ; yrunoff = 0.0   ; ytoice =0.0
@@ -952,4 +979,10 @@
 !!!
     ytsoil = 999999. 
+!FC
+    y_d_u_frein(:,:)=0.
+    y_d_v_frein(:,:)=0.
+!FC
+
+
 
 
@@ -1240,4 +1273,9 @@
              ytke(j,k)   = tke_x(i,k,nsrf)
 !>jyg
+!FC
+             y_treedrg(j,k) =  treedrg(i,k,nsrf)
+!            print*,nsrf, "treedrg ",y_treedrg(j,k),j,k
+!FC
+
              yu(j,k) = u(i,k)
              yv(j,k) = v(i,k)
@@ -1435,5 +1473,7 @@
         CALL coef_diff_turb(dtime, nsrf, knon, ni,  &
             ypaprs, ypplay, yu, yv, yq, yt, yts, yqsurf, ycdragm, &
-            ycoefm, ycoefh, ytke)
+            ycoefm, ycoefh, ytke, y_treedrg)
+!            ycoefm, ycoefh, ytke)
+!FC y_treedrg ajouté
        IF (iflag_pbl>=20.AND.iflag_pbl<30) THEN
 ! In this case, coef_diff_turb is called for the Cd only
@@ -1462,5 +1502,7 @@
         CALL coef_diff_turb(dtime, nsrf, knon, ni,  &
             ypaprs, ypplay, yu_x, yv_x, yq_x, yt_x, yts_x, yqsurf, ycdragm_x, &
-            ycoefm_x, ycoefh_x, ytke_x)
+            ycoefm_x, ycoefh_x, ytke_x,y_treedrg)
+!            ycoefm_x, ycoefh_x, ytke_x)
+!FC doit on le mettre ( on ne l utilise pas si il y a du spliting)
        IF (iflag_pbl>=20.AND.iflag_pbl<30) THEN
 ! In this case, coef_diff_turb is called for the Cd only
@@ -1488,5 +1530,6 @@
         CALL coef_diff_turb(dtime, nsrf, knon, ni,  &
             ypaprs, ypplay, yu_w, yv_w, yq_w, yt_w, yts_w, yqsurf, ycdragm_w, &
-            ycoefm_w, ycoefh_w, ytke_w)
+            ycoefm_w, ycoefh_w, ytke_w,y_treedrg)
+!            ycoefm_w, ycoefh_w, ytke_w)
        IF (iflag_pbl>=20.AND.iflag_pbl<30) THEN
 ! In this case, coef_diff_turb is called for the Cd only
@@ -1775,5 +1818,14 @@
                yz0m, yz0h, SFRWL, yalb_dir_new, yalb_dif_new, yevap, yfluxsens,yfluxlat,&
                yqsurf, ytsurf_new, y_dflux_t, y_dflux_q, &
-               y_flux_u1, y_flux_v1 )
+               y_flux_u1, y_flux_v1, &
+               yveget,ylai,yheight )
+!FC quid qd yveget ylai yheight ne sont pas definit
+!FC  yveget,ylai,yheight, &
+            if (ifl_pbltree .ge. 1) then
+            CALL   freinage(knon, yu, yv, yt, &
+!              yveget,ylai, yheight,ypaprs,ypplay,y_d_u_frein,y_d_v_frein)
+              yveget,ylai, yheight,ypaprs,ypplay,y_treedrg, y_d_u_frein,y_d_v_frein)
+             endif
+
                
 ! Special DICE MPL 05082013 puis BOMEX
@@ -2182,4 +2234,16 @@
              y_d_u(j,k)  = y_d_u(j,k) * ypct(j)
              y_d_v(j,k)  = y_d_v(j,k) * ypct(j)
+!FC
+              if  (nsrf .EQ. is_ter .and. ifl_pbltree .ge. 1  ) then
+!            if (y_d_u_frein(j,k).ne.0. ) then
+!        print*, nsrf,'IS_TER ++', y_d_u_frein(j,k)*ypct(j),y_d_u(j,k),j,k
+!            endif
+             y_d_u(j,k) =y_d_u(j,k) + y_d_u_frein(j,k)*ypct(j)
+             y_d_v(j,k) =y_d_v(j,k) + y_d_v_frein(j,k)*ypct(j)
+             treedrg(i,k,nsrf)=y_treedrg(j,k)
+             else 
+             treedrg(i,k,nsrf)=0.
+               endif
+!FC
 
              flux_t(i,k,nsrf) = y_flux_t(j,k)
Index: LMDZ5/trunk/libf/phylmd/phyetat0.F90
===================================================================
--- LMDZ5/trunk/libf/phylmd/phyetat0.F90	(revision 2951)
+++ LMDZ5/trunk/libf/phylmd/phyetat0.F90	(revision 2952)
@@ -18,5 +18,6 @@
        wake_deltat, wake_delta_pbl_TKE, delta_tsurf, wake_fip, wake_pe, &
        wake_s, wake_dens, zgam, zmax0, zmea, zpic, zsig, &
-       zstd, zthe, zval, ale_bl, ale_bl_trig, alp_bl, u10m, v10m
+       zstd, zthe, zval, ale_bl, ale_bl_trig, alp_bl, u10m, v10m, treedrg
+!FC
   USE geometry_mod, ONLY : longitude_deg, latitude_deg
   USE iostart, ONLY : close_startphy, get_field, get_var, open_startphy
@@ -52,4 +53,6 @@
   REAL trs(klon, nbtr)
   REAL zts(klon)
+  ! pour drag arbres FC
+  REAL drg_ter(klon,klev)
 
   CHARACTER*6 ocean_in
@@ -319,4 +322,19 @@
      found=phyetat0_srf(1,z0h,"Z0h","Roughness length, enthalpy ",0.001)
   ENDIF
+!FC
+     IF (ifl_pbltree>0) then
+!CALL get_field("FTER", pctsrf(:, is_ter), found)
+     treedrg(:,1:klev,1:nbsrf)= 0.0
+   CALL get_field("treedrg_ter", drg_ter(:,:), found)
+!  found=phyetat0_srf(1,treedrg,"treedrg","drag from vegetation" , 0.)
+  !lecture du profile de freinage des arbres
+   IF (.not. found ) then
+     treedrg(:,1:klev,1:nbsrf)= 0.0
+   else
+     treedrg(:,1:klev,is_ter)= drg_ter(:,:)
+!     found=phyetat0_srf(klev,treedrg,"treedrg","freinage arbres",0.)
+   ENDIF
+      endif
+
 
   ! Lecture de l'age de la neige:
Index: LMDZ5/trunk/libf/phylmd/phyredem.F90
===================================================================
--- LMDZ5/trunk/libf/phylmd/phyredem.F90	(revision 2951)
+++ LMDZ5/trunk/libf/phylmd/phyredem.F90	(revision 2952)
@@ -22,5 +22,6 @@
                                 wake_pe, wake_fip, fm_therm, entr_therm,     &
                                 detr_therm, Ale_bl, Ale_bl_trig, Alp_bl,     &
-                                du_gwd_rando, du_gwd_front, u10m, v10m
+                                du_gwd_rando, du_gwd_front, u10m, v10m,      &
+                                treedrg
   USE geometry_mod, ONLY : longitude_deg, latitude_deg
   USE iostart, ONLY: open_restartphy, close_restartphy, put_field, put_var
@@ -160,4 +161,8 @@
 ! ================== Tsoil =========================================
   CALL put_field_srf2("Tsoil","Temperature",tsoil(:,:,:))
+!FC
+!  CALL put_field_srf2("treedrg","freinage arbres",treedrg(:,:,:))
+  CALL put_field("treedrg_ter","freinage arbres",treedrg(:,:,is_ter))
+
 
   CALL put_field_srf1("QS"  , "Humidite",qsurf(:,:))
Index: LMDZ5/trunk/libf/phylmd/phys_output_ctrlout_mod.F90
===================================================================
--- LMDZ5/trunk/libf/phylmd/phys_output_ctrlout_mod.F90	(revision 2951)
+++ LMDZ5/trunk/libf/phylmd/phys_output_ctrlout_mod.F90	(revision 2952)
@@ -961,4 +961,16 @@
       ctrl_out((/ 10, 4, 10, 10, 10, 10, 11, 11, 11, 11/),'tke_sic',       &
       "Max Turb. Kinetic Energy "//clnsurf(4),"m2/s2", (/ ('', i=1, 10) /)) /)
+!FC
+!  TYPE(ctrl_out), SAVE, DIMENSION(4) :: o_treedrg_srf      = (/             &
+!      ctrl_out((/ 10, 4, 10, 10, 10, 10, 11, 11, 11, 11/),'treedrg_ter',       &
+!      "Drag from trees "//clnsurf(1),"-", (/ ('', i=1, 10) /)), &
+!      ctrl_out((/ 10, 4, 10, 10, 10, 10, 11, 11, 11, 11/),'treedrg_lic',       &
+!      "Drag from trees "//clnsurf(2),"-", (/ ('', i=1, 10) /)), &
+!      ctrl_out((/ 10, 4, 10, 10, 10, 10, 11, 11, 11, 11/),'treedrg_oce',       &
+!      "Drag from trees "//clnsurf(3),"-", (/ ('', i=1, 10) /)), &
+!      ctrl_out((/ 10, 4, 10, 10, 10, 10, 11, 11, 11, 11/),'treedrg_sic',       &
+!      "Drag from trees "//clnsurf(4),"-", (/ ('', i=1, 10) /)) /)
+!FC
+
 
   TYPE(ctrl_out), SAVE, DIMENSION(4) :: o_l_mixmin      = (/             &
Index: LMDZ5/trunk/libf/phylmd/phys_output_write_mod.F90
===================================================================
--- LMDZ5/trunk/libf/phylmd/phys_output_write_mod.F90	(revision 2951)
+++ LMDZ5/trunk/libf/phylmd/phys_output_write_mod.F90	(revision 2952)
@@ -99,5 +99,5 @@
          o_SWdownOR, o_LWdownOR, o_snowl, &
          o_solldown, o_dtsvdfo, o_dtsvdft, &
-         o_dtsvdfg, o_dtsvdfi, o_z0m, o_z0h, o_od443aer, o_od550aer, &
+         o_dtsvdfg, o_dtsvdfi, o_z0m, o_z0h,  o_od443aer, o_od550aer, &
          o_dryod550aer, o_od865aer, o_abs550aer, o_od550lt1aer, &
          o_sconcso4, o_sconcno3, o_sconcoa, o_sconcbc, &
@@ -834,4 +834,8 @@
           ENDIF
 !>jyg
+!          IF (iflag_pbl > 1 .AND. ifl_pbltree  >=1 ) THEN
+!       CALL histwrite_phy(o_treedrg_srf(nsrf), treedrg(:,1:klev,nsrf))
+!            ENDIF
+
 
        ENDDO
@@ -1165,4 +1169,5 @@
        CALL histwrite_phy(o_z0m, z0m(:,nbsrf+1))
        CALL histwrite_phy(o_z0h, z0h(:,nbsrf+1))
+
        ! od550 per species
 !--OLIVIER
Index: LMDZ5/trunk/libf/phylmd/phys_state_var_mod.F90
===================================================================
--- LMDZ5/trunk/libf/phylmd/phys_state_var_mod.F90	(revision 2951)
+++ LMDZ5/trunk/libf/phylmd/phys_state_var_mod.F90	(revision 2952)
@@ -32,4 +32,8 @@
       REAL,ALLOCATABLE,SAVE :: qsol(:),fevap(:,:),z0m(:,:),z0h(:,:),agesno(:,:)
 !$OMP THREADPRIVATE(qsol,fevap,z0m,z0h,agesno)
+!FC drag des arbres
+      REAL, ALLOCATABLE, SAVE :: treedrg(:,:,:)
+!$OMP THREADPRIVATE(treedrg)
+
 !      character(len=6), SAVE :: ocean
 !!!!!!$OMP THREADPRIVATE(ocean)
@@ -430,4 +434,6 @@
       ALLOCATE(qsol(klon),fevap(klon,nbsrf))
       ALLOCATE(z0m(klon,nbsrf+1),z0h(klon,nbsrf+1),agesno(klon,nbsrf))
+!FC
+      ALLOCATE(treedrg(klon,klev,nbsrf))
       ALLOCATE(falb1(klon,nbsrf))
       ALLOCATE(falb2(klon,nbsrf))
@@ -603,4 +609,6 @@
       deallocate(pctsrf, ftsol, falb1, falb2)
       deallocate(qsol,fevap,z0m,z0h,agesno)
+!FC
+      deallocate(treedrg)
       deallocate(rain_fall, snow_fall, solsw, sollw, radsol, swradcorr)
       deallocate(zmea, zstd, zsig, zgam)
Index: LMDZ5/trunk/libf/phylmd/physiq_mod.F90
===================================================================
--- LMDZ5/trunk/libf/phylmd/physiq_mod.F90	(revision 2951)
+++ LMDZ5/trunk/libf/phylmd/physiq_mod.F90	(revision 2952)
@@ -2243,7 +2243,8 @@
             zxfluxt,   zxfluxq,   q2m,     fluxq, pbl_tke, &
                                 !nrlmd+jyg<
-            wake_delta_pbl_TKE &
+            wake_delta_pbl_TKE, &
                                 !>nrlmd+jyg
-            )
+             treedrg )
+!FC
        !
        !  Add turbulent diffusion tendency to the wake difference variables
Index: LMDZ5/trunk/libf/phylmd/surf_land_mod.F90
===================================================================
--- LMDZ5/trunk/libf/phylmd/surf_land_mod.F90	(revision 2951)
+++ LMDZ5/trunk/libf/phylmd/surf_land_mod.F90	(revision 2952)
@@ -1,5 +1,5 @@
 !
 MODULE surf_land_mod
-  
+
   IMPLICIT NONE
 
@@ -19,5 +19,6 @@
        z0m, z0h, SFRWL, alb_dir_new, alb_dif_new, evap, fluxsens, fluxlat, &   
        qsurf, tsurf_new, dflux_s, dflux_l, &
-       flux_u1, flux_v1 ) 
+       flux_u1, flux_v1 , & 
+       veget,lai,height)
 
     USE dimphy
@@ -33,8 +34,12 @@
     USE surf_land_orchidee_noz0h_mod
 #else
-    ! Compilation with default interface
+#if ORCHIDEE_NOFREIN
+    ! Compilation with cpp key ORCHIDEE_NOFREIN
+    USE surf_land_orchidee_nofrein_mod
+#else
     USE surf_land_orchidee_mod
 #endif
 #endif
+#endif
 
     USE surf_land_bucket_mod
@@ -44,7 +49,7 @@
     INCLUDE "dimsoil.h"
     INCLUDE "YOMCST.h"
-!albedo SB >>>
     INCLUDE "clesphys.h"
-!albedo SB <<<
+    INCLUDE "dimpft.h"
+
 
 ! Input variables  
@@ -96,4 +101,6 @@
     REAL, DIMENSION(klon), INTENT(OUT)       :: dflux_s, dflux_l      
     REAL, DIMENSION(klon), INTENT(OUT)       :: flux_u1, flux_v1  ! flux for U and V at first model level
+    REAL, DIMENSION(klon,nvm_lmdz), INTENT(OUT) :: veget,lai
+    REAL, DIMENSION(klon,nvm_lmdz), INTENT(OUT) :: height
 
 ! Local variables
@@ -150,5 +157,7 @@
             evap, fluxsens, fluxlat, &              
             tsol_rad, tsurf_new, alb1_new, alb2_new, &
-            emis_new, z0m, z0h, qsurf)       
+            emis_new, z0m, z0h, qsurf, &
+            veget, lai, height)       
+
 
 !  
Index: LMDZ5/trunk/libf/phylmd/surf_land_orchidee_mod.F90
===================================================================
--- LMDZ5/trunk/libf/phylmd/surf_land_orchidee_mod.F90	(revision 2951)
+++ LMDZ5/trunk/libf/phylmd/surf_land_orchidee_mod.F90	(revision 2952)
@@ -3,10 +3,12 @@
 #ifndef ORCHIDEE_NOOPENMP
 #ifndef ORCHIDEE_NOZ0H
+#ifndef ORCHIDEE_NOFREIN
 !
 ! This module controles the interface towards the model ORCHIDEE.
 !
 ! Compatibility with ORCHIDIEE :
-! The current version can be used with ORCHIDEE/trunk from revision 3525.
-! This interface is used if none of the cpp keys ORCHIDEE_NOOPENMP or ORCHIDEE_NOZ0H is set.
+! The current version can be used with ORCHIDEE/trunk from revision 4465.
+! This interface is used if none of the cpp keys ORCHIDEE_NOOPENMP, 
+! ORCHIDEE_NOZ0H or ORCHIDEE_NOFREIN is set.
 !
 ! Subroutines in this module : surf_land_orchidee
@@ -43,5 +45,7 @@
        evap, fluxsens, fluxlat, &              
        tsol_rad, tsurf_new, alb1_new, alb2_new, &
-       emis_new, z0m_new, z0h_new, qsurf)
+       emis_new, z0m_new, z0h_new, qsurf, &
+       veget, lai, height )
+
 
     USE mod_surf_para
@@ -108,4 +112,7 @@
 !
     INCLUDE "YOMCST.h"
+    INCLUDE "dimpft.h"
+
+
   
 !
@@ -138,4 +145,8 @@
     REAL, DIMENSION(klon), INTENT(OUT)        :: alb1_new, alb2_new
     REAL, DIMENSION(klon), INTENT(OUT)        :: emis_new, z0m_new, z0h_new
+    REAL, DIMENSION(klon,nvm_lmdz), INTENT(OUT) :: veget
+    REAL, DIMENSION(klon,nvm_lmdz), INTENT(OUT) :: lai
+    REAL, DIMENSION(klon,nvm_lmdz), INTENT(OUT) :: height
+
 
 ! Local
@@ -409,6 +420,6 @@
                precip_rain, precip_snow, lwdown, swnet, swdown, ps, &
                evap, fluxsens, fluxlat, coastalflow, riverflow, &
-               tsol_rad, tsurf_new, qsurf, albedo_out, emis_new, z0m_new, &
-               lon_scat, lat_scat, q2m, t2m, z0h_new)
+               tsol_rad, tsurf_new, qsurf, albedo_out, emis_new, z0m_new, &    
+               lon_scat, lat_scat, q2m, t2m, z0h_new, nvm_orch)
 #endif         
        ENDIF
@@ -426,4 +437,9 @@
     IF (knon > 0) THEN
 #ifdef CPP_VEGET    
+       IF (nvm_orch .NE. nvm_lmdz ) THEN
+          abort_message='Pb de dimensiosn PFT: nvm_orch et nvm_lmdz differents.'
+          CALL abort_physic(modname,abort_message,1)
+       ENDIF
+
        CALL intersurf_main_gathered (itime+itau_phy, nbp_lon, nbp_lat, knon, ktindex, dtime,  &
             lrestart_read, lrestart_write, lalo, &
@@ -434,5 +450,7 @@
             evap(1:knon), fluxsens(1:knon), fluxlat(1:knon), coastalflow(1:knon), riverflow(1:knon), &
             tsol_rad(1:knon), tsurf_new(1:knon), qsurf(1:knon), albedo_out(1:knon,:), emis_new(1:knon), z0m_new(1:knon), &
-            lon_scat, lat_scat, q2m, t2m, z0h_new(1:knon), coszang=yrmu0(1:knon))
+            lon_scat, lat_scat, q2m, t2m, z0h_new(1:knon),&
+            veget(1:knon,:),lai(1:knon,:),height(1:knon,:),&
+            coszang=yrmu0(1:knon))
 #endif       
     ENDIF
@@ -664,3 +682,4 @@
 #endif
 #endif
+#endif
 END MODULE surf_land_orchidee_mod
Index: LMDZ5/trunk/libf/phylmd/surf_land_orchidee_nofrein_mod.F90
===================================================================
--- LMDZ5/trunk/libf/phylmd/surf_land_orchidee_nofrein_mod.F90	(revision 2952)
+++ LMDZ5/trunk/libf/phylmd/surf_land_orchidee_nofrein_mod.F90	(revision 2952)
@@ -0,0 +1,683 @@
+!
+! $Id$
+!
+!
+MODULE surf_land_orchidee_nofrein_mod
+#ifdef ORCHIDEE_NOFREIN
+!
+! This module controles the interface towards the model ORCHIDEE.
+!
+! Compatibility with ORCHIDIEE :
+! This module is compiled only if cpp key ORCHIDEE_NOFREIN is defined. 
+! The current version can be used with ORCHIDEE/trunk from revision 3525-4465 
+! (it can be used for later revisions also but it is not needed.)
+! 
+!
+! Subroutines in this module : surf_land_orchidee
+!                              Init_orchidee_index
+!                              Get_orchidee_communicator
+!                              Init_neighbours
+
+  USE dimphy
+#ifdef CPP_VEGET
+  USE intersurf     ! module d'ORCHIDEE
+#endif
+  USE cpl_mod,      ONLY : cpl_send_land_fields
+  USE surface_data, ONLY : type_ocean
+  USE geometry_mod, ONLY : dx, dy
+  USE mod_grid_phy_lmdz
+  USE mod_phys_lmdz_para, mpi_root_rank=>mpi_master
+
+  IMPLICIT NONE
+
+  PRIVATE
+  PUBLIC  :: surf_land_orchidee
+
+CONTAINS
+!
+!****************************************************************************************
+!  
+  SUBROUTINE surf_land_orchidee(itime, dtime, date0, knon, &
+       knindex, rlon, rlat, yrmu0, pctsrf, &
+       debut, lafin, &
+       plev,  u1_lay, v1_lay, gustiness, temp_air, spechum, epot_air, ccanopy, & 
+       tq_cdrag, petAcoef, peqAcoef, petBcoef, peqBcoef, &
+       precip_rain, precip_snow, lwdown, swnet, swdown, &
+       ps, q2m, t2m, &
+       evap, fluxsens, fluxlat, &              
+       tsol_rad, tsurf_new, alb1_new, alb2_new, &
+       emis_new, z0m_new, z0h_new, qsurf, &
+       veget, lai, height )
+
+
+    USE mod_surf_para
+    USE mod_synchro_omp
+    USE carbon_cycle_mod, ONLY : carbon_cycle_cpl
+    USE indice_sol_mod
+    USE print_control_mod, ONLY: lunout
+    USE mod_grid_phy_lmdz, ONLY: nbp_lon, nbp_lat
+#ifdef CPP_VEGET
+    USE time_phylmdz_mod, ONLY: itau_phy 
+#endif
+!    
+! Cette routine sert d'interface entre le modele atmospherique et le 
+! modele de sol continental. Appel a sechiba
+!
+! L. Fairhead 02/2000
+!
+! input:
+!   itime        numero du pas de temps
+!   dtime        pas de temps de la physique (en s)
+!   nisurf       index de la surface a traiter (1 = sol continental)
+!   knon         nombre de points de la surface a traiter
+!   knindex      index des points de la surface a traiter
+!   rlon         longitudes de la grille entiere
+!   rlat         latitudes de la grille entiere
+!   pctsrf       tableau des fractions de surface de chaque maille
+!   debut        logical: 1er appel a la physique (lire les restart)
+!   lafin        logical: dernier appel a la physique (ecrire les restart)
+!                     (si false calcul simplifie des fluxs sur les continents)
+!   plev         hauteur de la premiere couche (Pa)      
+!   u1_lay       vitesse u 1ere couche
+!   v1_lay       vitesse v 1ere couche
+!   temp_air     temperature de l'air 1ere couche
+!   spechum      humidite specifique 1ere couche
+!   epot_air     temp pot de l'air
+!   ccanopy      concentration CO2 canopee, correspond au co2_send de 
+!                carbon_cycle_mod ou valeur constant co2_ppm
+!   tq_cdrag     cdrag
+!   petAcoef     coeff. A de la resolution de la CL pour t
+!   peqAcoef     coeff. A de la resolution de la CL pour q
+!   petBcoef     coeff. B de la resolution de la CL pour t
+!   peqBcoef     coeff. B de la resolution de la CL pour q
+!   precip_rain  precipitation liquide
+!   precip_snow  precipitation solide
+!   lwdown       flux IR descendant a la surface
+!   swnet        flux solaire net
+!   swdown       flux solaire entrant a la surface
+!   ps           pression au sol
+!   radsol       rayonnement net aus sol (LW + SW)
+!   
+!
+! output:
+!   evap         evaporation totale
+!   fluxsens     flux de chaleur sensible
+!   fluxlat      flux de chaleur latente
+!   tsol_rad     
+!   tsurf_new    temperature au sol
+!   alb1_new     albedo in visible SW interval
+!   alb2_new     albedo in near IR interval
+!   emis_new     emissivite
+!   z0m_new      surface roughness for momentum
+!   z0h_new      surface roughness for heat
+!   qsurf        air moisture at surface
+!
+    INCLUDE "YOMCST.h"
+    INCLUDE "dimpft.h"
+
+
+  
+!
+! Parametres d'entree
+!****************************************************************************************
+    INTEGER, INTENT(IN)                       :: itime
+    REAL, INTENT(IN)                          :: dtime
+    REAL, INTENT(IN)                          :: date0
+    INTEGER, INTENT(IN)                       :: knon
+    INTEGER, DIMENSION(klon), INTENT(IN)      :: knindex
+    LOGICAL, INTENT(IN)                       :: debut, lafin
+    REAL, DIMENSION(klon,nbsrf), INTENT(IN)   :: pctsrf
+    REAL, DIMENSION(klon), INTENT(IN)         :: rlon, rlat
+    REAL, DIMENSION(klon), INTENT(IN)         :: yrmu0 ! cosine of solar zenith angle
+    REAL, DIMENSION(klon), INTENT(IN)         :: plev
+    REAL, DIMENSION(klon), INTENT(IN)         :: u1_lay, v1_lay, gustiness
+    REAL, DIMENSION(klon), INTENT(IN)         :: temp_air, spechum
+    REAL, DIMENSION(klon), INTENT(IN)         :: epot_air, ccanopy
+    REAL, DIMENSION(klon), INTENT(IN)         :: tq_cdrag
+    REAL, DIMENSION(klon), INTENT(IN)         :: petAcoef, peqAcoef
+    REAL, DIMENSION(klon), INTENT(IN)         :: petBcoef, peqBcoef
+    REAL, DIMENSION(klon), INTENT(IN)         :: precip_rain, precip_snow
+    REAL, DIMENSION(klon), INTENT(IN)         :: lwdown, swnet, swdown, ps
+    REAL, DIMENSION(klon), INTENT(IN)         :: q2m, t2m
+
+! Parametres de sortie
+!****************************************************************************************
+    REAL, DIMENSION(klon), INTENT(OUT)        :: evap, fluxsens, fluxlat, qsurf
+    REAL, DIMENSION(klon), INTENT(OUT)        :: tsol_rad, tsurf_new
+    REAL, DIMENSION(klon), INTENT(OUT)        :: alb1_new, alb2_new
+    REAL, DIMENSION(klon), INTENT(OUT)        :: emis_new, z0m_new, z0h_new
+    REAL, DIMENSION(klon,nvm_lmdz), INTENT(OUT) :: veget ! dummy variables
+    REAL, DIMENSION(klon,nvm_lmdz), INTENT(OUT) :: lai   ! dummy variables
+    REAL, DIMENSION(klon,nvm_lmdz), INTENT(OUT) :: height! dummy variables
+
+
+! Local
+!****************************************************************************************
+    INTEGER                                   :: ij, jj, igrid, ireal, index
+    INTEGER                                   :: error
+    REAL, DIMENSION(klon)                     :: swdown_vrai
+    CHARACTER (len = 20)                      :: modname = 'surf_land_orchidee'
+    CHARACTER (len = 80)                      :: abort_message
+    LOGICAL,SAVE                              :: check = .FALSE.
+    !$OMP THREADPRIVATE(check)
+
+! type de couplage dans sechiba
+!  character (len=10)   :: coupling = 'implicit' 
+! drapeaux controlant les appels dans SECHIBA
+!  type(control_type), save   :: control_in
+! Preserved albedo
+    REAL, ALLOCATABLE, DIMENSION(:), SAVE     :: albedo_keep, zlev
+    !$OMP THREADPRIVATE(albedo_keep,zlev)
+! coordonnees geographiques
+    REAL, ALLOCATABLE, DIMENSION(:,:), SAVE   :: lalo
+    !$OMP THREADPRIVATE(lalo)
+! pts voisins
+    INTEGER,ALLOCATABLE, DIMENSION(:,:), SAVE :: neighbours
+    !$OMP THREADPRIVATE(neighbours)
+! fractions continents
+    REAL,ALLOCATABLE, DIMENSION(:), SAVE      :: contfrac
+    !$OMP THREADPRIVATE(contfrac)
+! resolution de la grille
+    REAL, ALLOCATABLE, DIMENSION (:,:), SAVE  :: resolution
+    !$OMP THREADPRIVATE(resolution)
+
+    REAL, ALLOCATABLE, DIMENSION (:,:), SAVE  :: lon_scat, lat_scat  
+    !$OMP THREADPRIVATE(lon_scat,lat_scat)
+
+    LOGICAL, SAVE                             :: lrestart_read = .TRUE.
+    !$OMP THREADPRIVATE(lrestart_read)
+    LOGICAL, SAVE                             :: lrestart_write = .FALSE.
+    !$OMP THREADPRIVATE(lrestart_write)
+
+    REAL, DIMENSION(knon,2)                   :: albedo_out
+
+! Pb de nomenclature
+    REAL, DIMENSION(klon)                     :: petA_orc, peqA_orc
+    REAL, DIMENSION(klon)                     :: petB_orc, peqB_orc
+! Pb de correspondances de grilles
+    INTEGER, DIMENSION(:), SAVE, ALLOCATABLE  :: ig, jg
+    !$OMP THREADPRIVATE(ig,jg)
+    INTEGER :: indi, indj
+    INTEGER, SAVE, ALLOCATABLE,DIMENSION(:)   :: ktindex
+    !$OMP THREADPRIVATE(ktindex)
+
+! Essai cdrag
+    REAL, DIMENSION(klon)                     :: cdrag
+    INTEGER,SAVE                              :: offset
+    !$OMP THREADPRIVATE(offset)
+
+    REAL, DIMENSION(klon_glo)                 :: rlon_g,rlat_g
+    INTEGER, SAVE                             :: orch_comm
+    !$OMP THREADPRIVATE(orch_comm)
+
+    REAL, ALLOCATABLE, DIMENSION(:), SAVE     :: coastalflow
+    !$OMP THREADPRIVATE(coastalflow)
+    REAL, ALLOCATABLE, DIMENSION(:), SAVE     :: riverflow
+    !$OMP THREADPRIVATE(riverflow)
+    
+    INTEGER :: orch_omp_rank
+    INTEGER :: orch_omp_size
+!
+! Fin definition
+!****************************************************************************************
+
+    IF (check) WRITE(lunout,*)'Entree ', modname
+  
+    IF (ifl_pbltree == 1) THEN
+       abort_message='Pb de coherence: cette interface vers ORCHIDEE ne peut pas etre utilise avec ifl_pbltree'
+       CALL abort_physic(modname,abort_message,1)
+    END IF
+
+! Initialisation
+  
+    IF (debut) THEN
+! Test of coherence between variable ok_veget and cpp key CPP_VEGET
+#ifndef CPP_VEGET
+       abort_message='Pb de coherence: ok_veget = .true. mais CPP_VEGET = .false.'
+       CALL abort_physic(modname,abort_message,1)
+#endif
+
+       CALL Init_surf_para(knon)
+       ALLOCATE(ktindex(knon))
+       IF ( .NOT. ALLOCATED(albedo_keep)) THEN
+!ym          ALLOCATE(albedo_keep(klon))
+!ym bizarre que non alloué en knon precedement
+          ALLOCATE(albedo_keep(knon))
+          ALLOCATE(zlev(knon))
+       ENDIF
+! Pb de correspondances de grilles
+       ALLOCATE(ig(klon))
+       ALLOCATE(jg(klon))
+       ig(1) = 1
+       jg(1) = 1
+       indi = 0
+       indj = 2
+       DO igrid = 2, klon - 1
+          indi = indi + 1
+          IF ( indi > nbp_lon) THEN
+             indi = 1
+             indj = indj + 1
+          ENDIF
+          ig(igrid) = indi
+          jg(igrid) = indj
+       ENDDO
+       ig(klon) = 1
+       jg(klon) = nbp_lat
+
+       IF ((.NOT. ALLOCATED(lalo))) THEN
+          ALLOCATE(lalo(knon,2), stat = error)
+          IF (error /= 0) THEN
+             abort_message='Pb allocation lalo'
+             CALL abort_physic(modname,abort_message,1)
+          ENDIF
+       ENDIF
+       IF ((.NOT. ALLOCATED(lon_scat))) THEN
+          ALLOCATE(lon_scat(nbp_lon,nbp_lat), stat = error)
+          IF (error /= 0) THEN
+             abort_message='Pb allocation lon_scat'
+             CALL abort_physic(modname,abort_message,1)
+          ENDIF
+       ENDIF
+       IF ((.NOT. ALLOCATED(lat_scat))) THEN
+          ALLOCATE(lat_scat(nbp_lon,nbp_lat), stat = error)
+          IF (error /= 0) THEN
+             abort_message='Pb allocation lat_scat'
+             CALL abort_physic(modname,abort_message,1)
+          ENDIF
+       ENDIF
+       lon_scat = 0.
+       lat_scat = 0.
+       DO igrid = 1, knon
+          index = knindex(igrid)
+          lalo(igrid,2) = rlon(index)
+          lalo(igrid,1) = rlat(index)
+       ENDDO
+
+       
+       
+       CALL Gather(rlon,rlon_g)
+       CALL Gather(rlat,rlat_g)
+
+       IF (is_mpi_root) THEN
+          index = 1
+          DO jj = 2, nbp_lat-1
+             DO ij = 1, nbp_lon
+                index = index + 1
+                lon_scat(ij,jj) = rlon_g(index)
+                lat_scat(ij,jj) = rlat_g(index)
+             ENDDO
+          ENDDO
+          lon_scat(:,1) = lon_scat(:,2)
+          lat_scat(:,1) = rlat_g(1)
+          lon_scat(:,nbp_lat) = lon_scat(:,2)
+          lat_scat(:,nbp_lat) = rlat_g(klon_glo)
+       ENDIF
+   
+       CALL bcast(lon_scat)
+       CALL bcast(lat_scat)
+!
+! Allouer et initialiser le tableau des voisins et des fraction de continents
+!
+       IF ( (.NOT.ALLOCATED(neighbours))) THEN
+          ALLOCATE(neighbours(knon,8), stat = error)
+          IF (error /= 0) THEN
+             abort_message='Pb allocation neighbours'
+             CALL abort_physic(modname,abort_message,1)
+          ENDIF
+       ENDIF
+       neighbours = -1.
+       IF (( .NOT. ALLOCATED(contfrac))) THEN
+          ALLOCATE(contfrac(knon), stat = error)
+          IF (error /= 0) THEN
+             abort_message='Pb allocation contfrac'
+             CALL abort_physic(modname,abort_message,1)
+          ENDIF
+       ENDIF
+
+       DO igrid = 1, knon
+          ireal = knindex(igrid)
+          contfrac(igrid) = pctsrf(ireal,is_ter)
+       ENDDO
+
+
+       CALL Init_neighbours(knon,neighbours,knindex,pctsrf(:,is_ter))
+
+!
+!  Allocation et calcul resolutions
+       IF ( (.NOT.ALLOCATED(resolution))) THEN
+          ALLOCATE(resolution(knon,2), stat = error)
+          IF (error /= 0) THEN
+             abort_message='Pb allocation resolution'
+             CALL abort_physic(modname,abort_message,1)
+          ENDIF
+       ENDIF
+       DO igrid = 1, knon
+          ij = knindex(igrid)
+          resolution(igrid,1) = dx(ij)
+          resolution(igrid,2) = dy(ij)
+       ENDDO
+     
+       ALLOCATE(coastalflow(klon), stat = error)
+       IF (error /= 0) THEN
+          abort_message='Pb allocation coastalflow'
+          CALL abort_physic(modname,abort_message,1)
+       ENDIF
+       
+       ALLOCATE(riverflow(klon), stat = error)
+       IF (error /= 0) THEN
+          abort_message='Pb allocation riverflow'
+          CALL abort_physic(modname,abort_message,1)
+       ENDIF
+!
+! carbon_cycle_cpl not possible with this interface and version of ORHCHIDEE
+!
+       IF (carbon_cycle_cpl) THEN
+          abort_message='carbon_cycle_cpl not yet possible with this interface of ORCHIDEE'
+          CALL abort_physic(modname,abort_message,1)
+       END IF
+       
+    ENDIF                          ! (fin debut) 
+ 
+
+! 
+! Appel a la routine sols continentaux
+!
+    IF (lafin) lrestart_write = .TRUE.
+    IF (check) WRITE(lunout,*)'lafin ',lafin,lrestart_write
+     
+    petA_orc(1:knon) = petBcoef(1:knon) * dtime
+    petB_orc(1:knon) = petAcoef(1:knon)
+    peqA_orc(1:knon) = peqBcoef(1:knon) * dtime
+    peqB_orc(1:knon) = peqAcoef(1:knon)
+
+    cdrag = 0.
+    cdrag(1:knon) = tq_cdrag(1:knon)
+
+! zlev(1:knon) = (100.*plev(1:knon))/((ps(1:knon)/287.05*temp_air(1:knon))*9.80665)
+!    zlev(1:knon) = (100.*plev(1:knon))/((ps(1:knon)/RD*temp_air(1:knon))*RG)
+     zlev(1:knon) = plev(1:knon)*RD*temp_air(1:knon)/((ps(1:knon)*100.0)*RG)
+
+
+! PF et PASB
+!   where(cdrag > 0.01) 
+!     cdrag = 0.01
+!   endwhere
+!  write(*,*)'Cdrag = ',minval(cdrag),maxval(cdrag)
+
+  
+    IF (debut) THEN
+       CALL Init_orchidee_index(knon,knindex,offset,ktindex)
+       CALL Get_orchidee_communicator(orch_comm,orch_omp_size,orch_omp_rank)
+       CALL Init_synchro_omp
+       
+       IF (knon > 0) THEN
+#ifdef CPP_VEGET
+         CALL Init_intersurf(nbp_lon,nbp_lat,knon,ktindex,offset,orch_omp_size,orch_omp_rank,orch_comm)
+#endif
+       ENDIF
+
+       
+       IF (knon > 0) THEN
+
+#ifdef CPP_VEGET
+         CALL intersurf_initialize_gathered (itime+itau_phy-1, nbp_lon, nbp_lat, knon, ktindex, dtime, &
+               lrestart_read, lrestart_write, lalo, contfrac, neighbours, resolution, date0, &
+               zlev,  u1_lay, v1_lay, spechum, temp_air, epot_air, &
+               cdrag, petA_orc, peqA_orc, petB_orc, peqB_orc, &
+               precip_rain, precip_snow, lwdown, swnet, swdown, ps, &
+               evap, fluxsens, fluxlat, coastalflow, riverflow, &
+               tsol_rad, tsurf_new, qsurf, albedo_out, emis_new, z0m_new, &
+               lon_scat, lat_scat, q2m, t2m, z0h_new)
+#endif         
+       ENDIF
+
+       CALL Synchro_omp
+
+       albedo_keep(1:knon) = (albedo_out(1:knon,1)+albedo_out(1:knon,2))/2.
+
+    ENDIF
+
+    
+!  swdown_vrai(1:knon) = swnet(1:knon)/(1. - albedo_keep(1:knon))
+    swdown_vrai(1:knon) = swdown(1:knon)
+
+    IF (knon > 0) THEN
+#ifdef CPP_VEGET    
+       CALL intersurf_main_gathered (itime+itau_phy, nbp_lon, nbp_lat, knon, ktindex, dtime,  &
+            lrestart_read, lrestart_write, lalo, &
+            contfrac, neighbours, resolution, date0, &
+            zlev,  u1_lay(1:knon), v1_lay(1:knon), spechum(1:knon), temp_air(1:knon), epot_air(1:knon), ccanopy(1:knon), &
+            cdrag(1:knon), petA_orc(1:knon), peqA_orc(1:knon), petB_orc(1:knon), peqB_orc(1:knon), &
+            precip_rain(1:knon), precip_snow(1:knon), lwdown(1:knon), swnet(1:knon), swdown_vrai(1:knon), ps(1:knon), &
+            evap(1:knon), fluxsens(1:knon), fluxlat(1:knon), coastalflow(1:knon), riverflow(1:knon), &
+            tsol_rad(1:knon), tsurf_new(1:knon), qsurf(1:knon), albedo_out(1:knon,:), emis_new(1:knon), z0m_new(1:knon), &
+            lon_scat, lat_scat, q2m, t2m, z0h_new(1:knon), coszang=yrmu0(1:knon))
+#endif       
+    ENDIF
+
+    CALL Synchro_omp
+    
+    albedo_keep(1:knon) = (albedo_out(1:knon,1)+albedo_out(1:knon,2))/2.
+
+!* Send to coupler
+!
+    IF (type_ocean=='couple') THEN
+       CALL cpl_send_land_fields(itime, knon, knindex, &
+            riverflow, coastalflow)
+    ENDIF
+
+    alb1_new(1:knon) = albedo_out(1:knon,1) 
+    alb2_new(1:knon) = albedo_out(1:knon,2)
+
+! Convention orchidee: positif vers le haut
+    fluxsens(1:knon) = -1. * fluxsens(1:knon)
+    fluxlat(1:knon)  = -1. * fluxlat(1:knon)
+    
+!  evap     = -1. * evap
+
+    IF (debut) lrestart_read = .FALSE.
+    
+    IF (debut) CALL Finalize_surf_para
+
+    
+  END SUBROUTINE surf_land_orchidee
+!
+!****************************************************************************************
+!
+  SUBROUTINE Init_orchidee_index(knon,knindex,offset,ktindex)
+  USE mod_surf_para
+  USE mod_grid_phy_lmdz
+  
+    INTEGER,INTENT(IN)    :: knon
+    INTEGER,INTENT(IN)    :: knindex(klon)    
+    INTEGER,INTENT(OUT)   :: offset
+    INTEGER,INTENT(OUT)   :: ktindex(klon)
+    
+    INTEGER               :: ktindex_glo(knon_glo)
+    INTEGER               :: offset_para(0:omp_size*mpi_size-1)
+    INTEGER               :: LastPoint
+    INTEGER               :: task
+    
+    ktindex(1:knon)=knindex(1:knon)+(klon_mpi_begin-1)+(klon_omp_begin-1)+nbp_lon-1
+    
+    CALL gather_surf(ktindex(1:knon),ktindex_glo) 
+    
+    IF (is_mpi_root .AND. is_omp_root) THEN
+      LastPoint=0
+      DO Task=0,mpi_size*omp_size-1
+        IF (knon_glo_para(Task)>0) THEN
+           offset_para(task)= LastPoint-MOD(LastPoint,nbp_lon)
+           LastPoint=ktindex_glo(knon_glo_end_para(task))
+        ENDIF
+      ENDDO
+    ENDIF
+    
+    CALL bcast(offset_para)
+    
+    offset=offset_para(omp_size*mpi_rank+omp_rank)
+    
+    ktindex(1:knon)=ktindex(1:knon)-offset
+
+  END SUBROUTINE Init_orchidee_index
+
+!
+!************************* ***************************************************************
+! 
+
+  SUBROUTINE Get_orchidee_communicator(orch_comm,orch_omp_size,orch_omp_rank)
+  USE  mod_surf_para
+      
+#ifdef CPP_MPI
+    INCLUDE 'mpif.h'
+#endif    
+
+    INTEGER,INTENT(OUT) :: orch_comm
+    INTEGER,INTENT(OUT) :: orch_omp_size
+    INTEGER,INTENT(OUT) :: orch_omp_rank
+    INTEGER             :: color
+    INTEGER             :: i,ierr
+!
+! End definition
+!****************************************************************************************
+    
+    
+    IF (is_omp_root) THEN          
+      
+      IF (knon_mpi==0) THEN 
+         color = 0
+      ELSE 
+         color = 1
+      ENDIF
+    
+#ifdef CPP_MPI    
+      CALL MPI_COMM_SPLIT(COMM_LMDZ_PHY,color,mpi_rank,orch_comm,ierr)
+#endif
+    
+    ENDIF
+    CALL bcast_omp(orch_comm)
+    
+    IF (knon_mpi /= 0) THEN
+      orch_omp_size=0
+      DO i=0,omp_size-1
+        IF (knon_omp_para(i) /=0) THEN
+          orch_omp_size=orch_omp_size+1
+          IF (i==omp_rank) orch_omp_rank=orch_omp_size-1
+        ENDIF
+      ENDDO
+    ENDIF
+   
+    
+  END SUBROUTINE Get_orchidee_communicator
+!
+!****************************************************************************************
+!  
+
+  SUBROUTINE Init_neighbours(knon,neighbours,knindex,pctsrf)
+    USE mod_grid_phy_lmdz
+    USE mod_surf_para    
+    USE indice_sol_mod
+
+#ifdef CPP_MPI
+    INCLUDE 'mpif.h'
+#endif    
+
+! Input arguments
+!****************************************************************************************
+    INTEGER, INTENT(IN)                     :: knon
+    INTEGER, DIMENSION(klon), INTENT(IN)    :: knindex
+    REAL, DIMENSION(klon), INTENT(IN)       :: pctsrf
+    
+! Output arguments
+!****************************************************************************************
+    INTEGER, DIMENSION(knon,8), INTENT(OUT) :: neighbours
+
+! Local variables
+!****************************************************************************************
+    INTEGER                              :: i, igrid, jj, ij, iglob
+    INTEGER                              :: ierr, ireal, index
+    INTEGER, DIMENSION(8,3)              :: off_ini
+    INTEGER, DIMENSION(8)                :: offset  
+    INTEGER, DIMENSION(nbp_lon,nbp_lat)  :: correspond
+    INTEGER, DIMENSION(knon_glo)         :: ktindex_glo
+    INTEGER, DIMENSION(knon_glo,8)       :: neighbours_glo
+    REAL, DIMENSION(klon_glo)            :: pctsrf_glo
+    INTEGER                              :: ktindex(klon)
+!
+! End definition
+!****************************************************************************************
+
+    ktindex(1:knon)=knindex(1:knon)+(klon_mpi_begin-1)+(klon_omp_begin-1)+nbp_lon-1
+    
+    CALL gather_surf(ktindex(1:knon),ktindex_glo)
+    CALL gather(pctsrf,pctsrf_glo)
+    
+    IF (is_mpi_root .AND. is_omp_root) THEN
+      neighbours_glo(:,:)=-1
+!  Initialisation des offset    
+!
+! offset bord ouest
+       off_ini(1,1) = - nbp_lon   ; off_ini(2,1) = - nbp_lon + 1     ; off_ini(3,1) = 1
+       off_ini(4,1) = nbp_lon + 1 ; off_ini(5,1) = nbp_lon           ; off_ini(6,1) = 2 * nbp_lon - 1
+       off_ini(7,1) = nbp_lon -1  ; off_ini(8,1) = - 1 
+! offset point normal
+       off_ini(1,2) = - nbp_lon   ; off_ini(2,2) = - nbp_lon + 1     ; off_ini(3,2) = 1
+       off_ini(4,2) = nbp_lon + 1 ; off_ini(5,2) = nbp_lon           ; off_ini(6,2) = nbp_lon - 1
+       off_ini(7,2) = -1          ; off_ini(8,2) = - nbp_lon - 1
+! offset bord   est
+       off_ini(1,3) = - nbp_lon   ; off_ini(2,3) = - 2 * nbp_lon + 1 ; off_ini(3,3) = - nbp_lon + 1
+       off_ini(4,3) =  1          ; off_ini(5,3) = nbp_lon           ; off_ini(6,3) = nbp_lon - 1
+       off_ini(7,3) = -1          ; off_ini(8,3) = - nbp_lon - 1
+!
+!
+! Attention aux poles
+!
+       DO igrid = 1, knon_glo
+          index = ktindex_glo(igrid)
+          jj = INT((index - 1)/nbp_lon) + 1
+          ij = index - (jj - 1) * nbp_lon
+          correspond(ij,jj) = igrid
+       ENDDO
+!sonia : Les mailles des voisines doivent etre toutes egales (pour couplage orchidee)
+       IF (knon_glo == 1) THEN
+         igrid = 1
+         DO i = 1,8
+           neighbours_glo(igrid, i) = igrid
+         ENDDO
+       ELSE
+       print*,'sonia : knon_glo,ij,jj', knon_glo, ij,jj
+       
+       DO igrid = 1, knon_glo
+          iglob = ktindex_glo(igrid)
+          
+          IF (MOD(iglob, nbp_lon) == 1) THEN
+             offset = off_ini(:,1)
+          ELSE IF(MOD(iglob, nbp_lon) == 0) THEN
+             offset = off_ini(:,3)
+          ELSE
+             offset = off_ini(:,2)
+          ENDIF
+          
+          DO i = 1, 8
+             index = iglob + offset(i)
+             ireal = (MIN(MAX(1, index - nbp_lon + 1), klon_glo))
+             IF (pctsrf_glo(ireal) > EPSFRA) THEN
+                jj = INT((index - 1)/nbp_lon) + 1
+                ij = index - (jj - 1) * nbp_lon
+                neighbours_glo(igrid, i) = correspond(ij, jj)
+             ENDIF
+          ENDDO
+       ENDDO
+       ENDIF !fin knon_glo == 1
+
+    ENDIF
+    
+    DO i = 1, 8
+      CALL scatter_surf(neighbours_glo(:,i),neighbours(1:knon,i))
+    ENDDO
+  END SUBROUTINE Init_neighbours
+
+!
+!****************************************************************************************
+!
+#endif
+END MODULE surf_land_orchidee_nofrein_mod
Index: LMDZ5/trunk/libf/phylmd/surf_land_orchidee_noopenmp_mod.F90
===================================================================
--- LMDZ5/trunk/libf/phylmd/surf_land_orchidee_noopenmp_mod.F90	(revision 2951)
+++ LMDZ5/trunk/libf/phylmd/surf_land_orchidee_noopenmp_mod.F90	(revision 2952)
@@ -44,5 +44,6 @@
        evap, fluxsens, fluxlat, &              
        tsol_rad, tsurf_new, alb1_new, alb2_new, &
-       emis_new, z0_new, z0h_new, qsurf)
+       emis_new, z0_new, z0h_new, qsurf, &
+       veget, lai, height)
 !    
 ! Cette routine sert d'interface entre le modele atmospherique et le 
@@ -108,5 +109,5 @@
 
     INCLUDE "YOMCST.h"
-  
+    INCLUDE "dimpft.h"  
 !
 ! Parametres d'entree
@@ -138,4 +139,7 @@
     REAL, DIMENSION(klon), INTENT(OUT)        :: alb1_new, alb2_new
     REAL, DIMENSION(klon), INTENT(OUT)        :: emis_new, z0_new, z0h_new
+    REAL, DIMENSION(klon,nvm_lmdz), INTENT(OUT) :: veget ! dummy variables
+    REAL, DIMENSION(klon,nvm_lmdz), INTENT(OUT) :: lai   ! dummy variables
+    REAL, DIMENSION(klon,nvm_lmdz), INTENT(OUT) :: height! dummy variables
 
 ! Local
Index: LMDZ5/trunk/libf/phylmd/surf_land_orchidee_noz0h_mod.F90
===================================================================
--- LMDZ5/trunk/libf/phylmd/surf_land_orchidee_noz0h_mod.F90	(revision 2951)
+++ LMDZ5/trunk/libf/phylmd/surf_land_orchidee_noz0h_mod.F90	(revision 2952)
@@ -46,5 +46,6 @@
        evap, fluxsens, fluxlat, &              
        tsol_rad, tsurf_new, alb1_new, alb2_new, &
-       emis_new, z0_new, z0h_new, qsurf)
+       emis_new, z0_new, z0h_new, qsurf, &
+       veget, lai, height)
 
     USE mod_surf_para
@@ -111,5 +112,5 @@
 !
     INCLUDE "YOMCST.h"
-  
+    INCLUDE "dimpft.h"  
 !
 ! Parametres d'entree
@@ -141,4 +142,7 @@
     REAL, DIMENSION(klon), INTENT(OUT)        :: alb1_new, alb2_new
     REAL, DIMENSION(klon), INTENT(OUT)        :: emis_new, z0_new, z0h_new
+    REAL, DIMENSION(klon,nvm_lmdz), INTENT(OUT) :: veget ! dummy variables
+    REAL, DIMENSION(klon,nvm_lmdz), INTENT(OUT) :: lai   ! dummy variables
+    REAL, DIMENSION(klon,nvm_lmdz), INTENT(OUT) :: height! dummy variables
 
 ! Local
@@ -213,4 +217,9 @@
 
     IF (check) WRITE(lunout,*)'Entree ', modname
+
+    IF (ifl_pbltree == 1) THEN
+       abort_message='Pb de coherence: cette interface vers ORCHIDEE ne peut pas etre utilise avec ifl_pbltree'
+       CALL abort_physic(modname,abort_message,1)
+    END IF
   
 ! Initialisation
Index: LMDZ5/trunk/libf/phylmd/yamada4.F90
===================================================================
--- LMDZ5/trunk/libf/phylmd/yamada4.F90	(revision 2951)
+++ LMDZ5/trunk/libf/phylmd/yamada4.F90	(revision 2952)
@@ -2,5 +2,5 @@
 
 SUBROUTINE yamada4(ni, nsrf, ngrid, dt, g, rconst, plev, temp, zlev, zlay, u, v, teta, &
-    cd, tke, km, kn, kq, ustar, iflag_pbl)
+    cd, tke, km, kn, kq, ustar, iflag_pbl, drgpro)
 
   USE dimphy
@@ -101,4 +101,7 @@
   INTEGER ni(klon)
 
+!FC
+  REAL drgpro(klon,klev)
+  REAL winds(klon,klev)
 
   ! Local
@@ -479,8 +482,21 @@
          DO ig=1,ngrid
          tkeprov=q2(ig,k)/ydeux
-         disseff=dissip(ig,k)-min(0.,buoy(ig,k))
+
+!             if(ifl_pbltree .eq. 0) then
+!         disseff=dissip(ig,k)-min(0.,buoy(ig,k))
+!         tkeexp=exp(-dt*disseff/tkeprov)
+!         tkeprov= shear(ig,k)*tkeprov/disseff*(1.-tkeexp)+tkeprov*tkeexp
+!           else
+!FC on ajoute la dissipation due aux arbres
+         disseff=dissip(ig,k)-min(0.,buoy(ig,k)) + drgpro(ig,k)*tkeprov
          tkeexp=exp(-dt*disseff/tkeprov)
-         tkeprov= shear(ig,k)*tkeprov/disseff*(1.-tkeexp)+tkeprov*tkeexp
+! on prend en compte la tke cree par les arbres
+         winds(ig,k)=sqrt(u(ig,k)**2+v(ig,k)**2)
+         tkeprov= (shear(ig,k)+ &
+          & drgpro(ig,k)*(winds(ig,k))**3)*tkeprov/disseff*(1.-tkeexp)+tkeprov*tkeexp
+!               endif
+
          q2(ig,k)=tkeprov*ydeux
+
          ! En cas stable, on traite la flotabilite comme la
          ! dissipation, en supposant que buoy/q2^3 est constant.
