Index: /trunk/libIGCM/libIGCM_sys/libIGCM_sys_default.ksh
===================================================================
--- /trunk/libIGCM/libIGCM_sys/libIGCM_sys_default.ksh	(revision 799)
+++ /trunk/libIGCM/libIGCM_sys/libIGCM_sys_default.ksh	(revision 800)
@@ -23,8 +23,8 @@
 #D-
 #D- This ksh library if a layer under some usefull
-#D- environment variables and shell commands.
-#D- All those definitions depend on host particularities.
-#D- It manages a stack mechanism and test validity of operations.
-#D- All function described bellow must be prefixed by IGCM_sys.
+#D-environment variables and shell commands.
+#D-All those definitions depend on host particularities.
+#D-It manages a stack mechanism and test validity of operations.
+#D-All function described bellow must be prefixed by IGCM_sys.
 
 #====================================================
@@ -33,5 +33,5 @@
 
 #====================================================
-#set DEBUG_sys to true to output calls of function
+# set DEBUG_sys to true to output calls of function
 typeset -r DEBUG_sys=${DEBUG_sys:=true}
 
@@ -56,5 +56,5 @@
 
 #=====================================================
-#Global Variables :
+# Global Variables :
 #=====================================================
 # Language : "fr" or "en"
@@ -79,7 +79,6 @@
 # rsync with path
 typeset -r RSYNC=/usr/bin/rsync
-#RSYNC_opt args to rsync
+# RSYNC_opt args to rsync
 typeset -r RSYNC_opt="-va"
-#"-Lt -v"
 # ie storage filesystem
 typeset -r STOREHOST=${MASTER}
@@ -99,5 +98,5 @@
 
 #====================================================
-#- libIGCM_POST
+#- libIGCM_POST for frontend
 typeset -r libIGCM_POST=${libIGCM}
 
@@ -107,8 +106,4 @@
 
 #====================================================
-#- SCRATCHDIR (=> ${R_DONNEES})
-typeset -r SCRATCHDIR=/tmp
-
-#====================================================
 #- SUBMIT_DIR : submission dir
 typeset SUBMIT_DIR=${SUBMIT_DIR:=${PWD}}
@@ -117,4 +112,5 @@
 #- IN
 typeset -r R_IN=${R_IN:=/home/${LOGIN}/IGCM}
+typeset -r R_IN_ECMWF=${R_IN_ECMWF:=/home/${LOGIN}/IGCM}
 
 #====================================================
@@ -127,32 +123,26 @@
 
 #====================================================
-#- OUT
-IGCM_OUT=${IGCM_OUT:=IGCM_OUT}
-typeset -r R_OUT=${ARCHIVE}/${IGCM_OUT}
+#- R_OUT
+typeset R_OUT=${ARCHIVE}/IGCM_OUT
 
 #====================================================
 #- R_FIG (hosting figures : monitoring and atlas, and/or small files)
-typeset -r R_FIG=${STORAGE}/IGCM_OUT
+typeset R_FIG=${STORAGE}/IGCM_OUT
 
 #====================================================
 #- R_BUF (ONLY FOR double copy an scratch)
-typeset -r R_BUF=${SCRATCHDIR}/IGCM_OUT
+typeset -r R_BUF=${STORAGE}/IGCM_OUT
 
 #====================================================
 #- BIG_DIR : BIG_DIR to store files waiting for rebuild
-typeset -r BIG_DIR=${BIG_DIR:=${SCRATCHDIR}/REBUILD}
+typeset -r BIG_DIR=${BIG_DIR:=${STORAGE}/REBUILD}
 
 #====================================================
 #- RUN_DIR_PATH : Temporary working directory (=> TMP)
-typeset -r RUN_DIR_PATH=${RUN_DIR_PATH:=${SCRATCHDIR}/tmp$$}
+typeset -r RUN_DIR_PATH=${RUN_DIR_PATH:=${STORAGE}/RUN_DIR/tmp$$}
 
 #====================================================
 #- HOST_MPIRUN_COMMAND
 typeset -r HOST_MPIRUN_COMMAND=${HOST_MPIRUN_COMMAND:="time mpirun"}
