Index: CONFIG/UNIFORM/v7/IPSLCM7/compile_ipslcm7.sh
===================================================================
--- CONFIG/UNIFORM/v7/IPSLCM7/compile_ipslcm7.sh	(revision 6638)
+++ CONFIG/UNIFORM/v7/IPSLCM7/compile_ipslcm7.sh	(revision 6639)
@@ -318,77 +318,77 @@
 
 
+## 2.5 Compile NEMO
 if [ $compnemo == y ] ; then
-## 2.5 Compile NEMO
-nemo_root=$modipsl/modeles/NEMO
-cfg_ref=ORCA2_ICE_PISCES
-cfg_wrk=ORCA_ICE_TRC
-addkeys="key_oasis3 key_top key_si3 key_isf"
-delkeys=""
-
-if [ ${nemotop} == n ] ; then
-   cfg_wrk=ORCA_ICE
-   delkeys="key_top"
-fi
-
-if [ ${nemotop} == n ] ; then
-   echo; echo "NOW COMPILE NEMO with ice model SI3 without passive tracer model TOP"
-   echo >> $outfile ; echo " NOW COMPILE NEMO with ice model SI3 without passive tracer model TOP"   >> $outfile
+    nemo_root=$modipsl/modeles/NEMO
+    cfg_ref=ORCA2_ICE_PISCES
+    cfg_wrk=ORCA_ICE_TRC
+    addkeys="key_oasis3 key_top key_si3 key_isf"
+    delkeys=""
+    
+    if [ ${nemotop} == n ] ; then
+	cfg_wrk=ORCA_ICE
+	delkeys="key_top"
+    fi
+    
+    if [ ${nemotop} == n ] ; then
+	echo; echo "NOW COMPILE NEMO with ice model SI3 without passive tracer model TOP"
+	echo >> $outfile ; echo " NOW COMPILE NEMO with ice model SI3 without passive tracer model TOP"   >> $outfile
+    else
+	echo; echo "NOW COMPILE NEMO with ice model SI3 and passive tracer model TOP"
+	echo >> $outfile ; echo " NOW COMPILE NEMO with ice model SI3 and passive tracer model TOP"   >> $outfile
+    fi
+    
+    echo >> $outfile ; echo cd $nemo_root  >> $outfile
+    echo >> $outfile ; echo cp $mysrc_path/NEMO/arch-${fcm_arch}.fcm arch/CNRS/.   >> $outfile
+    echo >> $outfile
+    
+    cd $nemo_root ; cp $mysrc_path/NEMO/arch-${fcm_arch}.fcm arch/CNRS/.
+    
+    # creation of config
+    echo >> $outfile ; echo cd $nemo_root  >> $outfile
+    echo ./makenemo -m ${fcm_arch} -n $cfg_wrk -r $cfg_ref -j0 add_key "$addkeys"  del_key "$delkeys"   >> $outfile
+    echo >> $outfile
+    cd $nemo_root
+    ./makenemo -m ${fcm_arch} -n $cfg_wrk -r $cfg_ref -j0  add_key "$addkeys"  del_key "$delkeys"  >> $outfile 2>&1
+    
+    
+    # Copy of specfic source files
+    echo >> $outfile ; echo cp $mysrc_path/NEMO/*.*90  $nemo_root/cfgs/$cfg_wrk/MY_SRC/.   >> $outfile
+    echo >> $outfile
+    cp $mysrc_path/NEMO/*.*90  $nemo_root/cfgs/$cfg_wrk/MY_SRC/.
+    
+    
+    if [ $full_nemo == y ] ; then
+	# To make a full compilation, first make a clean to remove all files produced during previous compilation
+	echo ./makenemo -m ${fcm_arch} -n $cfg_wrk -r $cfg_ref clean   >> $outfile
+	echo >> $outfile
+	./makenemo -m ${fcm_arch} -n $cfg_wrk -r $cfg_ref clean  >> $outfile 2>&1
+    fi
+    echo ./makenemo -m ${fcm_arch} -n $cfg_wrk -r $cfg_ref -j8  >> $outfile
+    echo >> $outfile
+    ./makenemo -m ${fcm_arch} -n $cfg_wrk -r $cfg_ref -j8  >> $outfile 2>&1
+    
+    echo >> $outfile
+    echo "Move nemo executable to modipsl/bin" >> $outfile
+    echo ls -lrt $nemo_root/cfgs/$cfg_wrk/BLD/bin   >> $outfile
+    ls -lrt $nemo_root/cfgs/$cfg_wrk/BLD/bin  >> $outfile
+    echo >> $outfile
+    
+    if [ -f $nemo_root/cfgs/$cfg_wrk/BLD/bin/nemo.exe ] ; then
+	mv $nemo_root/cfgs/$cfg_wrk/BLD/bin/nemo.exe $modipsl/bin/opa_${optmode}.exe
+    else
+	echo "ERROR nemo.exe executable does not exist."
+	echo "THERE IS A PROBLEM IN NEMO COMPILATION - STOP"
+	exit
+    fi
+    
 else
-   echo; echo "NOW COMPILE NEMO with ice model SI3 and passive tracer model TOP"
-   echo >> $outfile ; echo " NOW COMPILE NEMO with ice model SI3 and passive tracer model TOP"   >> $outfile
-fi
-
-echo >> $outfile ; echo cd $nemo_root  >> $outfile
-echo >> $outfile ; echo cp $mysrc_path/NEMO/arch-${fcm_arch}.fcm arch/CNRS/.   >> $outfile
-echo >> $outfile
-
-cd $nemo_root ; cp $mysrc_path/NEMO/arch-${fcm_arch}.fcm arch/CNRS/.
-
-# creation of config
-echo >> $outfile ; echo cd $nemo_root  >> $outfile
-echo ./makenemo -m ${fcm_arch} -n $cfg_wrk -r $cfg_ref -j0 add_key "$addkeys"  del_key "$delkeys"   >> $outfile
-echo >> $outfile
-cd $nemo_root
-./makenemo -m ${fcm_arch} -n $cfg_wrk -r $cfg_ref -j0  add_key "$addkeys"  del_key "$delkeys"  >> $outfile 2>&1
-
-
-# Copy of specfic source files
-echo >> $outfile ; echo cp $mysrc_path/NEMO/*.*90  $nemo_root/cfgs/$cfg_wrk/MY_SRC/.   >> $outfile
-echo >> $outfile
-cp $mysrc_path/NEMO/*.*90  $nemo_root/cfgs/$cfg_wrk/MY_SRC/.
-
-
-if [ $full_nemo == y ] ; then
-   # To make a full compilation, first make a clean to remove all files produced during previous compilation
-   echo ./makenemo -m ${fcm_arch} -n $cfg_wrk -r $cfg_ref clean   >> $outfile
-   echo >> $outfile
-   ./makenemo -m ${fcm_arch} -n $cfg_wrk -r $cfg_ref clean  >> $outfile 2>&1
-fi
-echo ./makenemo -m ${fcm_arch} -n $cfg_wrk -r $cfg_ref -j8  >> $outfile
-echo >> $outfile
-./makenemo -m ${fcm_arch} -n $cfg_wrk -r $cfg_ref -j8  >> $outfile 2>&1
-
-echo >> $outfile
-echo "Move nemo executable to modipsl/bin" >> $outfile
-echo ls -lrt $nemo_root/cfgs/$cfg_wrk/BLD/bin   >> $outfile
-ls -lrt $nemo_root/cfgs/$cfg_wrk/BLD/bin  >> $outfile
-echo >> $outfile
-
-if [ -f $nemo_root/cfgs/$cfg_wrk/BLD/bin/nemo.exe ] ; then
-   mv $nemo_root/cfgs/$cfg_wrk/BLD/bin/nemo.exe $modipsl/bin/opa_${optmode}.exe
-else
-    echo "ERROR nemo.exe executable does not exist."
-    echo "THERE IS A PROBLEM IN NEMO COMPILATION - STOP"
-    exit
-fi
-
-else
-echo ; echo No compilation of NEMO
-fi
-
+    echo ; echo No compilation of NEMO
+fi
+
+##2.6  Compile INCA 
 if [ $compinca == y ] ; then
-##2.6  Compile INCA 
     cd $modipsl/modeles/INCA
-
+    
     echo; echo "NOW COMPILE INCA ${optchimie}"
     echo >> $outfile ; echo " NOW COMPILE INCA ${optchimie}"   >> $outfile 
@@ -396,5 +396,5 @@
     echo ./makeinca_fcm -chimie ${optchimie} -$optmode -xios -parallel mpi_omp -j 8 -arch ${fcm_arch}  -arch_path $arch_path $full_flag  >> $outfile
     ./makeinca_fcm -chimie ${optchimie} -$optmode -xios -parallel mpi_omp  -j 8 -arch ${fcm_arch} -arch_path $arch_path  $full_flag >> $outfile 2>&1
-
+    
     # Test if compiling finished
     if [[ $? != 0 ]] ; then
@@ -403,5 +403,5 @@
 	exit
     fi
-
+    
     echo "Move inca.dat modipsl/bin"
     if [[ -f $modipsl/modeles/INCA/SIMULATIONS/${optchimie}/inca.dat ]] ;  then  
@@ -412,12 +412,12 @@
 	exit	
     fi
-
+    
     echo "Move tracer.def to  modipsl/bin"
     if [[ -f $modipsl/modeles/INCA/tracer.def ]] ;  then
         mv $modipsl/modeles/INCA/tracer.def $modipsl/bin/tracer_${optchimie}.def ;
     fi
-
+    
 else
-echo ; echo No compilation of INCA
+    echo ; echo No compilation of INCA
 fi
 
@@ -425,113 +425,116 @@
 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 
-
-# Retrieve the final svn release number, needed for radiative code suffix of executable
-lmdzsvn=`svnversion . | egrep -o "[0-9]+"  | awk 'NR==1'`
-# Temporary use of SOURCES/LMDZ to handle modifications needed by IPSLCM7
-cp $mysrc_path/LMDZ/phylmd/*.*90  libf/phylmd/.
-cp $mysrc_path/LMDZ/dyn3d_common/*.*90  libf/dyn3d_common/.
-
-# 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
-
-# Need to define the proper option for radiative code compilation. By default, we use rrtm
-case $rad in
-    oldrad) opt_rad="" ;;
-    rrtm)   if [ $lmdzsvn -le 4185 ] ; then opt_rad="-rrtm true" ; else opt_rad="-rad rrtm" ; fi ;;
-    ecrad)  opt_rad="-rad ecrad" ;;
-    *) echo Only oldrad rrtm ecrad for rad option ; exit
-esac
-
-if [ $lmdzsvn -le 4185 -a $rad = "ecrad" ] ; then echo "ecrad only available for LMDZ rev starting with 4186 " ; exit ; fi
-
-if [ $compinca == y ] ; then
-    arginca="-chimie INCA "
-else
-    arginca=" "
-fi
-
-if [ $compoasis == y ] ; then
-    argoasis="-c OMCT "
-else
-    argoasis=" "
-fi
+if [ $compdyna == y ] ; then
+    echo; echo "NOW COMPILE LMDZ FOR COUPLING TO DYNAMICO"
+    echo >> $outfile ; echo " NOW COMPILE LMDZ FOR COUPLING TO DYNAMICO"   >> $outfile 
+    
+    # Retrieve the final svn release number, needed for radiative code suffix of executable
+    lmdzsvn=`svnversion . | egrep -o "[0-9]+"  | awk 'NR==1'`
+    # Temporary use of SOURCES/LMDZ to handle modifications needed by IPSLCM7
+    cp $mysrc_path/LMDZ/phylmd/*.*90  libf/phylmd/.
+    cp $mysrc_path/LMDZ/dyn3d_common/*.*90  libf/dyn3d_common/.
+    
+    # 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
+    
+    # Need to define the proper option for radiative code compilation. By default, we use rrtm
+    case $rad in
+	oldrad) opt_rad="" ;;
+	rrtm)   if [ $lmdzsvn -le 4185 ] ; then opt_rad="-rrtm true" ; else opt_rad="-rad rrtm" ; fi ;;
+	ecrad)  opt_rad="-rad ecrad" ;;
+	*) echo Only oldrad rrtm ecrad for rad option ; exit
+    esac
+    
+    if [ $lmdzsvn -le 4185 -a $rad = "ecrad" ] ; then echo "ecrad only available for LMDZ rev starting with 4186 " ; exit ; fi
+    
+    if [ $compinca == y ] ; then
+	arginca="-chimie INCA "
+    else
+	arginca=" "
+    fi
+    
+    if [ $compoasis == y ] ; then
+	argoasis="-c OMCT "
+    else
+	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
-
-
-# Test if compiling finished
-if [[ $? != 0 ]] ; then
-    echo "THERE IS A PROBLEM IN LMDZ PHYSICS COMPILATION - STOP"
-    exit
-fi
-
+    ./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
+    
+    
+    # Test if compiling finished
+    if [[ $? != 0 ]] ; then
+	echo "THERE IS A PROBLEM IN LMDZ PHYSICS COMPILATION - STOP"
+	exit
+    fi
+fi
 
 
 ## 2.8 Compile DYNAMICO
-cd $modipsl/modeles/DYNAMICO
-echo; echo "NOW COMPILE DYNAMICO "
-echo >> $outfile ; echo " NOW COMPILE DYNAMICO"   >> $outfile 
-
-if [ $compoasis == y ] ; then
- argoasis="-with_oasis "
-else
- argoasis=" "
-fi
-if [ $compinca == y ] ; then
- arginca="-with_inca "
-else
- arginca=" "
-fi
-
-
-echo ./make_icosa -$optmode -with_fcm1 -parallel $parallel -external_ioipsl $argoasis -with_xios -arch $fcm_arch -arch_path $arch_path -job 8 $full_dyna    >> $outfile 
-     ./make_icosa -$optmode -with_fcm1 -parallel $parallel -external_ioipsl $argoasis -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"
-    exit
-fi
-
-
+if [ $compdyna == y ] ; then
+    cd $modipsl/modeles/DYNAMICO
+    echo; echo "NOW COMPILE DYNAMICO "
+    echo >> $outfile ; echo " NOW COMPILE DYNAMICO"   >> $outfile 
+    
+    if [ $compoasis == y ] ; then
+	argoasis="-with_oasis "
+    else
+	argoasis=" "
+    fi
+    if [ $compinca == y ] ; then
+	arginca="-with_inca "
+    else
+	arginca=" "
+    fi
+    
+    
+    echo ./make_icosa -$optmode -with_fcm1 -parallel $parallel -external_ioipsl $argoasis -with_xios -arch $fcm_arch -arch_path $arch_path -job 8 $full_dyna    >> $outfile 
+    ./make_icosa -$optmode -with_fcm1 -parallel $parallel -external_ioipsl $argoasis -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"
+	exit
+    fi
+fi
+    
 ## 2.9 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 $argoasis -with_orchidee $arginca -arch ${fcm_arch} -arch_path ${arch_path} -job 8 $full_dyna    >> $outfile 
-     ./make_icosa_lmdz -nodeps -p lmd -$optmode -parallel $parallel $argoasis -with_orchidee $arginca -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"
-    exit
-fi
-# Move executables to modipsl/bin
-if [ -f $modipsl/modeles/ICOSA_LMDZ/bin/icosa_lmdz.exe ] ; then 
-    if [ $compinca == y ] ; then
-	mv $modipsl/modeles/ICOSA_LMDZ/bin/icosa_lmdz.exe $modipsl/bin/icosa_lmdz_${orchversion}_${optmode}_${optchimie}.exe
-	# Create link to be use by IPSLCM and LMDZOR without any change in the executable name
-	cd  $modipsl/bin
-        rm -f icosa_lmdz_${orchversion}_${optmode}.exe
-	ln -s icosa_lmdz_${orchversion}_${optmode}_${optchimie}.exe icosa_lmdz_${orchversion}_${optmode}.exe
-    else
-	mv $modipsl/modeles/ICOSA_LMDZ/bin/icosa_lmdz.exe $modipsl/bin/icosa_lmdz_${orchversion}_${optmode}.exe
-    fi
-else
-    echo "THERE IS A PROBLEM IN ICOSA_LMDZ COMPILATION EXECUTABLE MISSING - STOP"
-    exit
-fi
-
+if [ $compdyna ==y ] ; then
+    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 $argoasis -with_orchidee $arginca -arch ${fcm_arch} -arch_path ${arch_path} -job 8 $full_dyna    >> $outfile 
+    ./make_icosa_lmdz -nodeps -p lmd -$optmode -parallel $parallel $argoasis -with_orchidee $arginca -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"
+	exit
+    fi
+    # Move executables to modipsl/bin
+    if [ -f $modipsl/modeles/ICOSA_LMDZ/bin/icosa_lmdz.exe ] ; then 
+	if [ $compinca == y ] ; then
+	    mv $modipsl/modeles/ICOSA_LMDZ/bin/icosa_lmdz.exe $modipsl/bin/icosa_lmdz_${orchversion}_${optmode}_${optchimie}.exe
+	    # Create link to be use by IPSLCM and LMDZOR without any change in the executable name
+	    cd  $modipsl/bin
+            rm -f icosa_lmdz_${orchversion}_${optmode}.exe
+	    ln -s icosa_lmdz_${orchversion}_${optmode}_${optchimie}.exe icosa_lmdz_${orchversion}_${optmode}.exe
+	else
+	    mv $modipsl/modeles/ICOSA_LMDZ/bin/icosa_lmdz.exe $modipsl/bin/icosa_lmdz_${orchversion}_${optmode}.exe
+	fi
+    else
+	echo "THERE IS A PROBLEM IN ICOSA_LMDZ COMPILATION EXECUTABLE MISSING - STOP"
+	exit
+    fi
+fi
 
 
