Index: BOL/LMDZ_Setup_amaury/script_SIMU
===================================================================
--- BOL/LMDZ_Setup_amaury/script_SIMU	(revision 4955)
+++ BOL/LMDZ_Setup_amaury/script_SIMU	(revision 4956)
@@ -19,13 +19,14 @@
 
 set -ex
+set +u  # Amaury 06/24: for local use (no $SLURM_CPUS_PER_TASK) - should be removed if we ever rewrite this whole legacy script properly...
 
 # Number of MPI processes :
 ntasks=8
+# number of OpenMP threads
+nthreads=8
+export OMP_NUM_THREADS=$nthreads
 
 # For Jean-Zay (replacing the next 3 lines, commented out) 
-export OMP_NUM_THREADS=$SLURM_CPUS_PER_TASK
-## number of OpenMP threads  
-##nthreads=8 
-##export OMP_NUM_THREADS=$nthreads 
+#export OMP_NUM_THREADS=$SLURM_CPUS_PER_TASK
 
 # private memory for each thread
@@ -133,5 +134,5 @@
 if [ "$climato" = "0" ] ; then calend=gregorian ; else calend=earth_360d ; fi
 bisextile=0
-if [ $(( $year % 4 )) = 0 -a $calend = gregorian ] ; then bisextile=1 ; fi
+if [[ $(( year % 4 )) = 0 && $calend = gregorian ]] ; then bisextile=1 ; fi
 if [ $paran = 0 ] ; then
    if [ "$calend" = "gregorian" ] ; then
@@ -211,5 +212,5 @@
   fi
 
-  ## Ca doit etre la meme liste de fichiers rapatriee par setup.sh dans $LMDZ_Init/SPLA_Init 
+  ## Ca doit etre la meme liste de fichiers rapatriee par setup.sh dans $LMDZ_INIT/SPLA_Init
   ## et interpolee (setup.sh aussi) dans $SPLADIR
   if [ $aerosols = spla ] ; then 
@@ -244,5 +245,5 @@
     set +e ; for t in stomate sechiba ; do cp $SIMUDIR/start_$t.$ym.nc ${t}_rest_in.nc ; done ; set -e
     if [ "`grep RIVER_ROUTING orchidee.def |grep -i y`" ] ; then
-      set +e ; ln -s $LMDZ_Init/routing_simple.nc . ; ln -s $LMDZ_Init/routing.nc . 
+      set +e ; ln -s $LMDZ_INIT/routing_simple.nc . ; ln -s $LMDZ_INIT/routing.nc .
                cp $SIMUDIR/start_routing.$ym.nc routing_start.nc ; set -e
     fi
@@ -258,5 +259,5 @@
        echo "Autoinitialisation d'orchidee au besoin"
        echo '#########################################################'
-       get="ln -s $LMDZ_Init/"
+       get="ln -s $LMDZ_INIT/"
        for file in cartepente2d_15min.nc \
           lai2D.nc soils_param.nc soil_bulk_and_ph.nc alb_bg_modisopt_2D_ESA_v2.nc reftemp.nc ; do ${get}$file ; done
@@ -273,5 +274,5 @@
 
       if [ $veget = 7994 ] ; then
-         get="ln -s $LMDZ_Init/"
+         get="ln -s $LMDZ_INIT/"
          for file in ndep_nhx.nc ndep_noy.nc nfert_cropland.nc nfert_pasture.nc nmanure_cropland.nc nmanure_pasture.nc bnf.nc ; do ${get}$file ; done
       fi
@@ -306,5 +307,5 @@
 echo '##################################################################'
 
-time $run $ntasks ./gcm.e > listing
+time $RUNCMD $ntasks ./gcm.e > listing
 if [ ! -f restartphy.nc ] ; then
 echo PROBLEME PAS DE FICHIER RESTARTPHY
