Index: branches/ORCHIDEE_2_2/ORCHIDEE/orchidee.default
===================================================================
--- branches/ORCHIDEE_2_2/ORCHIDEE/orchidee.default	(revision 7199)
+++ branches/ORCHIDEE_2_2/ORCHIDEE/orchidee.default	(revision 7200)
@@ -112,6 +112,18 @@
 #*******************************************************************************************
 
-# SOILTYPE_CLASSIF ([-]) :  Type of classification used for the map of soil types  	{!IMPOSE_VEG}
-SOILTYPE_CLASSIF =  zobler 
+# SOILTYPE_CLASSIF ([-]) :  Type of soil texture classification (for hydraulic and thermic properties)  	{!IMPOSE_VEG}
+SOILTYPE_CLASSIF =  zobler
+
+# SPMIPEXP ([-]) : For alternative ways to prescribe hydraulic soil parameters (thermic params still defined from soil texture)
+#   maps to read maps of soil parameter as in the SP-MIP project
+#   unif to impose uniforme texture over the globe (4 texture options, see UNIF_CASE, with parameter values imposed by SP-MIP)
+#   texture for default behavior in which all soil parameters stem from soil texture
+SPMIPEXP = texture
+
+# UNIF_CASE ([-]) to define one of 4 uniform textures: 'a' for loamy sand, 'b' for loam, 'c' for silt, 'd' for clay {SPMIPEXP}
+UNIF_CASE = b
+
+# KFACT_ROOT_TYPE ([-]): var or cons, to make kfact_root=1 throughout the soil (no impact of roots on ks profile)
+KFACT_ROOT_TYPE = var
 
 # RIVER_ROUTING ([FLAG]) :  Decides if we route the water or not 	{OK_SECHIBA}
Index: branches/ORCHIDEE_2_2/ORCHIDEE/src_sechiba/hydrol.f90
===================================================================
--- branches/ORCHIDEE_2_2/ORCHIDEE/src_sechiba/hydrol.f90	(revision 7199)
+++ branches/ORCHIDEE_2_2/ORCHIDEE/src_sechiba/hydrol.f90	(revision 7200)
@@ -794,5 +794,4 @@
     ENDDO
 
-    !salma: added config key of KFACT_ROOT_TYPE
     !! KFACT_ROOT_TYPE = cons is used to impose that kfact_root = 1 in every soil layer,
     !! so that ks does not increase in the rootzone; else, kfact_root defined as usual
@@ -803,10 +802,10 @@
     !Config Help  = can have two values: 'cons' or 'var'. If var then no changes, if cons then kfact_root=un
     !Config Units = [mm/d]
+    kfact_root_type = 'var'
     CALL getin_p("KFACT_ROOT_TYPE",kfact_root_type)
 
     IF (kfact_root_type=='cons') THEN
-    kfact_root(:,:,:) = un
+       kfact_root(:,:,:) = un
     ENDIF
-    !end salma: added config key
 
     !
Index: branches/ORCHIDEE_2_2/ORCHIDEE/src_sechiba/slowproc.f90
===================================================================
--- branches/ORCHIDEE_2_2/ORCHIDEE/src_sechiba/slowproc.f90	(revision 7199)
+++ branches/ORCHIDEE_2_2/ORCHIDEE/src_sechiba/slowproc.f90	(revision 7200)
@@ -2810,5 +2810,5 @@
     REAL(r_std), DIMENSION(nbpt)                         :: aparam            !! Availability of the parameter interpolation
     CHARACTER(LEN=80)                                    :: spmipexp          !! designing the number of sp-mip experiment
-    CHARACTER(LEN=80)                                    :: exp               !! designing the model of experiment 4 (sp_mip)
+    CHARACTER(LEN=80)                                    :: unif_case               !! designing the model of experiment 4 (sp_mip)
 
     REAL(r_std)                                          :: vmin, vmax       !! min/max values to use for the 
@@ -2842,40 +2842,30 @@
     IF (printlev_loc>=3) WRITE (numout,*) 'slowproc_soilt'
 
