Index: LMDZ5/trunk/makelmdz
===================================================================
--- LMDZ5/trunk/makelmdz	(revision 1771)
+++ LMDZ5/trunk/makelmdz	(revision 1772)
@@ -98,26 +98,30 @@
   case $1 in
       "-h") cat <<fin
-manuel complet sur http://...
 Usage :
-makegcm [options] exec
-[-h]                       : manuel abrege
-[-d [[IMx]JMx]LM]          : IM, JM, LM sont les dims en x, y, z (def: $dim)
-[-p PHYS]                  : compilation avec la physique libf/phyPHYS, (def: lmd)
-[-prod / -dev / -debug]    : compilation en mode production (default) / developpement / debug .
-[-c false/MPI1/MPI2]       : couple ocean : MPI1/MPI2/false (def: false)
-[-v false/true]            : avec ou sans vegetation (def: false)
-[-chimie INCA/false]       : avec ou sans model de chimie INCA (def: false)
-[-parallel none/mpi/omp/mpi_omp] : parallelisation (default: none) : mpi, openmp ou mixte mpi_openmp
-[-g GRI]                   : conf. grille dans dyn3d/GRI_xy.h  (def: reg inclue un zoom)
-[-io IO]                   : choix d une librairie I/O, experts (def: ioipsl)
-[-include INCLUDES]        : variables supplementaires pour include
-[-cpp CPP_KEY]             : cle cpp supplementaires
-[-adjnt]                   : adjoint, a remettre en route ...
-[-mem]                     : version memoire reduite (si en mode parallele)
-[-filtre NOMFILTRE]        : prend le filtre dans libf/NOMFILTRE (def: filtrez)
-[-link LINKS]              : liens optionels avec d autres librairies
-[-ext_src path]            : chemin d un repertoire source avec des sources externe a compiler avec le modele
-[-arch nom_arch]           : nom de l architecture cible
- exec                      : executable genere
+makelmdz [options] -arch nom_arch exec
+[-h]                       : brief help
+[-d [[IMx]JMx]LM]          : IM, JM, LM are the dimensions in x, y, z (default: $dim)
+[-p PHYS]                  : set of physical parametrizations (in libf/phyPHYS), (default: lmd)
+[-prod / -dev / -debug]    : compilation mode production (default) / developement / debug
+[-c false/MPI1/MPI2]       : coupling with ocean model : MPI1/MPI2/false (default: false)
+[-v false/orchidee2.0/orchidee1.9/true] : version of the vegetation model to include (default: false)
+          false       : no vegetation model
+          orchidee2.0 : compile using ORCHIDEE 2.0 (or more recent version)
+          orchidee1.9 : compile using ORCHIDEE up to the version including OpenMP in ORCHIDEE : tag 1.9-1.9.5(version AR5)-1.9.6
+          true        : (obsolete; for backward compatibility) use ORCHIDEE tag 1.9-1.9.6
+[-chimie INCA/false]       : with INCA chemistry model or without (default: false)
+[-parallel none/mpi/omp/mpi_omp] : parallelism (default: none) : mpi, openmp or mixted mpi_openmp
+[-g GRI]                   : grid configuration in dyn3d/GRI_xy.h  (default: reg, inclues a zoom)
+[-io IO]                   : Input/Output library (default: ioipsl)
+[-include INCLUDES]        : extra include path to add
+[-cpp CPP_KEY]             : additional preprocessing definitions
+[-adjnt]                   : adjoint model, not operational ...
+[-mem]                     : reduced memory dynamics (if in parallel mode)
+[-filtre NOMFILTRE]        : use filtre from libf/NOMFILTRE (default: filtrez)
+[-link LINKS]              : additional links with other libraries
+[-fcm_path path]           : path to the fcm tool (default: tools/fcm/bin)
+[-ext_src path]            : path to an additional set of routines to compile with the model
+ -arch nom_arch            : target architecture 
+ exec                      : executable to build
 fin
 	  exit;;
@@ -125,8 +129,4 @@
 	  dim=$2 ; shift ; shift ;;
       
-      "-O")
-	  echo "option obsolete dans ce makegcm"
-	  exit;;
-
       "-p")
 	  physique="$2" ;  shift ; shift ;;
@@ -166,5 +166,5 @@
 
       "-adjnt")
-	  echo "option a reactiver ";exit
+	  echo "not operational ... work to be done here ";exit
 	  opt_dep="$opt_dep adjnt" ; adjnt="-ladjnt -ldyn3d "
 	  optim="$optim -Dadj" ; shift ;;
@@ -351,9 +351,31 @@
 fi
 
