Index: /BOL/script_install/install_lmdz.sh
===================================================================
--- /BOL/script_install/install_lmdz.sh	(revision 3609)
+++ /BOL/script_install/install_lmdz.sh	(revision 3610)
@@ -85,5 +85,7 @@
 #                  96x71x19  standard configuration
 grid_resolution=144x142x79
+grid_resolution=96x95x39
 grid_resolution=48x36x19
+grid_resolution=32x32x39
 
 ## parallel can take the values none/mpi/omp/mpi_omp
@@ -161,4 +163,6 @@
 
     -SCM        install 1D version automatically
+
+    -debug      compile everything in debug mode
 
     -opt_makelmdz     to call makelmdz or makelmdz_fcm with additional options
@@ -186,4 +190,5 @@
                   esac ;;
      "-bench") bench=$2 ; shift ; shift ;;
+     "-debug") optim=-debug ; shift ;;
      "-name") MODEL=$2 ; shift ; shift ;;
      "-netcdf") netcdf=$2 ; shift ; shift ;;
@@ -196,5 +201,5 @@
 
 #Chemin pour placer le modele
-if [ "$MODEL" = "" ] ; then MODEL=./LMDZ$version$svn ; fi
+if [ "$MODEL" = "" ] ; then MODEL=./LMDZ$version$svn$optim ; fi
 
 
@@ -224,4 +229,5 @@
             o_ins_make="-t jeanzay" ;
             make=gmake ;
+            module purge
             module load intel-compilers/19.0.4 ;
             module load intel-mpi/19.0.4 ;
@@ -272,5 +278,5 @@
             else
                echo "Cannot find mpif90" ;
-               exit ;
+               if [ $parallel = none ] ; then exit ; fi ;
             fi ;
             par_comp=${path_mpi}/mpif90 ;
@@ -427,8 +433,11 @@
    export CXXFLAGS="-O2 -ip -fpic -mcmodel=large"
    export fpp_flags="-P -traditional"
-   compile_with_fcm=1
+   # Pourquoi forcer la compilation fcm. Marche mieux sans
+   #compile_with_fcm=1
 
 elif [ $compiler = mpiifort ] ; then
-   compile_with_fcm=1
+   echo on ne fait rien la
+   # Pourquoi forcer la compilation fcm. Marche mieux sans
+   #compile_with_fcm=1
 
 else
@@ -500,5 +509,5 @@
 
 
-for logiciel in csh wget tar gzip make $compiler gcc ; do
+for logiciel in wget tar gzip make $compiler gcc ; do
 if [ "`which $logiciel`" = "" ] ; then
 echo You must first install $logiciel on your system
@@ -713,5 +722,7 @@
 # Compile IOIPSL on jean-zay
        cd $MODEL/modipsl/modeles/IOIPSL/src
-       gmake
+       gmake > ioipsl.log
+       cd $MODEL/modipsl/modeles/IOIPSL/tools
+       gmake > ioipsl.log
    
   fi # of if  [${hostname:0:5} = ada33 ]
@@ -756,4 +767,8 @@
 if [ "$veget" = 1 ] ; then
   cd $MODEL/modipsl/modeles/ORCHIDEE
+  # Correctif suite debug Jean-Zay
+  sed -i -e 's/9010  FORMAT(A52,F17.14)/9010  FORMAT(A52,F20.14)/' src_stomate/stomate.f90
+  opt_orc="-prod" ; if [ "$optim" = "-debug" ] ; then opt_orc="-debug" ; fi
+
   orchideelog=`pwd`/orchidee.log
   echo '########################################################'
@@ -770,4 +785,6 @@
          set +e ; svn update -r $orchidee_rev ; set -e 
       fi
+      # Correctif suite debug Jean-Zay
+      if [ -f src_global/time.f90 ] ; then sed -i -e 's/CALL tlen2itau/\!CALL tlen2itau/' src_global/time.f90 ; fi
 ###################################################################
      veget_version=orchidee2.0
@@ -791,6 +808,6 @@
      cd ../ 
 # compiling ORCHIDEE sequential mode