-
-#=========================================================
-#- Add "time" before mpirun command
-MPIRUN_COMMAND="time "${MPIRUN_COMMAND}
-echo ${MPIRUN_COMMAND}
 
 #====================================================
@@ -186,14 +176,10 @@
 #D-#==================================================
 #D-function IGCM_sys_RshMaster
-#D-* Purpose: Just a fake command to wrapp
-#D-           IGCM_card call in post-treatment
-#D-           Ulam do not see brodie filesystem
-#D-           Cesium do not see all mercure filesystem
-#D-           That's why we need this hack.
+#D-* Purpose: Connection to frontend machine.
 #D-* Examples:
 #D-
 function IGCM_sys_RshMaster {
   IGCM_debug_PushStack "IGCM_sys_RshMaster" $@
-  ssh ${HOST} /bin/ksh  <<-EOF
+  /bin/ksh <<-EOF
     export libIGCM=${libIGCM}
     export DEBUG_debug=${DEBUG_debug}
@@ -216,5 +202,5 @@
 function IGCM_sys_RshArchive {
   IGCM_debug_PushStack "IGCM_sys_RshArchive" $@
-  /bin/ksh  <<-EOF
+  /bin/ksh <<-EOF
     ${@}
 EOF
@@ -231,5 +217,4 @@
 #D-* Examples:
 #D-
-(( RshPNum = 0 ))
 function IGCM_sys_RshPost {
   IGCM_debug_PushStack "IGCM_sys_RshPost" $@
@@ -237,11 +222,18 @@
     echo "IGCM_sys_RshPost :" $@
   fi
-  #/bin/ksh -vx $@ > out_RshPost.${RshPNum}
-  ssh ${HOST} /bin/ksh $@ > out_RshPost.${RshPNum}
+
+  #echo cat tmp_IGCM_sys_RshPost_$$ INITIAL
+  #cat tmp_IGCM_sys_RshPost_$$
+  # keep standard input (stdin) for the loop onto temporary file
+  cat >tmp_IGCM_sys_RshPost_$$
+
+  /bin/ksh <tmp_IGCM_sys_RshPost_$$
   if [ $? -gt 0 ] ; then
     echo "IGCM_sys_RshPost : erreur."
     IGCM_debug_Exit "IGCM_sys_RshPost"
   fi
-  (( RshPNum = RshPNum + 1 ))
+  # delete temporary file
+  \rm tmp_IGCM_sys_RshPost_$$
+
   IGCM_debug_PopStack "IGCM_sys_RshPost"
 }
@@ -263,4 +255,5 @@
     status=completed
   fi
+
   cat  << END_MAIL > job_end.mail
 Dear ${LOGIN},
@@ -270,4 +263,6 @@
   Job ended   : ${DateEnd}
   Output files are available in ${R_SAVE}
+  Files to be rebuild are temporarily available in ${REBUILD_DIR}
+  Pre-packed files are temporarily available in ${R_BUFR}
   Script files, Script Outputs and Debug files (if necessary) are available in ${SUBMIT_DIR}
 END_MAIL
@@ -303,5 +298,5 @@
     fi
   fi
-    # vérification :
+  # vérification :
   if [ ! -d ${1} ] ; then
     echo "IGCM_sys_Mkdir : erreur."
@@ -321,5 +316,5 @@
     echo "IGCM_sys_MkdirArchive :" $@
   fi
-    #- creation de repertoire sur le serveur fichier
+  #- creation de repertoire sur le serveur fichier
   if [ ! -d ${1} ]; then
     \mkdir -p $1
@@ -342,5 +337,5 @@
     echo "IGCM_sys_MkdirWork :" $@
   fi
-    #- creation de repertoire sur le serveur fichier
+  #- creation de repertoire sur le serveur fichier
   if [ ! -d ${1} ]; then
     \mkdir -p $1
@@ -446,4 +441,22 @@
 
 #D-#==================================================
+#D-function IGCM_sys_IsFileArchived
+#D-* Purpose: Test file that must NOT EXISTS on Archive
+#D-* Examples:
+#D-
+function IGCM_sys_IsFileArchived {
+  IGCM_debug_PushStack "IGCM_sys_IsFileArchived" $@
+  if ( $DEBUG_sys ) ; then
+    echo "IGCM_sys_IsFileArchived :" $@
+  fi
+  typeset IsArchivedFlag
+  # Never archived for this system
+  IsArchivedFlag=1
+  IGCM_debug_PopStack "IGCM_sys_IsFileArchived"
+
+  return ${IsArchivedFlag}
+}
+
+#D-#==================================================
 #D-function IGCM_sys_TestFileArchive
 #D-* Purpose: Test file that must NOT EXISTS on Archive
@@ -563,8 +576,8 @@
     echo "IGCM_sys_Qsub :" $@
   fi
-  echo "ssh -l ${LOGIN} ${HOST} ""cd ${SUBMIT_DIR} ; ${@}"" > ${Script_Output} 2>&1 &"
-  ssh -l ${LOGIN} ${HOST} "cd ${SUBMIT_DIR} ; ${@}" > ${Script_Output} 2>&1 &
+  echo "${@} > ${SUBMIT_DIR}/${Script_Output} 2>&1 &"
+  ${@} > ${SUBMIT_DIR}/${Script_Output} 2>&1 &
   if [ $? -gt 0 ] ; then
-    echo "IGCM_sys_Qsub : erreur."
+    echo "IGCM_sys_Qsub : erreur ${options} $1"
     IGCM_debug_Exit "IGCM_sys_Qsub"
   fi
@@ -582,9 +595,6 @@
     echo "IGCM_sys_QsubPost :" $@
   fi
-    #echo "ssh -x -l ${LOGIN} ${HOST} ${3} > ${2} 2>&1 &"
-    #    ssh -x -l ${LOGIN} ${HOST}
   echo "${libIGCM_POST}/$1.job > ${POST_DIR}/$1.${PeriodDateEnd}.out 2>&1 &"
   ${libIGCM_POST}/$1.job > ${POST_DIR}/${Script_Post_Output}.out 2>&1 &
-    #    ${3} > ${2} 2>&1 &
   if [ $? -gt 0 ] ; then
     echo "IGCM_sys_QsubPost : erreur " $@
@@ -602,14 +612,14 @@
 #D-function IGCM_sys_Rsync_out
 #D-* Purpose: treat return val of rsync
-#D-* Examples:  IGCM_sys_Rsync_out out_RET_rsync
+#D-* Examples: IGCM_sys_Rsync_out out_RET_rsync
 #D-  Error values and explanations can depend on your system version.
 function IGCM_sys_Rsync_out {
-  RET=$1
-  if [ ! $RET ] ; then
+  status=$1
+  if [ ! $status ] ; then
     echo "rsync error !"
   fi
 
   if [ $MYLANG = "fr" ]; then
-    case $RET in
+    case $status in
     0)  return ;;
     1)  echo "Erreur de rsync ; RERR_SYNTAX : "
@@ -659,9 +669,9 @@
       echo "Temps d'attente écoulé dans l'envoi/réception de données"
       return;;
-    *)  echo "Erreur de rsync : code de retour de rsync inconnu :" $RET
+    *)  echo "Erreur de rsync : code de retour de rsync inconnu :" $status
       return;;
     esac
   elif [ $MYLANG = "en" ] ; then