-if [[ "$veget" == "true" ]]
-then
+if [[ "$veget" == "orchidee2.0" ]]
+then
+# orchidee2.0 : 
+# Compile with ORCHIDEE 2.0 (or more recent)
+   CPP_KEY="$CPP_KEY CPP_VEGET"
+   INCLUDE="${INCLUDE} -I${ORCH_INCDIR}"
+   LIB="${LIB} -L${ORCH_LIBDIR} -l${LIBPREFIX}orchidee "
+elif [[ "$veget" == "orchidee1.9" ]]
+then
+# orchidee1.9 : 
+# Compile with ORCHIDEE version up to the inclusion of OpenMP in ORCHIDEE : tag 1.9-1.9.5(version AR5)-1.9.6
+   CPP_KEY="$CPP_KEY CPP_VEGET ORCHIDEE_NOOPENMP"
+   INCLUDE="${INCLUDE} -I${ORCH_INCDIR}"
+   LIB="${LIB} -L${ORCH_LIBDIR} -l${LIBPREFIX}sechiba -l${LIBPREFIX}parameters -l${LIBPREFIX}stomate -l${LIBPREFIX}parallel -l${LIBPREFIX}orglob"
+elif [[ "$veget" == "true" ]]
+then
+# true : 
+# Obsolete, for backward compatibility. To be used with ORCHIDEE tag 1.9-1.9.6
+# For this case, cpp flag ORCHIDEE_NOOPENMP must be added to the makelmdz_fcm arguments
    CPP_KEY="$CPP_KEY CPP_VEGET"
    INCLUDE="${INCLUDE} -I${ORCH_INCDIR}"
    LIB="${LIB} -L${ORCH_LIBDIR} -l${LIBPREFIX}sechiba -l${LIBPREFIX}parameters -l${LIBPREFIX}stomate -l${LIBPREFIX}parallel -l${LIBPREFIX}orglob"
+elif [[ "$veget" != "false" ]]
+then
+   echo "Option -v $veget does not exist"
+   echo "Use ./makelmdz -h for more information"
+   exit 
 fi
 
@@ -479,5 +501,5 @@
 fi
 
-if [[ $veget == "true" ]]
+if [[ $veget != "false" ]]
 then
   SUFF_NAME=${SUFF_NAME}_orch
Index: LMDZ5/trunk/makelmdz_fcm
===================================================================
--- LMDZ5/trunk/makelmdz_fcm	(revision 1771)
+++ LMDZ5/trunk/makelmdz_fcm	(revision 1772)
@@ -57,27 +57,30 @@
   case $1 in
       "-h") cat <<fin
-manuel complet sur http://...
 Usage :
-makegcm [options] -m arch exec
-[-h]                       : manuel abrÃ©gÃ©
-[-d [[IMx]JMx]LM]          : IM, JM, LM sont les dims en x, y, z (def: $dim)
-[-p PHYS]                  : compilation avec la physique libf/phyPHYS, (def: lmd)
-[-prod / -dev / -debug]    : compilation en mode production (default) / developpement / debug .
-[-c false/MPI1/MPI2]       : couplÃ© ocÃ©an : MPI1/MPI2/false (def: false)
-[-v false/true]            : avec ou sans vÃ©gÃ©tation (def: false)
-[-chimie INCA/false]       : avec ou sans model de chimie INCA (def: false)
-[-parallel none/mpi/omp/mpi_omp] : parallelisation (default: none) : mpi, openmp ou mixte mpi_openmp
-[-g GRI]                   : conf. grille dans dyn3d/GRI_xy.h  (def: reg inclue un zoom)
-[-io IO]                   : choix d'une librairie I/O, experts (def: ioipsl)
-[-include INCLUDES]        : variables supplementaires pour include
-[-cpp CPP_KEY]             : cle cpp supplementaires
-[-adjnt]                   : adjoint, a remettre en route ...
-[-mem]                     : version memoire reduite (si en mode parallele)
-[-filtre NOMFILTRE]        : prend le filtre dans libf/NOMFILTRE (def: filtrez)
-[-link LINKS]              : liens optionels avec d'autres librairies
-[-fcm_path path]           : chemin pour fcm (def: tools/fcm/bin)
-[-ext_src path]            : chemin d'un repertoire source avec des sources externe a compiler avec le modele
- -arch nom_arch            : nom de l'architecture cible
- exec                      : exÃ©cutable gÃ©nÃ©rÃ©
+makelmdz_fcm [options] -arch nom_arch exec
+[-h]                       : brief help
+[-d [[IMx]JMx]LM]          : IM, JM, LM are the dimensions in x, y, z (default: $dim)
+[-p PHYS]                  : set of physical parametrizations (in libf/phyPHYS), (default: lmd)
+[-prod / -dev / -debug]    : compilation mode production (default) / developement / debug
+[-c false/MPI1/MPI2]       : coupling with ocean model : MPI1/MPI2/false (default: false)
+[-v false/orchidee2.0/orchidee1.9/true] : version of the vegetation model to include (default: false)
+          false       : no vegetation model
+          orchidee2.0 : compile using ORCHIDEE 2.0 (or more recent version)
+          orchidee1.9 : compile using ORCHIDEE up to the version including OpenMP in ORCHIDEE : tag 1.9-1.9.5(version AR5)-1.9.6
+          true        : (obsolete; for backward compatibility) use ORCHIDEE tag 1.9-1.9.6
+[-chimie INCA/false]       : with INCA chemistry model or without (default: false)
+[-parallel none/mpi/omp/mpi_omp] : parallelism (default: none) : mpi, openmp or mixted mpi_openmp
+[-g GRI]                   : grid configuration in dyn3d/GRI_xy.h  (default: reg, inclues a zoom)
+[-io IO]                   : Input/Output library (default: ioipsl)
+[-include INCLUDES]        : extra include path to add
+[-cpp CPP_KEY]             : additional preprocessing definitions
+[-adjnt]                   : adjoint model, not operational ...
+[-mem]                     : reduced memory dynamics (if in parallel mode)
+[-filtre NOMFILTRE]        : use filtre from libf/NOMFILTRE (default: filtrez)
+[-link LINKS]              : additional links with other libraries
+[-fcm_path path]           : path to the fcm tool (default: tools/fcm/bin)
+[-ext_src path]            : path to an additional set of routines to compile with the model
+ -arch nom_arch            : target architecture 
+ exec                      : executable to build
 fin
 	  exit;;
