Index: /CONFIG/UNIFORM/v7/ICOLMDZORINCA_v7/compile_icolmdzorinca.sh
===================================================================
--- /CONFIG/UNIFORM/v7/ICOLMDZORINCA_v7/compile_icolmdzorinca.sh	(revision 5957)
+++ /CONFIG/UNIFORM/v7/ICOLMDZORINCA_v7/compile_icolmdzorinca.sh	(revision 5958)
@@ -30,4 +30,7 @@
 full_orch=""
 full_dyna=""
+ico_only=no
+reg_only=no
+ce0l=no
 optchimie=GES
 resol_atm="144x142x79"
@@ -73,4 +76,12 @@
 ./compile_icolmdzorinca.sh -chimie DUSS 
 
+Example 6: Compile only ico grid 
+./compile_icolmdzorinca.sh -ico_only
+
+Example 7: Compile only reg grid 
+./compile_icolmdzorinca.sh -reg_only
+
+Example 8 : compile create_etat0_limit (and gcm.e) 
+./compile_icolmdzorinca.sh -ce0l
 
 end_help
@@ -89,4 +100,7 @@
 	"-full_orch")       full_orch="-full"  ; shift ;;
 	"-full_dyna")       full_dyna="-full"  ; shift ;;
+	"-ico_only")        ico_only=yes  ; shift ;;
+	"-reg_only")        reg_only=yes  ; shift ;;
+	"-ce0l")            ce0l=yes  ; shift ;;
         "-netcdf_lib_seq")  netcdf_lib="--netcdf_lib netcdf4_seq"; shift ;;
 	"-chimie") 	    optchimie=$2; shift ; shift;;
@@ -258,110 +272,117 @@
 ## 2.4 Compile lmdz
 cd $modipsl/modeles/LMDZ
-# Compile LMDZ as library to couple to DYNAMICO
-echo; echo "NOW COMPILE LMDZ FOR COUPLING TO DYNAMICO"
-echo >> $outfile ; echo " NOW COMPILE LMDZ FOR COUPLING TO DYNAMICO"   >> $outfile 
-
-# Check if the compilation of LMDZ was previsouly interupted prematured. 
-# In that case, the files dimension.h and .lock exist. If the files exist, they are here removed to avoid makelmdz_fcm 
-# to ask question and wait for interactivly answer from the user.
-if [ -f libf/grid/dimensions.h ] || [ -f .lock ] ; then
-  echo >> $outfile
-  echo " WARNING!! The file LMDZ/libf/grid/dimension.h and/or the LMDZ/.lock exist. "   >> $outfile
-  echo "           This means that the compilation is either currently on going in another terminal was previous interupted before the end."   >> $outfile
-  echo "           The files dimension.h and .lock will now be removed. "   >> $outfile
-  echo >> $outfile
-  rm -f libf/grid/dimensions.h
-  rm -f .lock
-fi
-
-echo ./makelmdz_fcm -p lmd -rrtm true -cosp true -$optmode -mem -parallel $parallel -libphy -v orchidee2.1 -chimie INCA -io xios -arch $fcm_arch -j 8 $full_lmdz    >> $outfile 
-     ./makelmdz_fcm -p lmd -rrtm true -cosp true -$optmode -mem -parallel $parallel -libphy -v orchidee2.1 -chimie INCA -io xios -arch $fcm_arch -j 8 $full_lmdz    >> $outfile 2>&1
-# Test if compiling finished
-if [[ $? != 0 ]] ; then
-    echo "THERE IS A PROBLEM IN LMDZ PHYSICS COMPILATION - STOP"
-    echo "ALL INFORMATION IN FILE $outfile"
-    exit
-fi
+
+if [ $reg_only = no ] ; then 
+
+    # Compile LMDZ as library to couple to DYNAMICO
+    echo; echo "NOW COMPILE LMDZ FOR COUPLING TO DYNAMICO"
+    echo >> $outfile ; echo " NOW COMPILE LMDZ FOR COUPLING TO DYNAMICO"   >> $outfile 
+
+    # Check if the compilation of LMDZ was previsouly interupted prematured. 
+    # In that case, the files dimension.h and .lock exist. If the files exist, they are here removed to avoid makelmdz_fcm 
+    # to ask question and wait for interactivly answer from the user.
+    if [ -f libf/grid/dimensions.h ] || [ -f .lock ] ; then
+	echo >> $outfile
+	echo " WARNING!! The file LMDZ/libf/grid/dimension.h and/or the LMDZ/.lock exist. "   >> $outfile
+	echo "           This means that the compilation is either currently on going in another terminal was previous interupted before the end."   >> $outfile
+	echo "           The files dimension.h and .lock will now be removed. "   >> $outfile
+	echo >> $outfile
+	rm -f libf/grid/dimensions.h
+	rm -f .lock
+    fi
+
+    echo ./makelmdz_fcm -p lmd -rrtm true -cosp true -$optmode -mem -parallel $parallel -libphy -v orchidee2.1 -chimie INCA -io xios -arch $fcm_arch -j 8 $full_lmdz    >> $outfile 
+    ./makelmdz_fcm -p lmd -rrtm true -cosp true -$optmode -mem -parallel $parallel -libphy -v orchidee2.1 -chimie INCA -io xios -arch $fcm_arch -j 8 $full_lmdz    >> $outfile 2>&1
+    # Test if compiling finished
+    if [[ $? != 0 ]] ; then
+	echo "THERE IS A PROBLEM IN LMDZ PHYSICS COMPILATION - STOP"
+	echo "ALL INFORMATION IN FILE $outfile"
+	exit
+    fi
 
 
 ## 2.5 Compile DYNAMICO