-    ! Salma: sp_mip_experiment: select experiment:exp1, exp2, exp3 or exp4 in run.def
-    !   exp1: Reading the soil parameter maps of SPMIP
-    !   exp2: Reading a usda soil texture map, with 12 USDA classes + Oxisols
-    !         Works for SP-MIP textur emap based on SoilGrids, Reynolds, and any map with USDA classes
-    !   exp3: Reading the Zobler soil texture map
-    !   exp4: Imposing uniform soil texture over the globe (4 texture options, with parameter values imposed by SP-MIP)
-    ! We read a soil texture map in all experiments but exp4.
-    ! Even with exp1, some parameters are defined based on texture.
-    
-    ! IMPORTANT: if no exp is defined in run.def, the model works as before, by deriving the soil parameters 
-    ! from a soil texture map, itself defined by the SOILTYPE_CLASSIF keyword, and soil_classif variable:
-    !   if soil_classif = zobler, spmipexp = exp3
-    !   if soil_classif = usda, spmipexp = exp2
-    ! For the SP-MIP experiments made by Salma Tafasca, exp1 was made by reading the SPMIP soil texture map (for clayfraction, etc.)
+    ! The soil parameters are defined by several keywords in run.def:
+    ! (a) soil_classif tells which kind of soil texture map you will read (mandatory):
+    !    - usda for 12 USDA texture classes (Reynolds, SoilGrids, SPMIP, etc) updated to 13 classes
+    !      for clay oxisols by Salma Tafasca
+    !    - zobler to read teh Zobler map and reduce it to 3 classes (fine, medium, coarse)
+    ! (b) spmipexp was introduced by Salma Tafasca for the SPMIP project  
+    !   maps: Reading the soil parameter maps of SPMIP
+    !   unif: Imposing uniform soil texture over the globe (4 texture options, with parameter values imposed by SP-MIP)
+    ! Even with maps, some parameters (thermics) are defined based on texture.
+    ! So we read a soil texture map in all experiments but unif, where soil texture is imposed by njsc(:).
+    ! (c) unif_case to choose the soil texture assigned if spmipexp=maps (4 hard_coded possibilities)
+    
+    ! IMPORTANT: if no spmipexp is defined in run.def, the model works as before, by deriving the soil parameters 
+    ! from a soil texture map, itself defined by the SOILTYPE_CLASSIF keyword, and soil_classif variable
     ! But to get a uniform texture (exp 4), you need to select a soil texture map using soil_classif, even if it's not read
-    ! WARNING: if you choose the zobler map with usda/exp2, the simulation will run, but not as you probably wish.
-
-    SELECTCASE (soil_classif) ! copied from src-parameters/control.f90
-    CASE ('zobler','none')
-       spmipexp='exp3'
-    CASE ('usda')
-       spmipexp='exp2'
-    CASE DEFAULT
-       WRITE(numout,*) "Unsupported soil type classification: soil_classif=",soil_classif
-       WRITE(numout,*) "Choose between zobler, usda and none according to the map"
-       CALL ipslerr_p(3,'control_initialize','Bad choice of soil_classif','Choose between zobler, usda and none','')
-    ENDSELECT
-
-    !Config Key   = spmipexp
-    !Config Desc  = number of sp_mip experiment
-    !Config Help  = possible values: exp1, exp2, exp3 and exp4
+
+    !Config Key   = SPMIPEXP
+    !Config Desc  = Types of alternative hydraulic parameters
+    !Config Def   = 'texture'
+    !Config Help  = possible values: maps, unif
     !Config Units = [-]
+    spmipexp='texture' ! default is to define parameters from soil texture, with soil_classif = 'zobler' or 'usda'
     CALL getin_p("SPMIPEXP",spmipexp)
 
-    IF (spmipexp == 'exp4') THEN
-       ! case where exp4 is selected: uniform soil parameters
+    IF (spmipexp == 'unif') THEN
+       ! case where unif=exp4 is selected: uniform soil parameters
        ! the values of the hydraulic parameters below come from SP-MIP,
        ! and correspond to the Rosetta PTF (Schaap et al., 2001)
@@ -2883,11 +2873,13 @@
        ! sp_mip_experiment_4: select another level of experiment: a, b, c or d in run.def
 
-       !Config Key   = EXP4
-       !Config Desc  = number of sp_mip experiment 4
+       !Config Key   = UNIF_CASE
+       !Config Desc  = Types of uniform soil textures in SPMIP
+       !Config Def   = 'b'
        !Config Help  = possible values: a, b, c and d
        !Config Units = [-]
-       CALL getin_p("EXP4",exp)
-
-       SELECTCASE (exp)
+       unif_case='b' ! default = loamy soil
+       CALL getin_p("UNIF_CASE",unif_case)
+
+       SELECTCASE (unif_case)
 
        CASE ('a') ! loamy sand
@@ -2897,5 +2889,5 @@
          ! njsc=2
           DO ib=1 , nbpt
-             njsc=2
+             njsc(ib) = 2
              mcr(ib) = 0.049
              mcs(ib) = 0.39
@@ -2913,6 +2905,7 @@
           sandfraction=0.4
           siltfraction=0.4
-          njsc=6
+          !njsc=6
           DO ib=1, nbpt