@@ -86,8 +89,4 @@
 	  dim=$2 ; shift ; shift ;;
       
-      "-O")
-	  echo "option obsolete dans cette version intermediaire de makegcm"
-	  exit;;
-
       "-p")
 	  physique="$2" ;  shift ; shift ;;
@@ -127,5 +126,5 @@
 
       "-adjnt")
-	  echo "option a reactiver ";exit
+	  echo "not operational ... work to be done here ";exit
 	  opt_dep="$opt_dep adjnt" ; adjnt="-ladjnt -ldyn3d "
 	  optim="$optim -Dadj" ; shift ;;
@@ -249,9 +248,31 @@
 fi
 
-if [[ "$veget" == "true" ]]
-then
+if [[ "$veget" == "orchidee2.0" ]]
+then
+# orchidee2.0 : 
+# Compile with ORCHIDEE 2.0 (or more recent)
+   CPP_KEY="$CPP_KEY CPP_VEGET"
+   INCLUDE="${INCLUDE} -I${ORCH_INCDIR}"
+   LIB="${LIB} -L${ORCH_LIBDIR} -l${LIBPREFIX}orchidee "
+elif [[ "$veget" == "orchidee1.9" ]]
+then
+# orchidee1.9 : 
+# Compile with ORCHIDEE version up to the inclusion of OpenMP in ORCHIDEE : tag 1.9-1.9.5(version AR5)-1.9.6
+   CPP_KEY="$CPP_KEY CPP_VEGET ORCHIDEE_NOOPENMP"
+   INCLUDE="${INCLUDE} -I${ORCH_INCDIR}"
+   LIB="${LIB} -L${ORCH_LIBDIR} -l${LIBPREFIX}sechiba -l${LIBPREFIX}parameters -l${LIBPREFIX}stomate -l${LIBPREFIX}parallel -l${LIBPREFIX}orglob"
+elif [[ "$veget" == "true" ]]
+then
+# true : 
+# Obsolete, for backward compatibility. To be used with ORCHIDEE tag 1.9-1.9.6
+# For this case, cpp flag ORCHIDEE_NOOPENMP must be added to the makelmdz_fcm arguments
    CPP_KEY="$CPP_KEY CPP_VEGET"
    INCLUDE="${INCLUDE} -I${ORCH_INCDIR}"
    LIB="${LIB} -L${ORCH_LIBDIR} -l${LIBPREFIX}sechiba -l${LIBPREFIX}parameters -l${LIBPREFIX}stomate -l${LIBPREFIX}parallel -l${LIBPREFIX}orglob"
+elif [[ "$veget" != "false" ]]
+then
+   echo "Option -v $veget does not exist"
+   echo "Use ./makelmdz_fcm -h for more information"
+   exit 
 fi
 
@@ -395,5 +416,5 @@
 fi
 
-if [[ $veget == "true" ]]
+if [[ $veget != "false" ]]
 then
   SUFF_NAME=${SUFF_NAME}_orch
