Index: CONFIG/UNIFORM/v6/IPSLCM6.2/compile_ipslcm6.sh
===================================================================
--- CONFIG/UNIFORM/v6/IPSLCM6.2/compile_ipslcm6.sh	(revision 4642)
+++ CONFIG/UNIFORM/v6/IPSLCM6.2/compile_ipslcm6.sh	(revision 4643)
@@ -334,5 +334,5 @@
 echo >> $outfile
 suffix=_${resol_atm}_phylmd_para_mem_orch_couple.e
-echo gcm.e suffix = $suffix
+echo gcm suffix = $suffix
 
 if [ -f $modipsl/modeles/LMDZ/bin/gcm${suffix} ] ;  then 
Index: CONFIG/UNIFORM/v6/LMDZOR_v6.2/compile_lmdzor.sh
===================================================================
--- CONFIG/UNIFORM/v6/LMDZOR_v6.2/compile_lmdzor.sh	(revision 4642)
+++ CONFIG/UNIFORM/v6/LMDZOR_v6.2/compile_lmdzor.sh	(revision 4643)
@@ -18,4 +18,6 @@
 # Resolution of LMDZ in regular mode
 resol_atm=144x142x79
+# Also compile ce0l subprogram to LMDZ (y/n)
+ce0l=y
 
 # fcm_arch
@@ -25,4 +27,8 @@
 export fcm_arch parallel xios
 full_flag=""
+full_xios=""
+full_lmdz=""
+full_orch=""
+
 # Default netcdf_lib is used for XIOS but can be change by argument
 netcdf_lib=""
@@ -32,5 +38,5 @@
 outfile=$submitdir/out_compile_lmdzor.$datestr
 echo > $outfile
-echo; echo "Text output from compilation will be stored in file out_compile_lmdzor"; echo 
+echo; echo "Text output from compilation will be stored in file out_compile_lmdzor.$datestr"; echo 
 
 #### Read arguments 
@@ -38,6 +44,5 @@
 while (($# > 0)) ; do
     case $1 in
-	"-h") cat <<fin
-
+	"-h") cat <<end_help
 ########################################################################
 # Usage of the script compile_lmdzor.sh
@@ -62,42 +67,30 @@
 ./compile_lmdzor.sh -resol_atm 96x95x79
 
-fin
-	    exit;;
-
-	"-parallel")
-	    parallel=$2 ; shift ; shift ;; 
-	
-	"-arch")
-	    fcm_arch="$2" ; shift ; shift ;;
-	
-	"-xios")
-	    xios="$2" ; shift ; shift ;;
-	
-	"-debug")
-	    optmode=debug ; shift ;;
-
-	"-dev")
-	    optmode=dev ; shift ;;
-
-	"-prod")
-	    optmode=prod ; shift ;;
-
-	"-resol_atm")
-	    resol_atm=$2 ; shift ; shift ;;
-	
-	"-full")
-	    full_flag="-full"; shift ;;
-	
-        "-netcdf_lib_seq")
-            netcdf_lib="--netcdf_lib netcdf4_seq"; shift ;;
-
-	*)
-	    echo "unknown option "$2" , exiting..."
-	    exit 
+end_help
+exit;;
+	"-parallel") 	    parallel=$2 ; shift ; shift ;; 
+	"-arch")	    fcm_arch="$2" ; shift ; shift ;;
+	"-xios") 	    xios="$2" ; shift ; shift ;;
+	"-debug")	    optmode=debug ; shift ;;
+	"-dev") 	    optmode=dev ; shift ;;
+	"-prod")	    optmode=prod ; shift ;;
+	"-resol_atm")	    resol_atm=$2 ; shift ; shift ;;
+	"CE0L")             ce0l=y ; shift ;;
+	"-full")	    full_flag="-full"; shift ;;
+	"-full")            full_flag="-full"; full_xios="--full" ; full_lmdz="-full" ; full_orch="-full" ; shift ;;
+	"-full_xios")       full_xios="--full" ; shift ;;  # Note only full_xios is using double dash: --full
+	"-full_lmdz")       full_lmdz="-full"  ; shift ;;
+	"-full_orch")       full_orch="-full"  ; shift ;;
+	"-netcdf_lib_seq")  netcdf_lib="--netcdf_lib netcdf4_seq"; shift ;;
+	*)	            echo "unknown option "$2" , exiting..." ; exit 
     esac
 done
 
-echo "Following arguments are set in current compiling:" >> $outfile 
-echo "   optmode = $optmode, parallel = $parallel, fcm_arch = $fcm_arch, full_flag=$full_flag resol_atm=${resol_atm}" >> $outfile 
+echo "Following options are set in current compiling:" >> $outfile 
+echo "   resol_atm=${resol_atm}" >> $outfile 
+echo "   ce0l=${ce0l}" >> $outfile 
+echo "   optmode = $optmode, parallel = $parallel, fcm_arch = $fcm_arch " >> $outfile 
+echo "   full_flag=$full_flag, full_xios=$full_xios, full_lmdz=$full_lmdz, full_orch=$full_orch" >> $outfile 
+echo "   parallel = $parallel, fcm_arch = $fcm_arch" >> $outfile 
 echo >> $outfile
 