-    case $RET in
+    case $status in
     0)  return;;
     1)  echo "rsync error : Syntax or usage error "
@@ -700,5 +710,5 @@
     30) echo "rsync error : Timeout in data send/receive "
       return;;
-    *)  echo "rsync error : return code of rsync unknown :" $RET
+    *)  echo "rsync error : return code of rsync unknown :" $status
       return;;
     esac
@@ -773,5 +783,5 @@
   if ( $DEBUG_sys ) ; then
     echo "IGCM_sys_RmRunDir :" $@
-    echo "Dummy call, let the scheduler do that."
+    echo "Dummy call, let the user do that."
 #    IGCM_sys_Rm -rf ${RUN_DIR}
   fi
@@ -870,5 +880,5 @@
     typeset RET
 
-        #USUAL WAY
+    #USUAL WAY
     \cp -R $1 $2 > out_rsync 2>&1
     RET=$?
@@ -906,5 +916,5 @@
     typeset RET
 
-        #USUAL WAY
+    #USUAL WAY
     cp -RL $1 $2 > out_rsync 2>&1
     RET=$?
@@ -1041,5 +1051,5 @@
 
     typeset RET
-        #
+    #
     if [ X${JobType} = XRUN ] ; then
       if [ X${3} = X ] ; then
@@ -1047,5 +1057,5 @@
       fi
     fi
