Index: BOL/LMDZ_Setup_amaury/setup.sh
===================================================================
--- BOL/LMDZ_Setup_amaury/setup.sh	(revision 4991)
+++ BOL/LMDZ_Setup_amaury/setup.sh	(revision 4993)
@@ -26,11 +26,9 @@
   #   in order to re-run the initialisation job, which downloads the aerosol files and interpolates them)
   aerosols="clim"
-  aerosols="n"  # TODO TEMP
 
   # SURFACE/VEGETATION SCHEME
-  # - "none" (bucket scheme) / "CMIP6" or "orch2.0" (orchidee version used in CMIP exercise) / "orch2.2" (orchidee version used in IPSLCM7 configuration) / number (orchidee version number - only rev 7983 on branch _2_2, and 7994 on trunk, are available)
-  # TODO check w/ Adriana why only 7983 & 7994, see if still relevant - is it a compilation issue ? Or an INIT issue ?
+  # - "none" (bucket scheme) / "CMIP6" (orchidee version used in CMIP exercise) / "7983" (orch2.2) / "7994" (trunk)
+  # If you need other orch versions, and also require XIOS, you'll need to create the appropriate files in DEF/XMLfilesOR...
   veget="CMIP6"
-#  veget="6592"  # TODO correct bug in install_lmdz where we don't know which fcm arg to fwd if we only give the rev... see w/ Laurent (choice in ols install_lmdz: only support >2.0)
 
   # New snow scheme INLANDSIS! "y" / "n"
@@ -198,4 +196,8 @@
     exit 1
   fi
+
+  if [[ $rad = "ecrad" && $phylmd != "lmd" ]]; then
+    echo "<rad=ecrad> is only supported for <phy=phylmd> here"  # (Amaury) I added this check because we fetch ecrad data from libf/phylmd/ecrad/data only.
+  fi
 }
 
@@ -219,9 +221,12 @@
   cp "$local/install_lmdz.sh" .
   chmod +x install_lmdz.sh
-  echo "./install_lmdz.sh -noclean $optim -v $version $svnopt -d $resol -rad $rad -bench 0 -parallel mpi_omp $ins_cosp $ins_xios $ins_aero $ins_inlandsis -name $LMDZname -veget $veget -netcdf $netcdf -arch $ARCH" >> install_lmdz_options.$$.sh
+  local make_j=8
+  echo "./install_lmdz.sh -noclean $optim -v $version $svnopt -d $resol -rad $rad -bench 0 -parallel mpi_omp $ins_cosp $ins_xios $ins_aero $ins_inlandsis -name $LMDZname -veget $veget -netcdf $netcdf -arch $ARCH -make_j $make_j" >> install_lmdz_options.$$.sh
   chmod +x install_lmdz_options.$$.sh
   echo "Running install_lmdz_options.$$.sh"
   set -o pipefail
-  gcm=$MODEL/$(./install_lmdz_options.$$.sh | tee /dev/tty | tail -n 1 | sed -n "s:.* executable is \(.*\.e\).*:\1:p")
+  # TODO (wip) Run install_lmdz using $RUNCMD to 1) speed up 2) avoid issues related to being on the "right" platform for compilation
+  # gcm=$MODEL/$($RUNCMD $make_j bash install_lmdz_options.$$.sh | tee /dev/tty | tail -n 1 | sed -n "s:.* executable is \(.*\.e\).*:\1:p")
+    gcm=$MODEL/$(./install_lmdz_options.$$.sh | tee /dev/tty | tail -n 1 | sed -n "s:.* executable is \(.*\.e\).*:\1:p")
   set +o pipefail
   mv install_lmdz.sh install_lmdz.$$.sh
@@ -305,5 +310,5 @@
   #---------------------------------------------------------------------
   sed -i'' -e 's/iflag_rrtm=.*.$/iflag_rrtm='"$iflag_rrtm"'/' -e 's/NSW=.*.$/NSW='"$NSW"'/' DEF/physiq.def
-  sed -i'' -e 's:directory_name.*$:directory_name="'"$local"'/ecrad_data",:' DEF/namelist_ecrad
+  sed -i"" -e "s:directory_name.*$:directory_name=\"$MODEL/libf/phylmd/ecrad/ecrad_data\",:" DEF/namelist_ecrad
 
   if [[ $phylmd = "lmdiso" ]]; then iflag_ice_thermo=0; else iflag_ice_thermo=1; fi
@@ -519,8 +524,4 @@
   done
   cd - > /dev/null
-
-  if [[ $rad = "ecrad" && ! -d ecrad_data ]]; then
-    cd "$local"; wget https://lmdz.lmd.jussieu.fr/pub/3DInputData/ecrad/ecrad_data.tar; tar xvf ecrad_data.tar; cd - > /dev/null
-  fi
 }
 
@@ -695,7 +696,8 @@
 function message_post_submit {
   if [[ $ok_guide = "y" && $init = 1 ]]; then
+    enable_platform era2gcm_tuto.sh
     echo "Once initialisation is finished, you have to create nudging files"
-    echo "Edit era2gcm.sh and set the desired parameters in section <User choices>"
-    echo "Make sure you have acces to the chosen ERA files, and the required modules are loaded, then run : ./era2gcm.sh"
+    echo "Edit era2gcm_tuto.sh and set the desired parameters in section <User choices>"
+    echo "Make sure you have acces to the chosen ERA files, and the required modules are loaded, then run : ./era2gcm_tuto.sh"
     if [[ $aerosols = "spla" ]]; then
       echo "Your aerosol choice is <spla>, so you need ERA 10m-winds interpolated on LMDZ grid. Use script era2gcm_uv10m.sh"
@@ -703,5 +705,5 @@
   else
     echo "Si tout se passe bien, vous avez initialisé et lancé automatiquement la simulation."
-    echo "Le job qui a été lancé se trouve sur $SIMRUNTOPDIR/$MAINDIR/tmp_$SIM"
+    echo "Le job qui a été lancé se trouve sur $SIMRUNTOPDIR/tmp_$SIM"
   fi
 }
@@ -724,42 +726,2 @@
 run_sim_or_init
 message_post_submit
-
-exit 1
-
-
-# COMPILATION OPTIONS depending on the user choices and LMDZ revision number $mysvn
-#-------------------------------------------------------
-
-if [[ $rad = "ecrad" && $aerosols != "n" && $mysvn -lt 4489 ]] ; then echo "Les aerosols tropospheriques ne sont pas pris en charge par ecrad avant LMDZ rev 4489, ici rev est $mysvn"; exit 1; fi
-
-# EXIT after (install and) compilation if we are on jean-zay-pp instead of jean-zay !
-hostname=`hostname`
-if [ ${hostname:0:11} = "jean-zay-pp" ]; then
- echo "You are on jean-zay-pp, here you only can install and compile the model, not run it"
- echo "If you want to run a simulation, log in to jean-zay and launch main.sh again, without install"
- echo `date`
- exit
-fi
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-###############################################################################
-# At the end, print on screen the compilation command, and also in a "compile.sh" script
-
-echo "To recompile the model :"
-echo "run the compile${sufiso}.sh script created in the present folder: ./compile${sufiso}.sh gcm "