@@ -171,6 +164,6 @@
 echo; echo "NOW COMPILE XIOS"
 echo >> $outfile ; echo " NOW COMPILE XIOS"   >> $outfile 
-echo ./make_xios --$optmode --arch $fcm_arch --arch_path $arch_path ${netcdf_lib} --job 4 $full_flag   >> $outfile 
-     ./make_xios --$optmode --arch $fcm_arch --arch_path $arch_path ${netcdf_lib} --job 4 $full_flag   >> $outfile 2>&1
+echo ./make_xios --$optmode --arch $fcm_arch --arch_path $arch_path ${netcdf_lib} --job 4 $full_xios   >> $outfile 
+     ./make_xios --$optmode --arch $fcm_arch --arch_path $arch_path ${netcdf_lib} --job 4 $full_xios   >> $outfile 2>&1
 # Test if compiling succeded 
 if [[ $? != 0 ]] ; then 
@@ -192,6 +185,6 @@
 echo >> $outfile ; echo " NOW COMPILE ORCHIDEE"   >> $outfile 
 
-echo 	./makeorchidee_fcm -j 8 -xios -parallel $parallel -$optmode -arch ${fcm_arch} -arch_path $arch_path $full_flag -driver   >> $outfile 
-        ./makeorchidee_fcm -j 8 -xios -parallel $parallel -$optmode -arch ${fcm_arch} -arch_path $arch_path $full_flag -driver    >> $outfile 2>&1
+echo 	./makeorchidee_fcm -j 8 -xios -parallel $parallel -$optmode -arch ${fcm_arch} -arch_path $arch_path $full_orch -driver   >> $outfile 
+        ./makeorchidee_fcm -j 8 -xios -parallel $parallel -$optmode -arch ${fcm_arch} -arch_path $arch_path $full_orch -driver    >> $outfile 2>&1
 # Test if compiling finished
 if [[ $? != 0 ]] ; then
@@ -199,4 +192,8 @@
     exit
 fi
+
+# Rename executables to contain $optmode
+if [ -f $modipsl/bin/orchidee_ol ] ; then mv $modipsl/bin/orchidee_ol  $modipsl/bin/orchidee_ol_${optmode} ; fi
+if [ -f $modipsl/bin/orchideedriver ] ; then mv $modipsl/bin/orchideedriver  $modipsl/bin/orchideedriver_${optmode} ; fi
 
 
@@ -220,6 +217,6 @@
 fi
 
-echo ./makelmdz_fcm -d ${resol_atm} -p lmd -rrtm true -$optmode -mem -parallel $parallel -io xios -v orchidee2.1 -arch $fcm_arch -arch_path $arch_path -j 8 $full_flag gcm    >> $outfile 
-./makelmdz_fcm -d ${resol_atm} -p lmd -rrtm true -$optmode -mem -parallel $parallel -io xios -v orchidee2.1 -arch $fcm_arch -arch_path $arch_path -j 8 $full_flag gcm    >> $outfile 2>&1
+echo ./makelmdz_fcm -d ${resol_atm} -p lmd -rrtm true -$optmode -mem -parallel $parallel -io xios -v orchidee2.1 -arch $fcm_arch -arch_path $arch_path -j 8 $full_lmdz gcm    >> $outfile 
+./makelmdz_fcm -d ${resol_atm} -p lmd -rrtm true -$optmode -mem -parallel $parallel -io xios -v orchidee2.1 -arch $fcm_arch -arch_path $arch_path -j 8 $full_lmdz gcm    >> $outfile 2>&1
 # Test if compiling finished
 if [[ $? != 0 ]] ; then
@@ -228,35 +225,71 @@
 fi
 
-# Compile ce0l initialization program for LMDZ regular lat-lon exectuable
-echo; echo "NOW COMPILE CE0L OF LMDZ. Resolution = ${resol_atm}"
-echo >> $outfile ; echo " NOW COMPILE CE0L OF LMDZ. Resolution = ${resol_atm}"   >> $outfile 
-    
-echo ./makelmdz_fcm -d ${resol_atm} -p lmd -rrtm true -$optmode -mem -parallel $parallel -io xios -v orchidee2.1 -arch $fcm_arch -arch_path $arch_path -j 8 $full_flag ce0l    >> $outfile 
-./makelmdz_fcm -d ${resol_atm} -p lmd -rrtm true -$optmode -mem -parallel $parallel -io xios -v orchidee2.1 -arch $fcm_arch -arch_path $arch_path -j 8 $full_flag ce0l    >> $outfile 2>&1
-# Test if compiling finished
-if [[ $? != 0 ]] ; then
-    echo "THERE IS A PROBLEM IN CE0L (LMDZ) REGULAR LATLON COMPILATION - STOP"
-    exit
-fi
+# Move executables to modipsl/bin folder
+echo >> $outfile
+echo "Move gcm.e executable to modipsl/bin" >> $outfile
+echo ls -lrt $modipsl/modeles/LMDZ/bin   >> $outfile
+ls -lrt $modipsl/modeles/LMDZ/bin  >> $outfile
+echo >> $outfile
 
 # Find executable suffix
 if [ $parallel == seq ] || [ $parallel == none ] ; then
