Index: /BOL/script_install/install_lmdz.sh
===================================================================
--- /BOL/script_install/install_lmdz.sh	(revision 4203)
+++ /BOL/script_install/install_lmdz.sh	(revision 4204)
@@ -8,5 +8,5 @@
 #
 # bash installation script of the LMDZ model on different computer types :
-# Linux PC, "mesocentre" (IPSL-UPMC, IPSL-X), super-computer (IDRIS) 
+# Linux PC, "mesocentre" (IPSL-UPMC, IPSL-X), super-computer (IDRIS)
 #
 # The model is downloaded in the following directory tree
@@ -20,5 +20,5 @@
 # The sources of the models can be found in the "modeles" directory.
 # In the present case, LMDZ, ORCHIDEE, and IOIPSL or XIOS (handling of input-outputs
-# using the NetCDF library). 
+# using the NetCDF library).
 #
 # The script downloads various source files (including a version of NetCDF)
@@ -26,10 +26,10 @@
 # minimal configuration.
 #
-# Prerequisites : pgf90/gfortran, bash or ksh, wget , gunzip, tar, ... 
+# Prerequisites : pgf90/gfortran, bash or ksh, wget , gunzip, tar, ...
 #
 # Modif 18/11/2011
 #    changes for option real 8.
 #      We compile with -r8 (or equivalent) and -DNC_DOUBLE for the GCM
-#      but with -r4 for netcdf. Variable real must be set to 
+#      but with -r4 for netcdf. Variable real must be set to
 #      r4 or r8 at the beginning of the script below.
 #
@@ -40,5 +40,5 @@
 
 ################################################################
-# Choice of installation options 
+# Choice of installation options
 ################################################################
 
@@ -149,5 +149,5 @@
 
     -r       "svn_release" : either the svn release number or "last"
-    
+
     -compiler gfortran|ifort|pgf90 (default: gfortran)
 
@@ -164,6 +164,6 @@
 
     -netcdf    PATH : full path to an existing installed NetCDF library
-               (without -netcdf: also download and install the NetCDF library)  
-    
+               (without -netcdf: also download and install the NetCDF library)
+
     -xios      also download and compile the XIOS library
                (requires the NetCDF4-HDF5 library, also installed by default)
@@ -173,5 +173,5 @@
 
     -cosp      to run without our with cospv1 or cospv2 [none/v1/v2]
- 
+
     -rad RADIATIF can be oldrad, rrtm or ecrad radiatif code
 
@@ -201,5 +201,5 @@
      "-d") grid_resolution=$2 ; shift ; shift ;;
      "-gprof") OPT_GPROF="-pg" ; shift ;;
-     "-cosp") cosp=$2 
+     "-cosp") cosp=$2
               case $cosp in
                   "none"|"v1"|"v2") cosp=$2 ; shift ; shift ;;
@@ -246,5 +246,5 @@
    v2) opt_cosp="-cospv2 true" ;;
 esac
-  
+
 # Check on veget version
 #if [ "$veget" != 'NONE'  -a "$veget" != "CMIP6" -a "$veget" != +([0-9]) ] ; then
@@ -252,5 +252,5 @@
     re='^[0-9]+$'
     if ! [[ $veget =~ $re ]] ; then
-	echo 'Valeur de l option veget non valable' 
+	echo 'Valeur de l option veget non valable'
 	exit
     fi
@@ -262,10 +262,10 @@
     #For use with tutorial, orchidee_rev is also defined (will be written in surface_env at the end of the script)
     orchidee_rev=''
-else 
-    suff_orc='_orch' 
-fi
-
-
-if [ $parallel = none ] ; then sequential=1; suff_exe='_seq' ; else sequential=0; suff_exe='_para_mem' ; fi 
+else
+    suff_orc='_orch'
+fi
+
+
+if [ $parallel = none ] ; then sequential=1; suff_exe='_seq' ; else sequential=0; suff_exe='_para_mem' ; fi
 
 #Chemin pour placer le modele
@@ -315,5 +315,5 @@
             make=make ;
             o_ins_make="-t g95" ;;
-            
+
    *)       if [ $parallel = none -o -f /usr/bin/mpif90 ] ; then
                 path_mpi=`which mpif90 | sed -e s:/mpif90::` ;
@@ -389,5 +389,5 @@
 
 ## if also compiling XIOS, parallel must be mpi_omp