-     ./makeorchidee_fcm -j 8 -noxios -prod -parallel none -arch $arch > $orchideelog 2>&1
-     echo ./makeorchidee_fcm -j 8 -noxios -prod -parallel none -arch $arch
+     ./makeorchidee_fcm -j 8 -noxios $opt_orc -parallel none -arch $arch > $orchideelog 2>&1
+     echo ./makeorchidee_fcm -j 8 -noxios $opt_orc -parallel none -arch $arch
      echo End of the first compilation of orchidee ; pwd
   else
@@ -894,5 +911,5 @@
 
 echo install.sh avant_compilation `date`
-if [ $compile_with_fcm = 1 ] ; then makelmdz="makelmdz_fcm -arch $arch -j 8" ; else makelmdz="makelmdz -arch $arch" ; fi
+if [ $compile_with_fcm = 1 ] ; then makelmdz="makelmdz_fcm $optim -arch $arch -j 8 " ; else makelmdz="makelmdz $optim -arch $arch" ; fi
 
 # use the orchidee interface that has no z0h
@@ -903,5 +920,5 @@
 # sequential compilation and bench
 if [ "$sequential" = 1 ] ; then
-echo "./$makelmdz $OPT_MAKELMDZ -rrtm true $opt_cosp -d ${grid_resolution} -v $veget_version gcm " >> compile.sh
+echo "./$makelmdz $optim $OPT_MAKELMDZ $optim -rrtm true $opt_cosp -d ${grid_resolution} -v $veget_version gcm " >> compile.sh
 chmod +x ./compile.sh
 if [ $bench != 0 ] ; then ./compile.sh > $lmdzlog 2>&1 ; fi
@@ -942,8 +959,8 @@
      echo compiling ORCHIDEE parallel mode
      echo logfile $orchideelog
-     ./makeorchidee_fcm -j 8 -clean -noxios -prod -parallel $parallel -arch $arch > $orchideelog 2>&1
-     ./makeorchidee_fcm -j 8 -noxios -prod -parallel $parallel -arch $arch >> $orchideelog 2>&1
-     echo ./makeorchidee_fcm -j 8 -clean -noxios -prod -parallel $parallel -arch $arch
-     echo ./makeorchidee_fcm -j 8 -noxios -prod -parallel $parallel -arch $arch
+     ./makeorchidee_fcm -j 8 -clean -noxios $opt_orc -parallel $parallel -arch $arch > $orchideelog 2>&1
+     ./makeorchidee_fcm -j 8 -noxios $opt_orc -parallel $parallel -arch $arch >> $orchideelog 2>&1
+     echo ./makeorchidee_fcm -j 8 -clean -noxios $opt_orc -parallel $parallel -arch $arch
+     echo ./makeorchidee_fcm -j 8 -noxios $opt_orc -parallel $parallel -arch $arch
   elif [ $veget = 1 ] ; then
     echo '##########################################################'
@@ -972,6 +989,6 @@
   if [ ${hostname:0:5} = ada33 ] ; then echo "module load intel/2017.2" > compile.sh ; fi
   echo resol=${grid_resolution} >> compile.sh
-  echo ./$makelmdz $OPT_MAKELMDZ -rrtm true $opt_cosp $opt_makelmdz_xios -d \$resol -v $veget_version -mem -parallel $parallel gcm >> compile.sh
-  echo ./$makelmdz $OPT_MAKELMDZ -rrtm true $opt_cosp $opt_makelmdz_xios -d \$resol -v $veget_version -mem -parallel $parallel gcm 
+  echo ./$makelmdz $optim $OPT_MAKELMDZ -rrtm true $opt_cosp $opt_makelmdz_xios -d \$resol -v $veget_version -mem -parallel $parallel gcm >> compile.sh
+  echo ./$makelmdz $optim $OPT_MAKELMDZ -rrtm true $opt_cosp $opt_makelmdz_xios -d \$resol -v $veget_version -mem -parallel $parallel gcm 
   chmod +x ./compile.sh
   if [ $bench != 0 ] ; then ./compile.sh > $lmdzlog 2>&1 ; fi
