Index: LMDZ6/trunk/makelmdz
===================================================================
--- LMDZ6/trunk/makelmdz	(revision 4566)
+++ LMDZ6/trunk/makelmdz	(revision 4567)
@@ -17,4 +17,9 @@
 couple=false
 veget=false
+inlandsis=false
+rrtm=false
+rad="oldrad"
+dust=false
+strataer=false
 chimie=false
 parallel=none
@@ -27,9 +32,5 @@
 cosp2=false
 cospv2=false
-inlandsis=false
-rrtm=false
-rad=""
-dust=false
-strataer=false
+
 full=""
 
@@ -110,10 +111,10 @@
 [-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)
+[-c false/MPI1/OMCT]       : coupling with ocean model : MPI1/OMCT/false (default: false)
 [-v false/orchideetrunk/orchidee2.1/orchidee2.0/orchidee1.9] : version of the vegetation model to include (default: false)
           false       : no vegetation model
           orchideetrunk : compile using ORCHIDEE trunk from revision 7757 or higher
           orchidee2.1 : compile using ORCHIDEE 2.1 until 4.1 included or until revision 7757 on the trunk
-          orchidee2.0 : compile using ORCHIDEE 2.0 (or more recent version)
+          orchidee2.0 : compile using ORCHIDEE 2.0
           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
@@ -125,6 +126,6 @@
 [-rrtm true/false]    : compile with/without rrtm package (default: false)
 [-rad oldrad/rrtm/ecrad]    : compile with oldrad/rrtm/ecrad radiatif code (default: oldrad)
-[-dust true/false]    : compile with/without the dust package from Boucher et al. (default: false)
-[-strataer true/false]    : compile with/without the strat aer package from Boucher et al. (default: false)
+[-dust true/false]    : compile with/without the dust package by Boucher and co (default: false)
+[-strataer true/false]    : compile with/without the strat aer package by Boucher and co (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)
@@ -135,6 +136,6 @@
 [-mem]                     : reduced memory dynamics (obsolete flag; always on in parallel mode)
 [-filtre NOMFILTRE]        : use filtre from libf/NOMFILTRE (default: filtrez)
-[-full]                    : Full (re)compilation (from scratch)
 [-link LINKS]              : additional links with other libraries
+[-full]                    : full recompiling 
 [-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
@@ -171,25 +172,4 @@
 	  veget="$2" ; shift ; shift ;;
 
-      "-chimie")
-	  chimie="$2" ; shift ; shift ;;
-
-      "-parallel")
-	  parallel="$2" ; shift ; shift ;;
-      
-      "-include")
-	  INCLUDE="$INCLUDE -I$2" ; shift ; shift ;;
-
-      "-cpp")
-	  CPP_KEY="$CPP_KEY $2" ; shift ; shift ;;
-
-      "-cosp")
-          cosp="$2" ; shift ; shift ;;
-
-      "-cosp2")
-          cosp2="$2" ; shift ; shift ;;
-
-      "-cosp2")
-          cospv2="$2" ; shift ; shift ;;
-      
       "-inlandsis")
           inlandsis="$2" ; shift ; shift ;;  
@@ -207,4 +187,25 @@
           strataer="$2" ; shift ; shift ;;
       
+      "-chimie")
+	  chimie="$2" ; shift ; shift ;;
+
+      "-parallel")
+	  parallel="$2" ; shift ; shift ;;
+      
+      "-include")
+	  INCLUDE="$INCLUDE -I$2" ; shift ; shift ;;
+
+      "-cpp")
+	  CPP_KEY="$CPP_KEY $2" ; shift ; shift ;;
+
+      "-cosp")
+          cosp="$2" ; shift ; shift ;;
+
+      "-cosp2")
+          cosp2="$2" ; shift ; shift ;;
+
+      "-cospv2")
+          cospv2="$2" ; shift ; shift ;;
+      
       "-mem")
           echo "option -mem is obsolete (now always on in parallel)"
@@ -214,15 +215,15 @@
 	  filtre=$2 ; shift ; shift ;;
 
+      "-link")
+	  LIB="$LIB $2" ; shift ; shift ;;
+
+      "-fcm_path")
+	  fcm_path=$2 ; shift ; shift ;;
+
+      "-ext_src")
+	  EXT_SRC=$2 ; src_dirs="$src_dirs $EXT_SRC" ; shift ; shift ;;
+
       "-full")
       full="full" ; shift ;;
-
-      "-link")
-	  LIB="$LIB $2" ; shift ; shift ;;
-
-      "-fcm_path")
-	  fcm_path=$2 ; shift ; shift ;;
-
-      "-ext_src")
-	  EXT_SRC=$2 ; src_dirs="$src_dirs $EXT_SRC" ; shift ; shift ;;
 
       "-arch")
@@ -364,8 +365,8 @@
    lib_phy='-lphy'"$physique"' -lphy_common'
    CPP_KEY="$CPP_KEY CPP_PHYS"
