Index: BOL/script_install_amaury/arch_local/arch-X64_JEANZAY.env
===================================================================
--- BOL/script_install_amaury/arch_local/arch-X64_JEANZAY.env	(revision 4994)
+++ BOL/script_install_amaury/arch_local/arch-X64_JEANZAY.env	(revision 4994)
@@ -0,0 +1,14 @@
+module purge
+module load intel-compilers/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 netcdf95
+module load subversion/1.9.7
+module load cmake
+
+export FC=mpiifort
+export CPP="icc -E"
+export CC=icc
+
Index: BOL/script_install_amaury/arch_local/arch-X64_JEANZAY.path
===================================================================
--- BOL/script_install_amaury/arch_local/arch-X64_JEANZAY.path	(revision 4994)
+++ BOL/script_install_amaury/arch_local/arch-X64_JEANZAY.path	(revision 4994)
@@ -0,0 +1,1 @@
+link arch-local-gfortran.path
Index: BOL/script_install_amaury/install_lmdz.sh
===================================================================
--- BOL/script_install_amaury/install_lmdz.sh	(revision 4993)
+++ BOL/script_install_amaury/install_lmdz.sh	(revision 4994)
@@ -358,7 +358,5 @@
     arch_dir=$(readlink -e -f "$arch_dir")  # full path. readlink must be called *after* the path is created
     if [[ ! -d $arch_dir ]]; then
-        echo "Error: no arch dir $arch_dir"; exit 1
-    elif [[ ! -f $arch_dir/arch-$arch.path ]]; then
-        echo "Error: no arch-$arch.path in $arch_dir"; exit 1
+        echo "STOP: no arch dir $arch_dir"; exit 1
     fi
 
@@ -369,5 +367,15 @@
         fcm_path="$MODEL/modipsl/modeles/LMDZ/arch/arch-$arch.fcm"
         if [[ ! -f $fcm_path ]]; then
-            echo "Error: no $fcm_path"; exit 1
+            echo "STOP: no $fcm_path"; exit 1
+        fi
+    fi
+
+    local env_path
+    if [[ -f $arch_dir/arch-$arch.env ]]; then
+        env_path="$arch_dir/arch-$arch.env"
+    else
+        env_path="$MODEL/modipsl/modeles/LMDZ/arch/arch-$arch.env"
+        if [[ ! -f $env_path ]]; then
+            echo "STOP: no $env_path"; exit 1
         fi
     fi
@@ -377,5 +385,4 @@
 
     # load env
-    local env_path=${fcm_path/.fcm/.env}
     # shellcheck disable=SC1090
     if [[ -f $env_path ]]; then source "$env_path"; fi
@@ -385,6 +392,6 @@
     local component=$1
 
-    if [[ ! -f "$MODEL/modipsl/modeles/$component/arch/arch-$arch.fcm" ]]; then
-        cp -f "$arch_dir/arch-$arch."{fcm,path,env} "$MODEL/modipsl/modeles/$component/arch"
+    if [[ -f "$arch_dir/arch-$arch.env" ]]; then
+        cp -f "$arch_dir/arch-$arch."{fcm,path,env} "$MODEL/modipsl/modeles/$component/arch" &> /dev/null || true  # allow failure if doesn't exist
 
         if [[ $component = "XIOS" ]]; then
@@ -548,12 +555,17 @@
 
     if [[ -n $fetch_rev ]]; then
-        echo "Fetching orch $fetch_rev from the repository"
+        local curr_rev
+        curr_rev=$(svn info "$MODEL/modipsl/modeles/ORCHIDEE" | grep Revision: | cut -d ":" -f 2 | cut -c 2-)
         orcbranch=$(svn log -v -q svn://forge.ipsl.fr/orchidee/ -r "$fetch_rev" | grep ORCHIDEE | head -1 | sed -e 's:ORCHIDEE/.*$:ORCHIDEE:' | awk '{print $2}')
-        echo "branch is $orcbranch"
-        if [[ $fetch_rev -lt 4465 ]]; then echo 'ORCHIDEE version must be >=4465, exiting'; exit 1; fi
-        echo "IF YOU INSTALL ORCHIDEE THE VERY FIRST TIME, ASK for PASSWORD at orchidee-help@listes.ipsl.fr"
-        cd "$MODEL/modipsl/modeles"
-        svn co -r "$fetch_rev" "svn://forge.ipsl.fr/orchidee/$orcbranch" || (rm -rf ORCHIDEE && svn co -r "$fetch_rev" "svn://forge.ipsl.fr/orchidee/$orcbranch")  # if orch dir exists and is from a different branch, need to delete it first (but we don't want to do this all the time, as it would require a recompile for the same code)
-        cd -
+        if [[ $fetch_rev != "$curr_rev" ]]; then
+            echo "Fetching orch $fetch_rev from the repository (curr: $curr_rev)"
+            echo "branch is $orcbranch"
+            if [[ $fetch_rev -lt 4465 ]]; then echo 'ORCHIDEE version must be >=4465, exiting'; exit 1; fi
+            echo "IF YOU INSTALL ORCHIDEE THE VERY FIRST TIME, ASK for PASSWORD at orchidee-help@listes.ipsl.fr"
+            cd "$MODEL/modipsl/modeles"
+            rm -rf ORCHIDEE
+            svn co -r "$fetch_rev" "svn://forge.ipsl.fr/orchidee/$orcbranch"
+            cd - > /dev/null
+        fi
     fi
 
@@ -609,12 +621,16 @@
     lmdzlog="$(pwd)/lmdz.log"
 
-    used_lmdz_rev=$svn_lmdz
     if [[ -n $svn_lmdz ]]; then
-        local lmdzbranch
-        echo "Fetching LMDZ $svn_lmdz from the repository"
-        lmdzbranch=$(svn log -v -q https://svn.lmd.jussieu.fr/LMDZ -r "$svn_lmdz" | grep LMDZ | head -1 | sed -e 's:trunk/.*$:trunk:' | awk '{print $2}')
-        cd "$MODEL/modipsl/modeles"
-        svn co -r "$svn_lmdz" "https://svn.lmd.jussieu.fr/LMDZ$lmdzbranch" LMDZ || (rm -rf LMD* && svn co -r "$svn_lmdz" "https://svn.lmd.jussieu.fr/LMDZ$lmdzbranch" LMDZ)  # if lmdz dir exists and is from a different branch, need to delete it first (but we don't want to do this all the time, as it would require a recompile for the same code)
-        cd -
+      local curr_rev
+      curr_rev=$(svn info "$MODEL/modipsl/modeles/LMD"* | grep Revision: | cut -d ":" -f 2)
+      if [[ $svn_lmdz != "$curr_rev" ]]; then
+          local lmdzbranch
+          echo "Fetching LMDZ $svn_lmdz from the repository"
+          lmdzbranch=$(svn log -v -q https://svn.lmd.jussieu.fr/LMDZ -r "$svn_lmdz" | grep LMDZ | head -1 | sed -e 's:trunk/.*$:trunk:' | awk '{print $2}')
+          cd "$MODEL/modipsl/modeles"
+          rm -rf LMD*
+          svn co -r "$svn_lmdz" "https://svn.lmd.jussieu.fr/LMDZ$lmdzbranch" LMDZ
+          cd - > /dev/null
+      fi
     else  # get svn from info
          set +e; used_lmdz_rev=$(svn info | grep "Last Changed Rev" | cut -c 19-); set -e