+             njsc(ib) = 6
              mcr(ib) = 0.061
              mcs(ib) = 0.399
@@ -2930,6 +2923,7 @@
           sandfraction=0.06
           siltfraction=0.84
-          njsc=5
+          !njsc=5
           DO ib=1, nbpt
+             njsc(ib)=5
              mcr(ib) = 0.05
              mcs(ib) = 0.489
@@ -2947,6 +2941,7 @@
           sandfraction=0.15
           siltfraction=0.3
-          njsc=12
+          !njsc=12
           DO ib=1, nbpt
+             njsc(ib)=12
              mcr(ib) = 0.098
              mcs(ib) = 0.459
@@ -2967,8 +2962,8 @@
        ENDSELECT
 
-    ELSE !if we are here then it's either exp1, exp2 or exp3
+    ELSE ! spmipexp is either exp1=maps, or texture for exp2 or exp3 (or typing error!)
        
-       !  Needs to be a configurable variable
-       !
+       ! In these cases (maps or texture), we need to read the soil texture map
+       
        !Config Key   = SOILCLASS_FILE
        !Config Desc  = Name of file from which soil types are read
@@ -3426,5 +3421,7 @@
        ENDDO
 
-       IF (spmipexp == 'exp1') THEN
+       ! End of soil texture reading, for 'maps' and classical behavior
+       
+       IF (spmipexp == 'maps') THEN
               IF (printlev_loc>=3) WRITE (numout,*) 'slowproc_soilt: Read soil hydraulic parameters with IOIPSL'
 
@@ -3514,28 +3511,33 @@
               WRITE(numout,*) 'nvan map read _______'
 
-      ELSE
-          IF (spmipexp == 'exp2') THEN
-            ! Texture map from SP-MIP, thus Soilgrids modified
-            nvan(:) = nvan_usda(njsc(:))
-            avan(:) = avan_usda(njsc(:))
-            mcr(:) = mcr_usda(njsc(:))
-            mcs(:) = mcs_usda(njsc(:))
-            ks(:) = ks_usda(njsc(:))
-            mcfc(:) = mcf_usda(njsc(:))
-            mcw(:) = mcw_usda(njsc(:))
-            ! on aura pcent(:) = pcent(njsc(:)) dans hydrol
-         ELSE
-            ! salma: here we are in exp3 -- Zobler map
-            nvan(:) = nvan_fao(njsc(:))
-            avan(:) = avan_fao(njsc(:))
-            mcr(:) = mcr_fao(njsc(:))
-            mcs(:) = mcs_fao(njsc(:))
-            ks(:) = ks_fao(njsc(:))
-            mcfc(:) = mcf_fao(njsc(:))
-            mcw(:) = mcw_fao(njsc(:))
-
-          ENDIF !if EXP2
-       ENDIF !if EXP1
-     ENDIF !if EXP4
+       ELSE ! spmipexp is not maps nor unif, then it must be texture
+         IF (spmipexp == 'texture') THEN
+            IF (soil_classif == 'usda') THEN
+               ! Texture map from SP-MIP, thus Soilgrids modified
+               nvan(:) = nvan_usda(njsc(:))
+               avan(:) = avan_usda(njsc(:))
+               mcr(:) = mcr_usda(njsc(:))
+               mcs(:) = mcs_usda(njsc(:))
+               ks(:) = ks_usda(njsc(:))
+               mcfc(:) = mcf_usda(njsc(:))
+               mcw(:) = mcw_usda(njsc(:))
+               ! on aura pcent(:) = pcent(njsc(:)) dans hydrol
+            ELSE ! soil_classif == 'zobler' or 'none'
+               ! salma: here we are in exp3 -- Zobler map
+               nvan(:) = nvan_fao(njsc(:))
+               avan(:) = avan_fao(njsc(:))
+               mcr(:) = mcr_fao(njsc(:))
+               mcs(:) = mcs_fao(njsc(:))
+               ks(:) = ks_fao(njsc(:))
+               mcfc(:) = mcf_fao(njsc(:))
+               mcw(:) = mcw_fao(njsc(:))
+            ENDIF !if spmipexp is texture       
+         ELSE ! if spmipexp is not among texture or maps or unif
+            WRITE(numout,*) "Unsupported spmipexp=",spmipexp
+            WRITE(numout,*) "Choose between texture, maps, and unif"
+            CALL ipslerr_p(3,'soilproc_soilt','Bad choice of spmipexp','Choose between texture, maps, and unif','')
+         ENDIF
+       ENDIF
+   ENDIF ! SPMIPEXP 
              
     ! Write diagnostics