-        #
+    #
 
     echo ${RSYNC} ${RSYNC_opt} $1 $2 > out_rsync 2>&1
@@ -1138,5 +1148,5 @@
     eval DEST=\${${#}}
 
-        # test if the (first) file is present in the old computation :
+    # test if the (first) file is present in the old computation :
     IGCM_sys_TestFileArchive ${dm_liste[0]}
     RET=$?
@@ -1238,5 +1248,5 @@
   eval ${2}=${dateF[5]}
 
-    # donne la date filesys d'un fichier sur la machine work
+  # donne la date filesys d'un fichier sur la machine work
   IGCM_debug_PopStack "IGCM_sys_FichWork"
 }
@@ -1270,5 +1280,4 @@
   return 0
 }
-
 
 #D-#==================================================
@@ -1332,5 +1341,5 @@
   list_opt=$@
 
-  # Invert Axis : t,x -> x,t 
+  # Invert Axis : t,x -> x,t
   #               t,pres,x -> x,t,pres
   # So that we can concatenate along x
@@ -1395,5 +1404,5 @@
 #      j3=${proc_stn[${iStation}]}
       # Extract station
-      # Invert Axis : t,x -> x,t 
+      # Invert Axis : t,x -> x,t
       #               t,pres,x -> x,t,pres
       # So that we can concatenate along x
@@ -1438,5 +1447,5 @@
 
 ############################################################