-cd $modipsl/modeles/DYNAMICO
-echo; echo "NOW COMPILE DYNAMICO "
-echo >> $outfile ; echo " NOW COMPILE DYNAMICO"   >> $outfile 
-
-echo ./make_icosa -$optmode -parallel $parallel -external_ioipsl -with_xios -arch $fcm_arch -arch_path $arch_path -job 8 $full_dyna    >> $outfile 
-     ./make_icosa -$optmode -parallel $parallel -external_ioipsl -with_xios -arch $fcm_arch -arch_path $arch_path -job 8 $full_dyna    >> $outfile 2>&1
-# Test if compiling finished
-if [[ $? != 0 ]] ; then
-    echo "THERE IS A PROBLEM IN DYNAMICO COMPILATION - STOP"
-    echo "ALL INFORMATION IN FILE $outfile"
-    exit
-fi
-
-## 2.6 Compile interface ICOSA_LMDZ
-cd $modipsl/modeles/ICOSA_LMDZ
-echo; echo "NOW COMPILE ICOSA_LMDZ "
-echo >> $outfile ; echo " NOW COMPILE ICOSA_LMDZ"   >> $outfile 
-
-echo ./make_icosa_lmdz -nodeps -p lmd -$optmode -parallel $parallel -with_orchidee -with_inca -arch ${fcm_arch} -arch_path ${arch_path} -job 8 $full_dyna    >> $outfile 
-     ./make_icosa_lmdz -nodeps -p lmd -$optmode -parallel $parallel -with_orchidee -with_inca -arch ${fcm_arch} -arch_path ${arch_path} -job 8 $full_dyna    >> $outfile 2>&1
-# Test if compiling finished
-if [[ $? != 0 ]] ; then
-    echo "THERE IS A PROBLEM IN ICOSA_LMDZ COMPILATION - STOP"
-    echo "ALL INFORMATION IN FILE $outfile"
-    exit
-fi
-# Move executables to modipsl/bin
-if [ $modipsl/modeles/ICOSA_LMDZ/bin/icosa_lmdz.exe ] ; then 
-    mv $modipsl/modeles/ICOSA_LMDZ/bin/icosa_lmdz.exe $modipsl/bin/icosa_lmdz_${optmode}_${optchimie}.exe
-else
-    echo "THERE IS A PROBLEM IN ICOSA_LMDZ COMPILATION EXECUTABLE MISSING - STOP"
-    echo "ALL INFORMATION IN FILE $outfile"
-    exit
-fi
-
+    cd $modipsl/modeles/DYNAMICO
+    echo; echo "NOW COMPILE DYNAMICO "
+    echo >> $outfile ; echo " NOW COMPILE DYNAMICO"   >> $outfile 
+
+    echo ./make_icosa -$optmode -parallel $parallel -external_ioipsl -with_xios -arch $fcm_arch -arch_path $arch_path -job 8 $full_dyna    >> $outfile 
+    ./make_icosa -$optmode -parallel $parallel -external_ioipsl -with_xios -arch $fcm_arch -arch_path $arch_path -job 8 $full_dyna    >> $outfile 2>&1
+    # Test if compiling finished
+    if [[ $? != 0 ]] ; then
+	echo "THERE IS A PROBLEM IN DYNAMICO COMPILATION - STOP"
+	echo "ALL INFORMATION IN FILE $outfile"
+	exit
+    fi
+
+    ## 2.6 Compile interface ICOSA_LMDZ
+    cd $modipsl/modeles/ICOSA_LMDZ
+    echo; echo "NOW COMPILE ICOSA_LMDZ "
+    echo >> $outfile ; echo " NOW COMPILE ICOSA_LMDZ"   >> $outfile 
+
+    echo ./make_icosa_lmdz -nodeps -p lmd -$optmode -parallel $parallel -with_orchidee -with_inca -arch ${fcm_arch} -arch_path ${arch_path} -job 8 $full_dyna    >> $outfile 
+    ./make_icosa_lmdz -nodeps -p lmd -$optmode -parallel $parallel -with_orchidee -with_inca -arch ${fcm_arch} -arch_path ${arch_path} -job 8 $full_dyna    >> $outfile 2>&1
+    # Test if compiling finished
+    if [[ $? != 0 ]] ; then
+	echo "THERE IS A PROBLEM IN ICOSA_LMDZ COMPILATION - STOP"
+	echo "ALL INFORMATION IN FILE $outfile"
+	exit
+    fi
+    # Move executables to modipsl/bin
+    if [ $modipsl/modeles/ICOSA_LMDZ/bin/icosa_lmdz.exe ] ; then 
+	mv $modipsl/modeles/ICOSA_LMDZ/bin/icosa_lmdz.exe $modipsl/bin/icosa_lmdz_${optmode}_${optchimie}.exe
+    else
+	echo "THERE IS A PROBLEM IN ICOSA_LMDZ COMPILATION EXECUTABLE MISSING - STOP"
+	echo "ALL INFORMATION IN FILE $outfile"
+	exit
+    fi
+fi 
 
 
 ## 2.7 Compile LMDZ for regular latlon configuration
 
