Index: /BOL/script_install/install_lmdz.sh
===================================================================
--- /BOL/script_install/install_lmdz.sh	(revision 3644)
+++ /BOL/script_install/install_lmdz.sh	(revision 3645)
@@ -100,4 +100,5 @@
 with_xios="n"
 opt_makelmdz_xios=""
+
 ## compile_with_fcm=1 : use makelmdz_fcm (1) or makelmdz (0)
 compile_with_fcm=1
@@ -113,4 +114,6 @@
 fi
 #echo "pcmac="$pcmac
+
+env_file=""
 
 #########################################################################
@@ -167,4 +170,6 @@
 
     -opt_makelmdz     to call makelmdz or makelmdz_fcm with additional options
+
+    -env_file  specify an arch.env file to overwrite the existing one
 ........fin
      exit ;;
@@ -194,4 +199,6 @@
      "-netcdf") netcdf=$2 ; shift ; shift ;;
      "-xios") with_xios="y" ; shift ;;
+     "-env_file") env_file=$2 ; shift ; shift ;;
+
      *) ./install_lmdz.sh -h ; exit
    esac
@@ -217,11 +224,4 @@
 
 case ${hostname:0:5} in
-
-   ada33)   compiler="ifort" ;
-            par_comp="ifort" ;
-            o_ins_make="-t ada" ;
-            make=gmake ;
-            module load intel/2017.2 ;
-            arch=X64_ADA ;;
 
    jean-)   compiler="mpiifort" ;
@@ -231,10 +231,10 @@
             module purge
             module load intel-compilers/19.0.4 ;
-            module load intel-mpi/19.0.4 ;
-            module load hdf5/1.10.5/intel-19.0.4-mpi ;
-            module load netcdf/4.7.0/intel-19.0.4-mpi ;
-            module load netcdf-fortran/4.4.5/intel-19.0.4-mpi ;
-            module load subversion/1.9.7/gcc-4.8.5 ;
-            module load intel-mkl/19.0.4 ;
+            #module load intel-mpi/19.0.4 ;
+            #module load intel-mkl/19.0.4 ;
+            module load hdf5/1.10.5-mpi ;
+            module load netcdf/4.7.2-mpi ;
+            module load netcdf-fortran/4.5.2-mpi ;
+            module load subversion/1.9.7 ;
             export NETCDF_LIBDIR=./
             export NETCDFFORTRAN_INCDIR=./
@@ -452,16 +452,4 @@
 # If installing on know machines such as IBM x3750 (Ada)
 # at IDRIS, don't check for available software and don"t install netcdf
-if [ ${hostname:0:5} = ada33 ] ; then
-  netcdf=0 # no need to recompile netcdf, alreday available
-  check_linux=0
-  pclinux=0
-  ioipsl=1 # no need to recompile ioipsl, already available
-  #netcdf="/smplocal/pub/NetCDF/4.1.3"
-  compiler="ifort"
-  fmod='module '
-  if [ $real = r8 ] ; then OPTPREC="$OPTPREC -real-size 64 -DNC_DOUBLE" ; fi
-  OPTIM="-O2 -fp-model strict -ip -axAVX,SSE4.2 -align all "
-  OPTIMGCM="$OPTIM $OPTPREC"
-fi
 if [ ${hostname:0:5} = jean- ] ; then
   netcdf=0 # no need to recompile netcdf, alreday available
@@ -637,7 +625,7 @@
   else # bash
     sed -e s:/bin/ksh:/bin/bash:g ins_make > ins_make.bash
-    if [ "`grep ada AA_make.gdef`" = "" ] ; then # Bidouille pour compiler sur ada des vieux modipsl.tar
-        \cp -f ~rdzt401/bin/AA_make.gdef .
-    fi
+    #if [ "`grep ada AA_make.gdef`" = "" ] ; then # Bidouille pour compiler sur ada des vieux modipsl.tar
+    #    \cp -f ~rdzt401/bin/AA_make.gdef .
+    #fi
     if [ "`grep jeanzay AA_make.gdef`" = "" ] ; then # Bidouille pour compiler sur ada des vieux modipsl.tar
         echo 'Warning jean-zay not in AA_make.gdef'
@@ -687,32 +675,8 @@
 
 else # of if [ $ioipsl = 1 ]