-# Build run file
+# Build MPI/OMP scripts run file (dummy function)
 
 function IGCM_sys_build_run_file {
@@ -1740,4 +1749,5 @@
       \rm out_rsync
       IGCM_debug_Print 2 "IGCM_sys_ncap2 : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again."
+      sleep $DELAI
     else
       \rm out_rsync
@@ -1776,4 +1786,5 @@
       \rm out_rsync
       IGCM_debug_Print 2 "IGCM_sys_ncatted : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again."
+      sleep $DELAI
     else
       \rm out_rsync
@@ -1812,4 +1823,5 @@
       \rm out_rsync
       IGCM_debug_Print 2 "IGCM_sys_ncbo : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again."
+      sleep $DELAI
     else
       \rm out_rsync
@@ -1848,4 +1860,5 @@
       \rm out_rsync
       IGCM_debug_Print 2 "IGCM_sys_ncdiff : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again."
+      sleep $DELAI
     else
       \rm out_rsync
@@ -1884,4 +1897,5 @@
       \rm out_rsync
       IGCM_debug_Print 2 "IGCM_sys_ncea : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again."
+      sleep $DELAI
     else
       \rm out_rsync
@@ -1920,4 +1934,5 @@
       \rm out_rsync
       IGCM_debug_Print 2 "IGCM_sys_ncecat : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again."
+      sleep $DELAI
     else
       \rm out_rsync
@@ -1956,4 +1971,5 @@
       \rm out_rsync
       IGCM_debug_Print 2 "IGCM_sys_ncflint : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again."
+      sleep $DELAI
     else
       \rm out_rsync
@@ -1992,4 +2008,5 @@
       \rm out_rsync
       IGCM_debug_Print 2 "IGCM_sys_ncks : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again."
+      sleep $DELAI
     else
       \rm out_rsync
@@ -2028,4 +2045,5 @@
       \rm out_rsync
       IGCM_debug_Print 2 "IGCM_sys_ncpdq : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again."
+      sleep $DELAI
     else
       \rm out_rsync
@@ -2064,4 +2082,5 @@
       \rm out_rsync
       IGCM_debug_Print 2 "IGCM_sys_ncra : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again."
+      sleep $DELAI
     else
       \rm out_rsync
@@ -2100,4 +2119,5 @@
       \rm out_rsync
       IGCM_debug_Print 2 "IGCM_sys_ncrcat : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again."
+      sleep $DELAI
     else
       \rm out_rsync
@@ -2136,4 +2156,5 @@
       \rm out_rsync
       IGCM_debug_Print 2 "IGCM_sys_ncrename : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again."
+      sleep $DELAI
     else
       \rm out_rsync
@@ -2172,4 +2193,5 @@
       \rm out_rsync
       IGCM_debug_Print 2 "IGCM_sys_ncwa : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again."
+      sleep $DELAI
     else
       \rm out_rsync
Index: /trunk/libIGCM/libIGCM_sys/libIGCM_sys_obelix.ksh
===================================================================
--- /trunk/libIGCM/libIGCM_sys/libIGCM_sys_obelix.ksh	(revision 799)
+++ /trunk/libIGCM/libIGCM_sys/libIGCM_sys_obelix.ksh	(revision 800)
@@ -64,7 +64,7 @@
 # Host and user names
 # $hostname ou hostname
-typeset HOST=${HOST:=$( hostname )}
+typeset  HOST=${HOST:=$( hostname )}
 # $username ou whoami
-typeset LOGIN=${LOGIN:=$( whoami )}
+typeset  LOGIN=${LOGIN:=$( whoami )}
 # $hostname of the MASTER job
 typeset MASTER=${MASTER:=$( hostname )}
@@ -111,16 +111,4 @@
 
 #====================================================
-#- SCRATCHDIR (=> ${R_DONNEES})
-if [ X${PBS_O_WORKDIR} != X ] ; then
-  typeset -r SCRATCHDIR=/scratch/$PBS_O_LOGNAME.$PBS_JOBID
-#==${WORKDIR}
-# cf /usr/Local/Env sur obelix
-else
-  typeset -r SCRATCHDIR=/tmp
-fi
-#FOR DEBUG RUN :
-#typeset -r SCRATCHDIR=/home/scratch01/${LOGIN}
-
-#====================================================
 #- SUBMIT_DIR : submission dir
 if [ X${PBS_O_WORKDIR} != X ] ; then
@@ -136,38 +124,33 @@
 #====================================================
 #- ARCHIVE (dedicated to large files)
-typeset -r ARCHIVE=${ARCHIVE:=/home/scratch01/${LOGIN}}
+typeset ARCHIVE=${ARCHIVE:=/home/scratch01/${LOGIN}}
 
 #====================================================
 #- STORAGE (dedicated to small/medium files)
-typeset -r STORAGE=${ARCHIVE}
+typeset STORAGE=${ARCHIVE}
 
 #====================================================
 #- R_OUT
-typeset -r R_OUT=${ARCHIVE}/IGCM_OUT
+typeset R_OUT=${ARCHIVE}/IGCM_OUT
 
 #====================================================
 #- R_FIG (hosting figures : monitoring and atlas, and/or small files)
-typeset -r R_FIG=${STORAGE}/IGCM_OUT
+typeset R_FIG=${STORAGE}/IGCM_OUT
 
 #====================================================
 #- R_BUF (ONLY FOR double copy an scratch)
-typeset -r R_BUF=/home/scratch01/${LOGIN}/IGCM_OUT
+typeset -r R_BUF=${STORAGE}/IGCM_OUT
 
 #====================================================
 #- BIG_DIR : BIG_DIR to store files waiting for rebuild
-typeset -r BIG_DIR=${BIG_DIR:=${SCRATCHDIR}/REBUILD}
+typeset -r BIG_DIR=${BIG_DIR:=${STORAGE}/REBUILD}
 
 #====================================================
 #- RUN_DIR_PATH : Temporary working directory (=> TMP)
-typeset -r RUN_DIR_PATH=${RUN_DIR_PATH:=${SCRATCHDIR}/tmp$$}
+typeset -r RUN_DIR_PATH=${RUN_DIR_PATH:=/scratch/$PBS_O_LOGNAME.$PBS_JOBID}
 
 #====================================================
 #- HOST_MPIRUN_COMMAND
 typeset -r HOST_MPIRUN_COMMAND=${HOST_MPIRUN_COMMAND:="time mpirun"}
-
-#=========================================================
-#- Add "time" before mpirun command
-MPIRUN_COMMAND="time "${MPIRUN_COMMAND}
-echo ${MPIRUN_COMMAND}
 
 #====================================================
@@ -201,9 +184,5 @@
 #D-#==================================================
 #D-function IGCM_sys_RshMaster
-#D-* Purpose: Just a fake command to wrapp
-#D-           IGCM_card call in post-treatment
-#D-           Ulam do not see brodie filesystem
-#D-           Cesium do not see all mercure filesystem
-#D-           That's why we need this hack.
+#D-* Purpose: Connection to frontend machine.
 #D-* Examples:
 #D-
@@ -246,5 +225,4 @@
 #D-* Examples:
 #D-
-(( RshPNum = 0 ))
 function IGCM_sys_RshPost {
   IGCM_debug_PushStack "IGCM_sys_RshPost" $@
@@ -252,10 +230,19 @@
     echo "IGCM_sys_RshPost :" $@
   fi
-  ssh obelix3 exec /bin/ksh $@ > out_RshPost.${RshPNum}
+
+  #echo cat tmp_IGCM_sys_RshPost_$$ INITIAL
+  #cat tmp_IGCM_sys_RshPost_$$
+  # keep standard input (stdin) for the loop onto temporary file
+  cat >tmp_IGCM_sys_RshPost_$$
+
+# ============ FRONTEND START ============ #
+
+    ssh obelix3 exec /bin/ksh <tmp_IGCM_sys_RshPost_$$
   if [ $? -gt 0 ] ; then
     echo "IGCM_sys_RshPost : erreur."
     IGCM_debug_Exit "IGCM_sys_RshPost"
   fi
-  (( RshPNum = RshPNum + 1 ))
+  # delete temporary file
+  \rm tmp_IGCM_sys_RshPost_$$
   IGCM_debug_PopStack "IGCM_sys_RshPost"
 }
@@ -285,4 +272,6 @@
   Job ended   : ${DateEnd}
   Output files are available in ${R_SAVE}
+  Files to be rebuild are temporarily available in ${REBUILD_DIR}
+  Pre-packed files are temporarily available in ${R_BUFR}
   Script files, Script Outputs and Debug files (if necessary) are available in ${SUBMIT_DIR}
 END_MAIL
@@ -461,4 +450,22 @@
 
 #D-#==================================================
+#D-function IGCM_sys_IsFileArchived
+#D-* Purpose: Test file that must NOT EXISTS on Archive
+#D-* Examples:
+#D-
+function IGCM_sys_IsFileArchived {
+  IGCM_debug_PushStack "IGCM_sys_IsFileArchived" $@
+  if ( $DEBUG_sys ) ; then
+    echo "IGCM_sys_IsFileArchived :" $@
+  fi
+  typeset IsArchivedFlag
+  # Never archived for this system
+  IsArchivedFlag=1
+  IGCM_debug_PopStack "IGCM_sys_IsFileArchived"
+
+  return ${IsArchivedFlag}
+}
+
+#D-#==================================================
 #D-function IGCM_sys_TestFileArchive
 #D-* Purpose: Test file that must NOT EXISTS on Archive
@@ -578,5 +585,4 @@
     echo "IGCM_sys_Qsub :" $@
   fi
-#    /usr/local/bin/qsub -q short -o ${Script_Output} -N ${config_UserChoices_JobName}.${CumulPeriod} < $1
   /usr/local/bin/qsub -q medium -o ${Script_Output} -N ${config_UserChoices_JobName}.${CumulPeriod} < $1
   if [ $? -gt 0 ] ; then
@@ -1263,5 +1269,5 @@
   eval ${2}=${dateF[5]}
 
-    # donne la date filesys d'un fichier sur la machine work
+  # donne la date filesys d'un fichier sur la machine work
   IGCM_debug_PopStack "IGCM_sys_FichWork"
 }