-if [ "$with_xios" = "y" -a "$parallel" != "mpi_omp" ] ; then 
+if [ "$with_xios" = "y" -a "$parallel" != "mpi_omp" ] ; then
   echo "Error, you must set -parallel mpi_omp if you want XIOS"
   exit
@@ -517,5 +517,5 @@
 
 #### Ehouarn: test if the required shell is available
-#### Maj FH-LF-AS 2021-04 : default=bash ; if bash missing, use ksh 
+#### Maj FH-LF-AS 2021-04 : default=bash ; if bash missing, use ksh
 use_shell="bash" # default
 if [ "`which bash`" = "" ] ; then
@@ -628,5 +628,5 @@
    echo '##########################################################'
    echo `date`
-   
+
    cd $MODEL/modipsl
    \rm -rf lib/*
@@ -644,5 +644,5 @@
    -e 's:#-Q- g95      M_K = gmake:#-Q- g95      M_K = make:' \
    tmp >| AA_make.gdef
- 
+
    if [ $pcmac == 1 ]
    then
@@ -650,6 +650,6 @@
        sed -e 's/rpath=/rpath,/g' tmp > AA_make.gdef
    fi
-   
- 
+
+
  # We use lines for g95 even for the other compilers to run ins_make
    if [ "$use_shell" = "ksh" ] ; then
@@ -662,11 +662,11 @@
          exit 1
      fi
-     
+
      chmod u=rwx ins_make.bash
      ./ins_make.bash $o_ins_make
    fi # of if [ "$use_shell" = "ksh" ]
- 
+
    echo install_lmdz.sh MODIPSL_OK `date`
- 
+
    cd $MODEL/modipsl/modeles/IOIPSL/src
    ioipsllog=`pwd`/ioipsl.log
@@ -676,5 +676,5 @@
    echo `date`
    echo log file : $ioipsllog
- 
+
    if [ "$use_shell" = "bash" ] ; then
      cp Makefile Makefile.ksh
@@ -703,6 +703,6 @@
        $make > $ioipsllog 2>&1
      fi
-# fi # of if [ "$pclinux" = 1 ] 
- 
+# fi # of if [ "$pclinux" = 1 ]
+
 else # of if [ $ioipsl = 1 ]
    if [ ${hostname:0:5} = jean- ] ; then
@@ -720,5 +720,5 @@
         cd $MODEL/modipsl/modeles/IOIPSL/tools
         gmake > ioipsl.log
-    
+
    fi
    echo install_lmdz.sh ioipsl_OK `date`
@@ -763,7 +763,7 @@
   set +e ; svn upgrade ; set -e
   if [ "$veget" = "CMIP6" ] ; then
-    veget_version=orchidee2.0  
+    veget_version=orchidee2.0
     orchidee_rev=6592
-  else # specific orchidee revision newer than CMIP6, on 2_1 or 2_2 branches 
+  else # specific orchidee revision newer than CMIP6, on 2_1 or 2_2 branches
     veget_version=orchidee2.1
     orchidee_rev=$veget
@@ -776,5 +776,5 @@
      orcbranch=`svn log -v -q svn://forge.ipsl.jussieu.fr/orchidee/ -r $veget |grep ORCHIDEE |head -1| sed -e 's:ORCHIDEE/.*$:ORCHIDEE:' | awk '{print $2}'`
      # switch to that branch
-     echo IF YOU INSTALL ORCHIDEE THE VERY FIRST TIME, ASK for PASSWORD at orchidee-help@listes.ipsl.fr 
+     echo IF YOU INSTALL ORCHIDEE THE VERY FIRST TIME, ASK for PASSWORD at orchidee-help@listes.ipsl.fr
      svn switch -r $veget --accept theirs-full svn://forge.ipsl.jussieu.fr/orchidee/$orcbranch
      svn log -r $veget | grep  $veget
@@ -784,5 +784,5 @@
       fi
       set -e
-      set +e ; svn update -r $veget ; set -e  
+      set +e ; svn update -r $veget ; set -e
   fi
   # Correctif suite debug Jean-Zay
@@ -811,5 +811,5 @@
 ###################################################################
      if [ "$veget_version" == "false" ] ; then veget_version=orchidee2.0 ; fi
-      cd arch 
+      cd arch
       sed -e s:"%COMPILER        .*.$":"%COMPILER            $compiler":1 \
      -e s:"%LINK            .*.$":"%LINK                $compiler":1 \
@@ -828,5 +828,5 @@
      echo 'XIOS_INCDIR=${ORCHDIR}/../XIOS/inc' >> arch-local.path
      echo 'XIOS_LIBDIR="${ORCHDIR}/../XIOS/lib -lxios"' >> arch-local.path
-     cd ../ 
+     cd ../
 
      echo ./makeorchidee_fcm -j $xios_orchid $opt_orc -parallel none -arch $arch
@@ -846,7 +846,7 @@
         cd ..
      done
-  fi # of "if [ -d tools ]" 
+  fi # of "if [ -d tools ]"
   echo install_lmdz.sh orchidee_compil_seq_OK `date`
-fi # of if [ "$veget" != 'NONE' ] 
+fi # of if [ "$veget" != 'NONE' ]
 
 
@@ -948,6 +948,6 @@
 
 echo '##################################################################'
-echo "Preparing script compile.sh for LMDZ compilation" 
-echo "It will only be run automatically if bench=1/tuto" 
+echo "Preparing script compile.sh for LMDZ compilation"
+echo "It will only be run automatically if bench=1/tuto"
 echo Here bench=$bench
 echo '##################################################################'
@@ -957,5 +957,5 @@
 if [ $compile_with_fcm = 1 ] ; then makelmdz="makelmdz_fcm $optim -arch $arch -j 8 " ; else makelmdz="makelmdz $optim -arch $arch" ; fi
 
-# sequential compilation 
+# sequential compilation
 if [ "$sequential" = 1 ] ; then
   echo Sequential compilation command, saved in compile.sh:
@@ -963,8 +963,8 @@
   echo "./$makelmdz $optim $OPT_MAKELMDZ $optim $opt_rad $opt_cosp -d ${grid_resolution} -v $veget_version gcm " >> compile.sh
   chmod +x ./compile.sh
-  if [ $bench = 1 ] ; then 
+  if [ $bench = 1 ] ; then
     echo install_lmdz.sh start_lmdz_seq_compilation `date`
     echo log file: $lmdzlog
-    ./compile.sh > $lmdzlog 2>&1 
+    ./compile.sh > $lmdzlog 2>&1
     echo install_lmdz.sh end_lmdz_seq_compilation `date`
   fi
@@ -981,5 +981,5 @@
   \rm -rf bin/ lib/
   tar xf ioipsl.tar
-  # 
+  #
   # Orchidee
   #
@@ -1035,14 +1035,14 @@
   echo resol=${grid_resolution} >> compile.sh
   if [ ${hostname:0:5} = jean- -a "$cosp" = "v2" ] ; then
- 
-  echo LMDZ compilation command in parallel mode, saved in compile.sh, is : 
+
+  echo LMDZ compilation command in parallel mode, saved in compile.sh, is :
   echo "(ATTENTION le probleme de cospv2 sur jean-zay en mode prod n est pas corrige ! )"
 # ATTENTION le probleme de cospv2 sur jean-zay en mode prod n est pas corrige
      echo ./$makelmdz -dev $optim $OPT_MAKELMDZ $opt_rad $opt_cosp $opt_makelmdz_xios -d \$resol -v $veget_version -mem -parallel $parallel gcm >> compile.sh
-     echo ./$makelmdz -dev $optim $OPT_MAKELMDZ $opt_rad $opt_cosp $opt_makelmdz_xios -d \$resol -v $veget_version -mem -parallel $parallel gcm 
-  else   
+     echo ./$makelmdz -dev $optim $OPT_MAKELMDZ $opt_rad $opt_cosp $opt_makelmdz_xios -d \$resol -v $veget_version -mem -parallel $parallel gcm
+  else
     echo ./$makelmdz $optim $OPT_MAKELMDZ $opt_rad $opt_cosp $opt_makelmdz_xios -d \$resol -v $veget_version -mem -parallel $parallel gcm >> compile.sh
-    echo ./$makelmdz $optim $OPT_MAKELMDZ $opt_rad $opt_cosp $opt_makelmdz_xios -d \$resol -v $veget_version -mem -parallel $parallel gcm 
-  fi 
+    echo ./$makelmdz $optim $OPT_MAKELMDZ $opt_rad $opt_cosp $opt_makelmdz_xios -d \$resol -v $veget_version -mem -parallel $parallel gcm
+  fi
   chmod +x ./compile.sh
 
@@ -1050,5 +1050,5 @@
      echo Compiling LMDZ in parallel mode `date`,  LMDZ log file: $lmdzlog ; ./compile.sh > $lmdzlog 2>&1
   fi
-  
+
 fi # of if [ $parallel != "none" ]
 
@@ -1094,5 +1094,5 @@
    echo ' Running a test run '
    echo '##########################################################'
-   
+
    \rm -rf BENCH${grid_resolution}
    bench=bench_lmdz_${grid_resolution}
@@ -1102,5 +1102,5 @@
    echo install_lmdz.sh after bench download  `date`
    tar xvf $bench.tar.gz
-   
+
    if [ "$cosp" = "v1" -o "$cosp" = "v2" ] ; then
      cd BENCH${grid_resolution}
@@ -1112,6 +1112,6 @@
       \mv -f tmp config.def
      cd ..
-   fi 
-   
+   fi
+
    if [ -n "$physiq" ]; then
      cd BENCH${grid_resolution}
@@ -1126,5 +1126,5 @@
      echo using standard physiq.def
    fi
-   
+
    if [ "$with_xios" = "y" ] ; then
      cd BENCH${grid_resolution}
@@ -1139,5 +1139,5 @@
      sed -e 's@"using_server" type="bool">true@"using_server" type="bool">false@' iodef.xml > tmp
      \mv -f tmp iodef.xml
-   
+
      # and convert all the enabled="_AUTO_" (for libIGCM) to enabled=.FALSE.
      # except for histday
@@ -1155,7 +1155,7 @@
      echo "### XIOS outputs" >> config.def
      echo 'ok_all_xml=.true.' >> config.def
-   
+
      #activer les sorties pour Cosp
-     if [ "$cosp" = "v1" ] ; then 
+     if [ "$cosp" = "v1" ] ; then
       histfile=file_def_histdayCOSP_lmdz.xml
       sed -e 's@enabled=".FALSE."@enabled=".TRUE."@' $histfile > tmp ; \mv -f tmp $histfile
@@ -1173,8 +1173,8 @@
       sed -e 's@field_def_cosp1.xml@field_def_cospv2.xml@' $fieldfile > tmp ; \mv -f tmp $fieldfile
      fi
-   
+
      cd ..
    fi
-   
+
    # Cas Bensh avec ecrad
    if [ "$rad" = "ecrad" ] ; then
@@ -1190,11 +1190,11 @@
    \mv tmpdef physiq.def
    cd ..
-   
+
    cp $gcm BENCH${grid_resolution}/gcm.e
-   
+
    cd BENCH${grid_resolution}
    # On cree le fichier bench.sh au besoin
    # Dans le cas 48x36x39 le bench.sh existe deja en parallele
-   
+
    if [ "$grid_resolution" = "48x36x39" ] ; then
       echo On ne touche pas au bench.sh
@@ -1209,11 +1209,11 @@
         echo "export OMP_NUM_THREADS=2" >> bench.sh
       fi
-      if [ "$cosp" = "v1" -o "$cosp" = "v2" ] ; then 
-         if [ ${hostname:0:5} = jean- ] ; then    
+      if [ "$cosp" = "v1" -o "$cosp" = "v2" ] ; then
+         if [ ${hostname:0:5} = jean- ] ; then
    	chmod +x ../arch.env
            ../arch.env	
            echo "ulimit -s 2000000" >> bench.sh
          else
-           echo "ulimit -s 200000" >> bench.sh	      
+           echo "ulimit -s 200000" >> bench.sh
          fi	
       else
@@ -1221,5 +1221,5 @@
       fi
       if [ ${hostname:0:5} = jean- ] ; then
-        . ../arch/arch-${arch}.env  
+        . ../arch/arch-${arch}.env
         echo "srun -n 2 -A $idris_acct@cpu gcm.e > listing  2>&1" >> bench.sh
       else
@@ -1268,6 +1268,6 @@
    set -e
    tail listing
-   
-   
+
+
    echo '##########################################################'
    echo 'Simulation finished in' `pwd`
@@ -1310,11 +1310,11 @@
 #echo surface_env file created in $MODEL
 echo 'veget='$veget > surface_env
-#opt_veget="-v $veget_version" 
+#opt_veget="-v $veget_version"
 #echo 'opt_veget="'$opt_veget\" >> surface_env
 echo 'opt_veget="'-v $veget_version\" >> surface_env
 echo 'orchidee_rev='$orchidee_rev >> surface_env
 echo 'suforch='$suff_orc >> surface_env
-   
-
-
-
+
+
+
+
