Index: /branches/ORCHIDEE_2_2/ORCHIDEE/src_parameters/constantes.f90
===================================================================
--- /branches/ORCHIDEE_2_2/ORCHIDEE/src_parameters/constantes.f90	(revision 8319)
+++ /branches/ORCHIDEE_2_2/ORCHIDEE/src_parameters/constantes.f90	(revision 8320)
@@ -894,16 +894,16 @@
     !Config Desc  = The maximum irrigation water injected per hour (kg.m^{-2}/hour)
     !Config If    = DO_IRRIGATION AND old_irrig_scheme = FALSE
-    !Config Def   = 1.
+    !Config Def   = 3.
     !Config Help  =
     !Config Units = [kg.m^{-2}/hour]
     CALL getin_p('IRRIG_DOSMAX',irrig_dosmax)
 
-    !Config Key   = CUM_NROOT_THR
-    !Config Desc  = Cumulated nroot threshoold to define root zone, and calculate water deficit for irrigation
-    !Config If    = DO_IRRIGATION AND old_irrig_scheme = FALSE
-    !Config Def   = 0.90
+    !Config Key   = CUM_DH_THR
+    !Config Desc  = Threshold depth to define root zone, and calculate water deficit for irrigation
+    !Config If    = DO_IRRIGATION=y AND OLD_IRRIG_SCHEME=n
+    !Config Def   = 0.64
     !Config Help  =
-    !Config Units = []
-    CALL getin_p('CUM_NROOT_THR',cum_nroot_thr)
+    !Config Units = [m]
+    CALL getin_p('CUM_DH_THR',cum_dh_thr)
 
     !Crop irrigation
@@ -938,5 +938,5 @@
     !Config Desc  = Max. fraction of routing reservoir volume that can be used for irrigation
     !Config If    = DO_IRRIGATION and old_irrig_scheme = FALSE
-    !Config Def   = 0.9,0.0,0.9
+    !Config Def   = 0.9,0.9,0.9
     !Config Help  =
     !Config Units = []
@@ -947,5 +947,5 @@
     !Config Desc  = Threshold multiplier of Target SM to calculate root deficit
     !Config If    = DO_IRRIGATION and old_irrig_scheme = FALSE
-    !Config Def   = 1.
+    !Config Def   = 0.9
     !Config Help  =
     !Config Units = []
@@ -1001,5 +1001,5 @@
     !Config Desc  = DO_IRRIGATION
     !Config If    = DO_IRRIGATION = T
-    !Config Def   = zero
+    !Config Def   = 0.05 
     !Config Help  =
     !Config Units = [FRACTION 0-1]
Index: /branches/ORCHIDEE_2_2/ORCHIDEE/src_parameters/constantes_var.f90
===================================================================
--- /branches/ORCHIDEE_2_2/ORCHIDEE/src_parameters/constantes_var.f90	(revision 8319)
+++ /branches/ORCHIDEE_2_2/ORCHIDEE/src_parameters/constantes_var.f90	(revision 8320)
@@ -501,8 +501,8 @@
  ! Parameters for irrigation scheme
  !
-  REAL(r_std), SAVE :: irrig_dosmax = 1.              !! The maximum irrigation water injected per hour (kg.m^{-2}/hour)
+  REAL(r_std), SAVE :: irrig_dosmax = 3.              !! The maximum irrigation water injected per hour (kg.m^{-2}/hour)
 !$OMP THREADPRIVATE(irrig_dosmax)
-  REAL(r_std), SAVE :: cum_nroot_thr = 0.90           !! Cumulated nroot threshoold to define root zone, and calculate water deficit for irrigation (-)
-!$OMP THREADPRIVATE(cum_nroot_thr)
+  REAL(r_std), SAVE :: cum_dh_thr = 0.64                !! Cumulated nroot threshoold to define root zone, and calculate water deficit for irrigation (-) 
+!$OMP THREADPRIVATE(cum_dh_thr) 
   LOGICAL, SAVE :: irrigated_soiltile = .FALSE.       !! Do we introduce a new soil tile for irrigated croplands? (true/false)
 !$OMP THREADPRIVATE(irrigated_soiltile)
@@ -511,9 +511,9 @@
   INTEGER, SAVE :: irrig_st = 3                       !! Which is the soil tile with irrigation flux
 !$OMP THREADPRIVATE(irrig_st)
-  REAL(r_std), SAVE, DIMENSION(3) :: avail_reserve = (/0.9,0.0,0.9/)     !! Available water from routing reservoirs, to withdraw for irrigation
+  REAL(r_std), SAVE, DIMENSION(3) :: avail_reserve = (/0.9,0.9,0.9/)     !! Available water from routing reservoirs, to withdraw for irrigation
                                                       !! IMPORTANT: As the routing model uses 3 reservoirs, dimension is set to 3
                                                       !! IMPORTANT: Order of available water must be in this order: streamflow, fast, and slow reservoir
 !$OMP THREADPRIVATE(avail_reserve)