@@ -1350,5 +1356,5 @@
   list_opt=$@
 
-  # Invert Axis : t,x -> x,t 
+  # Invert Axis : t,x -> x,t
   #               t,pres,x -> x,t,pres
   # So that we can concatenate along x
@@ -1413,5 +1419,5 @@
 #      j3=${proc_stn[${iStation}]}
       # Extract station
-      # Invert Axis : t,x -> x,t 
+      # Invert Axis : t,x -> x,t
       #               t,pres,x -> x,t,pres
       # So that we can concatenate along x
@@ -1456,5 +1462,5 @@
 
 ############################################################
-# Build run file
+# Build MPI/OMP scripts run file (dummy function)
 
 function IGCM_sys_build_run_file {
@@ -1737,5 +1743,4 @@
 # NCO OPERATOR
 
-
 function IGCM_sys_ncap2 {
   IGCM_debug_PushStack "IGCM_sys_ncap2" -- $@
@@ -1759,4 +1764,5 @@
       \rm out_rsync
       IGCM_debug_Print 2 "IGCM_sys_ncap2 : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again."
+      sleep $DELAI
     else
       \rm out_rsync
@@ -1795,4 +1801,5 @@
       \rm out_rsync
       IGCM_debug_Print 2 "IGCM_sys_ncatted : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again."
+      sleep $DELAI
     else
       \rm out_rsync
@@ -1831,4 +1838,5 @@
       \rm out_rsync
       IGCM_debug_Print 2 "IGCM_sys_ncbo : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again."
+      sleep $DELAI
     else
       \rm out_rsync
@@ -1867,4 +1875,5 @@
       \rm out_rsync
       IGCM_debug_Print 2 "IGCM_sys_ncdiff : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again."
+      sleep $DELAI
     else
       \rm out_rsync
@@ -1903,4 +1912,5 @@
       \rm out_rsync
       IGCM_debug_Print 2 "IGCM_sys_ncea : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again."
+      sleep $DELAI
     else
       \rm out_rsync
@@ -1939,4 +1949,5 @@
       \rm out_rsync
       IGCM_debug_Print 2 "IGCM_sys_ncecat : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again."
+      sleep $DELAI
     else
       \rm out_rsync
@@ -1975,4 +1986,5 @@
       \rm out_rsync
       IGCM_debug_Print 2 "IGCM_sys_ncflint : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again."
+      sleep $DELAI
     else
       \rm out_rsync
@@ -2011,4 +2023,5 @@
       \rm out_rsync
       IGCM_debug_Print 2 "IGCM_sys_ncks : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again."
+      sleep $DELAI
     else
       \rm out_rsync
@@ -2047,4 +2060,5 @@
       \rm out_rsync
       IGCM_debug_Print 2 "IGCM_sys_ncpdq : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again."
+      sleep $DELAI
     else
       \rm out_rsync
@@ -2083,4 +2097,5 @@
       \rm out_rsync
       IGCM_debug_Print 2 "IGCM_sys_ncra : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again."
+      sleep $DELAI
     else
       \rm out_rsync
@@ -2119,4 +2134,5 @@
       \rm out_rsync
       IGCM_debug_Print 2 "IGCM_sys_ncrcat : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again."
+      sleep $DELAI
     else
       \rm out_rsync
@@ -2155,4 +2171,5 @@
       \rm out_rsync
       IGCM_debug_Print 2 "IGCM_sys_ncrename : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again."
+      sleep $DELAI
     else
       \rm out_rsync
@@ -2191,4 +2208,5 @@
       \rm out_rsync
       IGCM_debug_Print 2 "IGCM_sys_ncwa : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again."
+      sleep $DELAI
     else
       \rm out_rsync
