Index: CONFIG/UNIFORM/v7/IPSLCM7/compile_ipslcm7.sh
===================================================================
--- CONFIG/UNIFORM/v7/IPSLCM7/compile_ipslcm7.sh	(revision 6639)
+++ CONFIG/UNIFORM/v7/IPSLCM7/compile_ipslcm7.sh	(revision 6640)
@@ -48,7 +48,5 @@
 
 # orchversion tells if ORCHIDEE_2_2 or ORCHIDEE_trunk is compiled. This is used as argument and also in the suffix of the executables.
-# orchcomp is the key word needed for LMDZ for the compilation of coherent interface. Only used internal to the compilation script.
 orchversion=orch22
-orchcomp=orchidee2.1
 
 # Default netcdf_lib is used for XIOS but can be change by argument
@@ -129,6 +127,6 @@
 	"-cleannemo")  full_nemo=y ; shift ;;
 	"-rad")        rad=$2; shift ; shift ;;
-	"-orch22")     orchversion="orch22"; orchcomp=orchidee2.1; shift ;;
-	"-orch4")      orchversion="orch4"; orchcomp=orchideetrunk; shift ;;
+	"-orch22")     orchversion="orch22"; shift ;;
+	"-orch4")      orchversion="orch4";  shift ;;
 	"-chimie")     optchimie=$2; shift ; shift;;
 	*)	       echo "unknown option "$1" , exiting..." ; exit
@@ -148,4 +146,13 @@
 echo >> $outfile
 
+### Verification of argument
+# Set argorch depeinding on the version of ORCHIDEE. This is argument needed for the compilation of LMDZ to consider coherent interface. 
+if [ $orchversion == orch22 ] ; then
+    argorch=orchidee2.1
+elif [ $orchversion == orch4 ] ; then
+    argorch=orchideetrunk
+else
+    echo "ERROR in version of ORCHIDEE. It is only possible to have orch22 or orch4 for now"
+fi
 
 ### Read host dependent default values
@@ -469,6 +476,7 @@
 	argoasis=" "
     fi
-    echo ./makelmdz_fcm -p lmd $argoasis $opt_rad -$optmode -mem -parallel $parallel -libphy -v $orchcomp $arginca  -io xios -arch $fcm_arch -arch_path $arch_path -j 8 $full_lmdz    >> $outfile 
-    ./makelmdz_fcm -p lmd $argoasis $opt_rad -$optmode -mem -parallel $parallel -libphy -v $orchcomp $arginca  -io xios -arch $fcm_arch -arch_path $arch_path -j 8 $full_lmdz    >> $outfile 2>&1
+
+    echo ./makelmdz_fcm -p lmd $argoasis $opt_rad -$optmode -mem -parallel $parallel -libphy -v $argorch $arginca  -io xios -arch $fcm_arch -arch_path $arch_path -j 8 $full_lmdz    >> $outfile 
+    ./makelmdz_fcm -p lmd $argoasis $opt_rad -$optmode -mem -parallel $parallel -libphy -v $argorch $arginca  -io xios -arch $fcm_arch -arch_path $arch_path -j 8 $full_lmdz    >> $outfile 2>&1
     
     
@@ -570,6 +578,6 @@
 	argoasis=""
     fi
-    echo ./makelmdz_fcm -d ${resol_atm} $argoasis -p lmd $opt_rad -$optmode -mem -parallel $parallel $arginca  -io xios -v $orchcomp -arch $fcm_arch -arch_path $arch_path -j 8 $full_lmdz gcm    >> $outfile 
-         ./makelmdz_fcm -d ${resol_atm} $argoasis -p lmd $opt_rad -$optmode -mem -parallel $parallel $arginca  -io xios -v $orchcomp -arch $fcm_arch -arch_path $arch_path -j 8 $full_lmdz gcm    >> $outfile 2>&1
+    echo ./makelmdz_fcm -d ${resol_atm} $argoasis -p lmd $opt_rad -$optmode -mem -parallel $parallel $arginca  -io xios -v $argorch -arch $fcm_arch -arch_path $arch_path -j 8 $full_lmdz gcm    >> $outfile 
+         ./makelmdz_fcm -d ${resol_atm} $argoasis -p lmd $opt_rad -$optmode -mem -parallel $parallel $arginca  -io xios -v $argorch -arch $fcm_arch -arch_path $arch_path -j 8 $full_lmdz gcm    >> $outfile 2>&1
     # Test if compiling finished
     if [[ $? != 0 ]] ; then
@@ -634,6 +642,6 @@
     echo >> $outfile ; echo " NOW COMPILE CE0L OF LMDZ. Resolution = ${resol_atm}"   >> $outfile 
 
-    echo ./makelmdz_fcm -d ${resol_atm} $argoasis -p lmd -rrtm true -$optmode -mem -parallel $parallel -io xios -v $orchcomp -arch $fcm_arch -arch_path $arch_path -j 8 $full_lmdz ce0l    >> $outfile 
-         ./makelmdz_fcm -d ${resol_atm} $argoasis -p lmd -rrtm true -$optmode -mem -parallel $parallel -io xios -v $orchcomp -arch $fcm_arch -arch_path $arch_path -j 8 $full_lmdz ce0l    >> $outfile 2>&1
+    echo ./makelmdz_fcm -d ${resol_atm} $argoasis -p lmd -rrtm true -$optmode -mem -parallel $parallel -io xios -v $argorch -arch $fcm_arch -arch_path $arch_path -j 8 $full_lmdz ce0l    >> $outfile 
+         ./makelmdz_fcm -d ${resol_atm} $argoasis -p lmd -rrtm true -$optmode -mem -parallel $parallel -io xios -v $argorch -arch $fcm_arch -arch_path $arch_path -j 8 $full_lmdz ce0l    >> $outfile 2>&1
     # Test if compiling finished
     if [[ $? != 0 ]] ; then