-  REAL(r_std), SAVE :: beta_irrig = 1.                !! Threshold multiplier of Target SM to calculate root deficit(unitless)
+  REAL(r_std), SAVE :: beta_irrig = 0.9               !! Threshold multiplier of Target SM to calculate root deficit(unitless)
 !$OMP THREADPRIVATE(beta_irrig)
   REAL(r_std), SAVE :: lai_irrig_min = 0.1            !! Minimum LAI to trigger irrigation (kg.m^{-2}/hour)
@@ -528,5 +528,5 @@
                                                       !! Max value of reinf_slope in irrig_st  
 !$OMP THREADPRIVATE(reinf_slope_cropParam)
-  REAL, SAVE :: a_stream_adduction = zero             !! Externalized for available volume to adduction
+  REAL, SAVE :: a_stream_adduction = 0.05             !! Externalized for available volume to adduction
 !$OMP THREADPRIVATE(a_stream_adduction)
 
Index: /branches/ORCHIDEE_2_2/ORCHIDEE/src_sechiba/hydrol.f90
===================================================================
--- /branches/ORCHIDEE_2_2/ORCHIDEE/src_sechiba/hydrol.f90	(revision 8319)
+++ /branches/ORCHIDEE_2_2/ORCHIDEE/src_sechiba/hydrol.f90	(revision 8320)
@@ -2750,6 +2750,6 @@
     INTEGER(i_std)                                      :: iiref           !! To identify the mc_lins where k_lin and d_lin
                                                                            !! need special treatment
-    REAL(r_std), DIMENSION (kjpindex,nvm)               :: cum_nroot       !! local variable to acummulate nroot
-    INTEGER(i_std), DIMENSION (kjpindex,nvm)            :: nslm_pft_root   !! Deeper layer with cum_nroot > cum_nroot_thr per PFT,
+    REAL(r_std)                                         :: cum_dh          !! Depth to bottom layer 
+    INTEGER(i_std)                                      :: nslm_root_tmp   !! Temporal, deeper root zone soil layer 
     REAL(r_std), DIMENSION (kjpindex,nslm)              :: smf             !! Soil moisture of each layer at field capacity
                                                                            !!  @tex $(kg m^{-2})$ @endtex
@@ -2906,9 +2906,17 @@
     !! 2 Compute the root density profile if not ok_dynroot
     !!   For the case with ok_dynroot, the calculations are done at each time step in hydrol_soil
-    cum_nroot(:,:) = zero
-    nslm_pft_root(:,:) = nslm
+    cum_dh = zero
     nslm_root(:) =  nslm
+    nslm_root_tmp = nslm 
+    DO jsl =1, nslm 
+       IF( ( cum_dh ) < cum_dh_thr*mille) THEN  
+          cum_dh = cum_dh + dh(jsl) 
+          nslm_root_tmp = jsl 
+       ENDIF 
+    ENDDO 
+
+
     IF (.NOT. ok_dynroot) THEN
-       !! Calculation of nroot and of new nslm_root for irrigation 
+       !! Calculation of nroot 
        !! The three following equations concerning nroot computation are derived from the integrals
        !! of equations C9 to C11 of De Rosnay's (1999) PhD thesis (page 158).
@@ -2920,6 +2928,4 @@
           DO jv = 1,nvm
              DO ji=1, kjpindex
-                
-                
                 nroot(ji,jv,jsl) = (EXP(-humcste(jv)*zz(jsl)/mille)) * &
                      & (EXP(humcste(jv)*dz(jsl)/mille/deux) - &
@@ -2927,10 +2933,4 @@
                      & (EXP(-humcste(jv)*dz(2)/mille/deux) &
                      & -EXP(-humcste(jv)*zz(nslm)/mille))
-                !We acum. nroot, and change nslm_pft_root if necessary
-                cum_nroot(ji,jv) = cum_nroot(ji,jv) + nroot(ji,jv,jsl) !
-                
-                IF(cum_nroot(ji,jv) > cum_nroot_thr .AND. nslm_pft_root(ji,jv) .GE. jsl ) THEN
-                   nslm_pft_root(ji,jv) =  jsl
-                ENDIF
              ENDDO
              
@@ -2939,6 +2939,4 @@
        ENDDO
        !Last layer
-       !No need to put and IF here, if it is the case, nslm_pft_root is already
-       ! equal to nslm,
        DO jv = 1,nvm
           DO ji=1, kjpindex
@@ -2949,18 +2947,13 @@
           ENDDO
        ENDDO
-       !New loop to compute min. soil layer per cell, using just PFT that
-       !are not natural and exist inside the cell
-       DO jv=1, nvm
-          IF(.NOT. natural(jv)) THEN
-             DO ji=1,kjpindex
-                IF(veget_max(ji, jv) > min_sechiba) THEN
-                   nslm_root(ji) = MIN(nslm_root(ji), nslm_pft_root(ji,jv))
-                ENDIF
-             ENDDO
-          ENDIF
-       ENDDO
        
     END IF
 
+    DO ji=1,kjpindex 
+       IF ( SUM(veget_max(ji, : ), MASK= .NOT. (natural(:)) ) > min_sechiba) THEN 
+          nslm_root(ji) = nslm_root_tmp 
+       ENDIF 
+    ENDDO
+ 
     ! Calculates field capacity soil moisture per soil layers
     ! then calculate field capacity soil moisture over root zone