-   if [[ $phys_root == "lmd" ]]
-      then
-      #For lmd physics, default planet type is Earth
-      CPP_KEY="$CPP_KEY CPP_EARTH"
+   if [[ "${phys_root}" == "lmd" ]]
+   then
+   #For lmd physics, default planet type is Earth
+   CPP_KEY="$CPP_KEY CPP_EARTH"
    fi
 fi
@@ -475,4 +476,34 @@
 fi
 
+if [[ "$inlandsis" == "true" ]]
+then
+   CPP_KEY="$CPP_KEY CPP_INLANDSIS"
+   src_dirs="$src_dirs phy${physique}/inlandsis"
+fi
+
+
+if [[ "$rad" == "rrtm" ]]
+then
+   CPP_KEY="$CPP_KEY CPP_RRTM"
+   src_dirs="$src_dirs phy${physique}/rrtm"
+fi
+if [[ "$rad" == "ecrad" ]]
+then
+   CPP_KEY="$CPP_KEY CPP_ECRAD"
+   src_dirs="$src_dirs phy${physique}/ecrad"
+fi
+
+if [[ "$dust" == "true" ]]
+then
+   CPP_KEY="$CPP_KEY CPP_Dust"
+   src_dirs="$src_dirs phy${physique}/Dust"
+fi
+
+if [[ "$strataer" == "true" ]]
+then
+   CPP_KEY="$CPP_KEY CPP_StratAer"
+   src_dirs="$src_dirs phy${physique}/StratAer"
+fi
+
 #===============================================================================
 INCLUDE="$INCLUDE ${NETCDF95_INCDIR}"
@@ -524,33 +555,4 @@
 
 
-if [[ "$inlandsis" == "true" ]]
-then
-   CPP_KEY="$CPP_KEY CPP_INLANDSIS"
-   src_dirs="$src_dirs phy${physique}/inlandsis"
-fi
-
-
-if [[ "$rad" == "rrtm" ]]
-then
-   CPP_KEY="$CPP_KEY CPP_RRTM"
-   src_dirs="$src_dirs phy${physique}/rrtm"
-fi
-if [[ "$rad" == "ecrad" ]]
-then
-   CPP_KEY="$CPP_KEY CPP_ECRAD"
-   src_dirs="$src_dirs phy${physique}/ecrad"
-fi
-
-if [[ "$dust" == "true" ]]
-then
-   CPP_KEY="$CPP_KEY CPP_Dust"
-   src_dirs="$src_dirs phy${physique}/Dust"
-fi
-
-if [[ "$strataer" == "true" ]]
-then
-   CPP_KEY="$CPP_KEY CPP_StratAer"
-   src_dirs="$src_dirs phy${physique}/StratAer"
-fi
 
 #add new ocean skin modelisation to source dir by default
@@ -804,39 +806,5 @@
 # Execution du make
 #################################################################
-echo $makecommand RANLIB=$ranlib -f $LMDGCM/makefile \
-OPTION_DEP="$opt_dep" OPTION_LINK="$LIB ${PARA_LD}" \
-OPTIM90="${COMPIL_FFLAGS} ${PARA_FFLAGS}" \
-OPTIMTRU90="${COMPIL_FFLAGS} ${PARA_FFLAGS}" \
-OPTIM="${COMPIL_FFLAGS} ${PARA_FFLAGS}" \
-INCLUDE="$INCLUDE" \
-$filtre \
-LIBO=${LIBOGCM}/${nomlib} \
-"PHYS=$physique" \
-LIBPHY=${LIBPHY} \
-LIBPHY_COMMON=${LIBPHY_COMMON} \
-LIBDYN_PHYS=${LIBDYN_PHYS} \
-DIM=$dimc \
-FLAG_PARA=$FLAG_PARA \
-L_PHY="$lib_phy" \
-L_DYN_PHY="$libdyn_phy" \
-L_ADJNT=$adjnt \
-L_COSP="$lcosp" \
-L_COSP2="$lcosp2" \
-L_COSPV2="$lcospv2" \
-L_CHIMIE="$libchimie" \
-LOCAL_DIR="$localdir"  \
-F77="$fcompiler" \
-F90="$fcompiler" \
-OPLINK="$LIB" \
-LINK="$linker" \
-GCM="$LMDGCM" \
-MOD_LOC_DIR=$mod_loc_dir \
-MOD_SUFFIX="mod" \
-AR=$arcommand \
-ARFLAGS="$arflags" \
-DIRMAIN=$dirmain \
-SOURCE=$source_code \
-PROG=$code
-
+set -v
 $makecommand RANLIB=$ranlib -f $LMDGCM/makefile \
 OPTION_DEP="$opt_dep" OPTION_LINK="$LIB ${PARA_LD}" \
@@ -874,4 +842,5 @@
 PROG=$code
 
+set +v
 
 if [[ -r $LIBFGCM/grid/dimensions.h ]]
