Index: BOL/script_install_amaury/install_lmdz.sh
===================================================================
--- BOL/script_install_amaury/install_lmdz.sh	(revision 5078)
+++ BOL/script_install_amaury/install_lmdz.sh	(revision 5083)
@@ -85,5 +85,5 @@
     fi
 
-    optim_debug=""
+    optim_flag="-prod"
     arch="local"
 
@@ -174,5 +174,5 @@
                          esac;;
             "-bench") bench=$2; shift; shift;;
-            "-debug") optim_debug=-debug; shift;;
+            "-debug") optim_flag="-debug"; shift;;
             "-name") MODEL=$2; shift; shift;;
             "-netcdf") netcdf=$2; shift; shift;;
@@ -496,5 +496,5 @@
     echo "Compiling IOIPSL, the interface library with Netcdf $(date) (log: $ioipsllog)"
 
-    echo "$jobcmd ./makeioipsl_fcm -j $make_j -arch $arch" > compile.sh
+    echo "$jobcmd ./makeioipsl_fcm -j $make_j -arch $arch $optim_flag" > compile.sh
     chmod +x compile.sh
     echo "Compiling IOIPSL using $(\cat compile.sh)"
@@ -584,5 +584,5 @@
         echo "Compiling ORCHIDEE, the continental surface model (log $orchideelog) $(date)"
 
-        local xios_orchid opt_orc
+        local xios_orchid
         if [[ $with_xios = 1 ]]; then
             xios_orchid="-xios";
@@ -590,14 +590,9 @@
             xios_orchid="-noxios"
         fi
-        if [[ $optim_debug = "-debug" ]]; then
-            opt_orc="-debug";
-        else
-            opt_orc="-prod"
-        fi
 
         if [[ $parallel != "none" && ! -d src_parallel ]]; then
            echo "STOP: Orchidee version too old for parallel support"; exit 1
         fi
-        echo "$jobcmd ./makeorchidee_fcm -j $make_j $xios_orchid $opt_orc -parallel $parallel -arch $arch" > compile.sh
+        echo "$jobcmd ./makeorchidee_fcm -j $make_j $xios_orchid $optim_flag -parallel $parallel -arch $arch" > compile.sh
         chmod +x compile.sh
         echo "Compiling ORCHIDEE using $(\cat compile.sh)"
@@ -663,5 +658,5 @@
 
     # Compile
-    makelmdz="makelmdz_fcm $optim_debug -arch $arch -j $make_j"
+    makelmdz="makelmdz_fcm $optim_flag -arch $arch -j $make_j"
     local para_compile_opt="-mem -parallel $parallel"; if [[ $parallel = "none" ]]; then para_compile_opt=""; fi
     echo "$jobcmd ./$makelmdz $opt_rad $opt_cosp $opt_makelmdz_xios $opt_aer $opt_inlandsis $opt_isotopes -p $compphysiq -d ${grid_resolution} -v $fcm_veget_version $para_compile_opt gcm" > compile.sh
@@ -677,5 +672,5 @@
         echo "STOP: Compilation failed, can't find the executable"; exit 1
     else
-        echo "Compilation successfull, the executable is $exe_name $(date)"
+        echo "Compilation successful, the executable is $exe_name $(date)"
     fi
 }