-
-cd $modipsl/modeles/LMDZ
-# Compile LMDZ regular lat-lon exectuable
-echo; echo "NOW COMPILE LMDZ REGULAR LAT-LON MODE. Resolution = ${resol_atm}"
-echo >> $outfile ; echo " NOW COMPILE LMDZ REGULAR LAT-LON MODE. Resolution = ${resol_atm}"   >> $outfile 
-
-# Check if the compilation of LMDZ was previsouly interupted prematured. 
-# In that case, the files dimension.h and .lock exist. If the files exist, they are here removed to avoid makelmdz_fcm 
-# to ask question and wait for interactivly answer from the user.
-if [ -f libf/grid/dimensions.h ] || [ -f .lock ] ; then
-    echo >> $outfile
-    echo " WARNING!! The file LMDZ/libf/grid/dimension.h and/or the LMDZ/.lock exist. "   >> $outfile
-    echo "           This means that the compilation is either currently on going in another terminal was previous interupted before the end."   >> $outfile
-    echo "           The files dimension.h and .lock will now be removed. "   >> $outfile
-    echo >> $outfile
-    rm -f libf/grid/dimensions.h
-    rm -f .lock
-fi
-echo ./makelmdz_fcm -d ${resol_atm} -p lmd -rrtm true -$optmode -mem -parallel $parallel -io xios -v orchidee2.1 -chimie INCA -arch $fcm_arch -j 8 $full_lmdz gcm    >> $outfile 
-./makelmdz_fcm -d ${resol_atm} -p lmd -rrtm true -$optmode -mem -parallel $parallel -io xios -v orchidee2.1 -chimie INCA -arch $fcm_arch -j 8 $full_lmdz gcm    >> $outfile 2>&1
-# Test if compiling finished
-if [[ $? != 0 ]] ; then
-    echo "THERE IS A PROBLEM IN LMDZ REGULAR LATLON COMPILATION - STOP"
-    echo "ALL INFORMATION IN FILE $outfile"
-    exit
-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 -chimie INCA -arch $fcm_arch -j 8 $full_lmdz ce0l    >> $outfile 
-./makelmdz_fcm -d ${resol_atm} -p lmd -rrtm true -$optmode -mem -parallel $parallel -io xios -v orchidee2.1 -chimie INCA -arch $fcm_arch -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"
-    echo "ALL INFORMATION IN FILE $outfile"
-    exit
-fi
+if [ $ico_only = no ] ; then 
+    cd $modipsl/modeles/LMDZ
+    # Compile LMDZ regular lat-lon exectuable
+    echo; echo "NOW COMPILE LMDZ REGULAR LAT-LON MODE. Resolution = ${resol_atm}"
+    echo >> $outfile ; echo " NOW COMPILE LMDZ REGULAR LAT-LON MODE. Resolution = ${resol_atm}"   >> $outfile 
+    
+    # Check if the compilation of LMDZ was previsouly interupted prematured. 
+    # In that case, the files dimension.h and .lock exist. If the files exist, they are here removed to avoid makelmdz_fcm 
+    # to ask question and wait for interactivly answer from the user.
+    if [ -f libf/grid/dimensions.h ] || [ -f .lock ] ; then
+	echo >> $outfile
+	echo " WARNING!! The file LMDZ/libf/grid/dimension.h and/or the LMDZ/.lock exist. "   >> $outfile
+	echo "           This means that the compilation is either currently on going in another terminal was previous interupted before the end."   >> $outfile
+	echo "           The files dimension.h and .lock will now be removed. "   >> $outfile
+	echo >> $outfile
+	rm -f libf/grid/dimensions.h
+	rm -f .lock
+    fi
+    echo ./makelmdz_fcm -d ${resol_atm} -p lmd -rrtm true -$optmode -mem -parallel $parallel -io xios -v orchidee2.1 -chimie INCA -arch $fcm_arch -j 8 $full_lmdz gcm    >> $outfile 
+    ./makelmdz_fcm -d ${resol_atm} -p lmd -rrtm true -$optmode -mem -parallel $parallel -io xios -v orchidee2.1 -chimie INCA -arch $fcm_arch -j 8 $full_lmdz gcm    >> $outfile 2>&1
+    # Test if compiling finished
+    if [[ $? != 0 ]] ; then
+	echo "THERE IS A PROBLEM IN LMDZ REGULAR LATLON COMPILATION - STOP"
+	echo "ALL INFORMATION IN FILE $outfile"
+	exit
+    fi
+fi 
+
+
+if [ $ce0l = yes ] ; then 
+    # 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 -chimie INCA -arch $fcm_arch -j 8 $full_lmdz ce0l    >> $outfile 
+    ./makelmdz_fcm -d ${resol_atm} -p lmd -rrtm true -$optmode -mem -parallel $parallel -io xios -v orchidee2.1 -chimie INCA -arch $fcm_arch -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"
+	echo "ALL INFORMATION IN FILE $outfile"
+	exit
+    fi
+fi 
 
 # Find executable suffix