-  if [ ${hostname:0:5} = ada33 ] ; then
-    cd $MODEL/modipsl
-    cd util
-
-    cp AA_make.gdef AA_make.orig
-    sed -e 's/^\#.*.g95.*.\#.*.$/\#/' AA_make.gdef > tmp
-    sed -e "s:F_L = g95:F_L = $compiler:" -e "s:F_C = g95 -c:F_C = $compiler -c": \
-    -e 's/g95.*.w_w.*.(F_D)/g95      w_w = '"$OPTIMGCM"'/' \
-    -e 's:g95.*.NCDF_INC.*.$:g95      NCDF_INC= -I/smplocal/pub/HDF5/1.8.9/seq/include -I/smplocal/pub/NetCDF/4.1.3/include:' \
-    -e 's:g95.*.NCDF_LIB.*.$:g95      NCDF_LIB= -L/smplocal/pub/NetCDF/4.1.3/lib -lnetcdff -lnetcdf:' \
-    -e "s:-fmod=:-$fmod:" -e 's/-fno-second-underscore//' \
-    -e 's:#-Q- g95      M_K = gmake:#-Q- g95      M_K = make:' \
-    tmp >| AA_make.gdef
-
-    ./ins_make $o_ins_make # We use lines for g95 even for the other compilers
-
-    # on Ada, IOIPSL is already installed in ~rpsl035/IOIPSL_PLUS
-    # so link it to current settings
-    cd $MODEL/modipsl/modeles/
-    \rm -r -f IOIPSL
-    ln -s ~rpsl035/IOIPSL_PLUS IOIPSL
-    cd ..
-    ln -s ~rpsl035/IOIPSL_PLUS/modipsl_Tagv2_2_3/bin/* bin/
-    ln -s ~rpsl035/IOIPSL_PLUS/modipsl_Tagv2_2_3/lib/* lib/
-  elif [ ${hostname:0:5} = jean- ] ; then
+  if [ ${hostname:0:5} = jean- ] ; then
      cd $MODEL/modipsl
      cd util
-       if [ "`grep jeanzay AA_make.gdef`" = "" ] ; then # Bidouille pour compiler sur ada des vieux modipsl.tar
+       if [ "`grep jeanzay AA_make.gdef`" = "" ] ; then
         echo 'Warning jean-zay not in AA_make.gdef'
         echo 'Think about updating'
@@ -726,5 +690,5 @@
        gmake > ioipsl.log
    
-  fi # of if  [${hostname:0:5} = ada33 ]
+  fi
   echo install.sh ioipsl_OK `date`
 fi # of if [ $ioipsl = 1 ]
@@ -744,11 +708,5 @@
   myget import/install_xios.bash
   chmod u=rwx install_xios.bash
-  if [ ${hostname:0:5} = ada33 ] ; then
-    ./install_xios.bash \
-    -prefix /workgpfs/rech/gzi/rgzi027/LMDZ20180221.trunk/modipsl/modeles \
-    -netcdf /smplocal/pub/NetCDF/4.1.3/mpi -hdf5 /smplocal/pub/HDF5/1.8.9/par \
-    -MPI /smplocal/intel/compilers_and_libraries_2017.2.174/linux/mpi/intel64/ \
-    -arch X64_ADA > xios.log 2>&1
-   elif [ ${hostname:0:5} = jean- ] ; then
+   if [ ${hostname:0:5} = jean- ] ; then
     echo 'Need to work on install_xios implementation for jean-zay'
     exit
@@ -910,4 +868,6 @@
 echo log file : $lmdzlog
 
+if [ "$env_file" != "" ] ; then mv arch/arch-${arch}.env arch/arch-${arch}.orig ; \cp -f $env_file arch/arch-${arch}.env ; fi
+
 echo install.sh avant_compilation `date`
 if [ $compile_with_fcm = 1 ] ; then makelmdz="makelmdz_fcm $optim -arch $arch -j 8 " ; else makelmdz="makelmdz $optim -arch $arch" ; fi
@@ -987,5 +947,4 @@
   fi
   rm -f compile.sh
-  if [ ${hostname:0:5} = ada33 ] ; then echo "module load intel/2017.2" > compile.sh ; fi
   echo resol=${grid_resolution} >> compile.sh
   echo ./$makelmdz $optim $OPT_MAKELMDZ -rrtm true $opt_cosp $opt_makelmdz_xios -d \$resol -v $veget_version -mem -parallel $parallel gcm >> compile.sh