-    suffix=_${resol_atm}_phylmd_seq_orch
+    suffix=_${resol_atm}_phylmd_seq_orch.e
 else
-    suffix=_${resol_atm}_phylmd_para_mem_orch
-fi
-echo suffix = $suffix
-
-# Move executables to modipsl/bin folder
-echo "Move gcm.e and ce0l executable to modipsl/bin"
-if [ -f $modipsl/modeles/LMDZ/bin/gcm${suffix}.e ] ;  then mv $modipsl/modeles/LMDZ/bin/gcm${suffix}.e $modipsl/bin/gcm_${resol_atm}_${optmode}.e ; fi
-if [ -f $modipsl/modeles/LMDZ/bin/ce0l${suffix}.e ] ;  then mv $modipsl/modeles/LMDZ/bin/ce0l${suffix}.e $modipsl/bin/ce0l_${resol_atm}_${optmode}.e ; fi
+    suffix=_${resol_atm}_phylmd_para_mem_orch.e
+fi
+echo gcm suffix = $suffix
+
+if [ -f $modipsl/modeles/LMDZ/bin/gcm${suffix} ] ;  then 
+    mv $modipsl/modeles/LMDZ/bin/gcm${suffix} $modipsl/bin/gcm_${resol_atm}_${optmode}.e
+else
+    echo "ERROR gcm${suffix} executable does not exist." 
+    echo "THERE IS A PROBLEM IN LMDZ REGULAR LATLON COMPILATION - STOP"
+    exit
+fi  
+
+
+# Compile ce0l initialization program for LMDZ regular lat-lon exectuable
+if [ $ce0l == y ] ; then
+    echo; echo "NOW COMPILE CE0L OF LMDZ. Resolution = ${resol_atm}"
+    echo >> $outfile ; echo " NOW COMPILE CE0L OF LMDZ. Resolution = ${resol_atm}"   >> $outfile 
+    
+    echo ./makelmdz_fcm -d ${resol_atm} -p lmd -rrtm true -$optmode -mem -parallel $parallel -io xios -v orchidee2.1 -arch $fcm_arch -arch_path $arch_path -j 8 $full_lmdz ce0l    >> $outfile 
+    ./makelmdz_fcm -d ${resol_atm} -p lmd -rrtm true -$optmode -mem -parallel $parallel -io xios -v orchidee2.1 -arch $fcm_arch -arch_path $arch_path -j 8 $full_lmdz ce0l    >> $outfile 2>&1
+    # Test if compiling finished
+    if [[ $? != 0 ]] ; then
+	echo "THERE IS A PROBLEM IN CE0L (LMDZ) REGULAR LATLON COMPILATION - STOP"
+	exit
+    fi
+
+    
+    # Move executables to modipsl/bin folder
+    echo >> $outfile
+    echo "Move ce0l.e executable to modipsl/bin" >> $outfile
+    echo ls -lrt $modipsl/modeles/LMDZ/bin   >> $outfile
+    ls -lrt $modipsl/modeles/LMDZ/bin  >> $outfile
+    echo >> $outfile
+    echo ce0l suffix = $suffix
+
+    if [ -f $modipsl/modeles/LMDZ/bin/ce0l${suffix} ] ;  then 
+	mv $modipsl/modeles/LMDZ/bin/ce0l${suffix} $modipsl/bin/ce0l_${resol_atm}_${optmode}.e
+    else
+	echo "ERROR ce0l${suffix} executable does not exist." 
+	echo "THERE IS A PROBLEM IN CE0L (LMDZ) REGULAR LATLON COMPILATION - STOP"
+	exit
+    fi  
+fi
 
 
 echo >>$outfile ; echo "ALL COMPILING FINISHED" >> $outfile
-echo; echo "ALL COMPILING FINISHED"
+echo ls -lrt modipsl/bin >> $outfile
+ls -lrt $modipsl/bin >> $outfile
+
+echo; echo "ALL COMPILING FINISHED" ; echo
+echo "Executables are found in modipsl/bin"
+echo "Check that executable names correspond with the name set in config.card before launching the job"
+echo ls -lrt modipsl/bin
+ls -lrt $modipsl/bin
 
 date
+
 exit
-
-
