Index: /trunk/libIGCM/libIGCM_sys/libIGCM_sys_ada.ksh
===================================================================
--- /trunk/libIGCM/libIGCM_sys/libIGCM_sys_ada.ksh	(revision 810)
+++ /trunk/libIGCM/libIGCM_sys/libIGCM_sys_ada.ksh	(revision 811)
@@ -251,6 +251,5 @@
     echo "IGCM_sys_RshPost :" $@
   fi
-
-  # keep standard input to keep it for postpone if ulam don't answer
+  # keep standard input (stdin) for the loop onto temporary file
   cat >/tmp/tmp_IGCM_sys_RshPost_$$_${LOGNAME}
 
@@ -627,6 +626,5 @@
   IGCM_debug_PushStack "IGCM_sys_Qsub" $@
 
-  typeset ERROR
-  ERROR=0
+  typeset status
 
   if ( $DEBUG_sys ) ; then
@@ -639,8 +637,8 @@
       -e "s:\# \@ error *= .*:\# \@ error = ${Script_Output}:"   \
       $1 > ${REP_FOR_JOB}/JOB_FOR_IGCM
-  cd $REP_FOR_JOB ; /usr/bin/llsubmit JOB_FOR_IGCM ; ERROR=$? ; cd - ;
-
-  if [ ${ERROR} -gt 0 ] ; then
-    echo "IGCM_sys_Qsub : erreur $@"
+  cd $REP_FOR_JOB ; /usr/bin/llsubmit JOB_FOR_IGCM ; status=$? ; cd - ;
+
+  if [ ${status} -gt 0 ] ; then
+    IGCM_debug_Print 2 "IGCM_sys_Qsub $1 : error code ${status}"
     IGCM_debug_Exit "IGCM_sys_Qsub"
   else
@@ -658,6 +656,5 @@
   IGCM_debug_PushStack "IGCM_sys_QsubPost" $@
 
-  typeset ERROR
-  ERROR=0
+  typeset status
 
   if ( $DEBUG_sys ) ; then
@@ -672,12 +669,11 @@
       ${libIGCM_POST}/$1.job > ${REP_FOR_JOB}/JOB_FOR_IGCM
 
-  cd $REP_FOR_JOB ; /usr/bin/llsubmit JOB_FOR_IGCM ; ERROR=$? ; cd - ;
-  if [ ${ERROR} -gt 0 ] ; then
-    echo "IGCM_sys_QsubPost : erreur $@."
+  cd $REP_FOR_JOB ; /usr/bin/llsubmit JOB_FOR_IGCM ; status=$? ; cd - ;
+  if [ ${status} -gt 0 ] ; then
+    IGCM_debug_Print 2 "IGCM_sys_QsubPost $1 : error code ${status}"
     IGCM_debug_Exit "IGCM_sys_QsubPost"
   else
     IGCM_sys_Rm ${REP_FOR_JOB}/JOB_FOR_IGCM
   fi
-
   IGCM_debug_PopStack "IGCM_sys_QsubPost"
 }
@@ -800,5 +796,5 @@
 #D-#==================================================
 #D-function IGCM_sys_Miror_libIGCM
-#D-* Purpose: Mirror libIGCM PATH and lib to ulam
+#D-* Purpose: Mirror libIGCM PATH and lib to frontend
 #D-* Examples:
 #D-
@@ -818,5 +814,5 @@
 
   if [ ${status} -gt 0 ] ; then
-    echo "IGCM_sys_Mirror_libIGCM Warning : no libIGCM on cesium."
+    echo "IGCM_sys_Mirror_libIGCM Warning : no libIGCM on frontend."
     cat out_rsync
   fi
@@ -1214,5 +1210,4 @@
   fi
   echo $( basename $1 )
-
   IGCM_debug_PopStack "IGCM_sys_PrepareTaredRestart"
 }
@@ -1615,4 +1610,9 @@
 # REBUILD OPERATOR
 
+#D-#==================================================
+#D-function IGCM_sys_rebuild
+#D-* Purpose: rebuild parallel files
+#D-* Examples:
+#D-
 function IGCM_sys_rebuild {
   IGCM_debug_PushStack "IGCM_sys_rebuild" -- $@
@@ -1654,4 +1654,9 @@
 }
 
+#D-#==================================================
+#D-function IGCM_sys_rebuild_station
+#D-* Purpose: rebuild parallel files describing station 
+#D-* Examples:
+#D-
 function IGCM_sys_rebuild_station {
   IGCM_debug_PushStack "IGCM_sys_rebuild_station" -- $@
@@ -1748,9 +1753,22 @@
 # Activate Running Environnment Variables
 
+#D-#==================================================
+#D-function IGCM_sys_desactiv_variables
+#D-* Purpose: set environement variables prior to execution
+#D-* Examples:
+#D-
 function IGCM_sys_activ_variables {
   IGCM_debug_PushStack "IGCM_sys_activ_variables"
   if ( $DEBUG_sys ) ; then
-    echo "IGCM_sys_activ_variables "
-  fi
+    echo "IGCM_sys_activ_variables"
+  fi
+
+# --------------------------------------------------------------------
+#D- MPI specifications
+# --------------------------------------------------------------------
+
+# --------------------------------------------------------------------
+#D- Other specifications
+# --------------------------------------------------------------------
 
   ulimit -s unlimited
@@ -1767,8 +1785,13 @@
 # Desactivate Running Environnment Variables
 
+#D-#==================================================
+#D-function IGCM_sys_desactiv_variables
+#D-* Purpose: unset environement variables after execution
+#D-* Examples:
+#D-
 function IGCM_sys_desactiv_variables {
   IGCM_debug_PushStack "IGCM_sys_desactiv_variables"
   if ( $DEBUG_sys ) ; then
-    echo "IGCM_sys_desactiv_variables "
+    echo "IGCM_sys_desactiv_variables"
   fi
 # --------------------------------------------------------------------
@@ -1786,7 +1809,12 @@
 # Build MPI/OMP scripts run file (dummy function)
 
+#D-#==================================================
+#D-function IGCM_sys_build_run_file
+#D-* Purpose: build run file (deprecated)
+#D-* Examples:
+#D-
 function IGCM_sys_build_run_file {
 
-IGCM_debug_Print 3 " dummy function : IGCM_sys_build_run_file "
+  IGCM_debug_Print 3 " dummy function : IGCM_sys_build_run_file "
 
 }
@@ -1794,4 +1822,10 @@
 ############################################################
 # Build MPI/OMP scripts
+
+#D-#==================================================
+#D-function IGCM_sys_build_execution_scripts
+#D-* Purpose: build execution scripts to be launch by ${HOST_MPIRUN_COMMAND}
+#D-* Examples:
+#D-
 function IGCM_sys_build_execution_scripts
 {
@@ -1873,5 +1907,4 @@
   else # Only one executable. launch it.
 
-    #
     for comp in ${config_ListOfComponents[*]} ; do
 
@@ -1893,12 +1926,19 @@
 
 ############################################################
-# Check of space available on temporary filesytems
+# Check of space available on temporary filesytems.
+
+#D-#==================================================
+#D-function IGCM_sys_check_quota
+#D-* Purpose: check user quota. Stop the simulation if quota above 90%
+#D-* Examples:
+#D-
 function IGCM_sys_check_quota {
   IGCM_debug_PushStack "IGCM_sys_check_quota"
   if ( $DEBUG_sys ) ; then
-    echo "IGCM_sys_check_quota "
+    echo "IGCM_sys_check_quota"
   fi
   # Limit of quota (in %)
   limit_quota=90
+
   # Check of the volume
   volume_quota=$(quota_u -w | grep 'Quota soft' | awk '{print $5}')
@@ -1925,5 +1965,4 @@
 #D-* Examples: IGCM_sys_CountJobInQueue ${JobName} NbRun
 #D-
-
 function IGCM_sys_CountJobInQueue {
   IGCM_debug_PushStack "IGCM_sys_CountJobInQueue"
@@ -1943,4 +1982,9 @@
 # NCO OPERATOR
 
+#D-#==================================================
+#D-function IGCM_sys_ncap2
+#D-* Purpose: encapsulate ncap2 call so as to manage error code and retry
+#D-* Examples:
+#D-
 function IGCM_sys_ncap2 {
   IGCM_debug_PushStack "IGCM_sys_ncap2" -- $@
@@ -1973,6 +2017,6 @@
 
   if [ ${status} -gt 0 ] ; then
-      echo "IGCM_sys_ncap2 : ncap2 error"
-      IGCM_debug_Exit "ncap2"
+    echo "IGCM_sys_ncap2 : ncap2 error"
+    IGCM_debug_Exit "ncap2"
   fi
 
@@ -1980,4 +2024,9 @@
 }
 
+#D-#==================================================
+#D-function IGCM_sys_ncatted
+#D-* Purpose: encapsulate ncatted call so as to manage error code and retry
+#D-* Examples:
+#D-
 function IGCM_sys_ncatted {
   IGCM_debug_PushStack "IGCM_sys_ncatted" -- $@
@@ -2010,6 +2059,6 @@
 
   if [ ${status} -gt 0 ] ; then
-      echo "IGCM_sys_ncatted : ncatted error"
-      IGCM_debug_Exit "ncatted"
+    echo "IGCM_sys_ncatted : ncatted error"
+    IGCM_debug_Exit "ncatted"
   fi
 
@@ -2017,4 +2066,9 @@
 }
 
+#D-#==================================================
+#D-function IGCM_sys_ncbo
+#D-* Purpose: encapsulate ncbo call so as to manage error code and retry
+#D-* Examples:
+#D-
 function IGCM_sys_ncbo {
   IGCM_debug_PushStack "IGCM_sys_ncbo" -- $@
@@ -2047,6 +2101,6 @@
 
   if [ ${status} -gt 0 ] ; then
-      echo "IGCM_sys_ncbo : ncbo error"
-      IGCM_debug_Exit "ncbo"
+    echo "IGCM_sys_ncbo : ncbo error"
+    IGCM_debug_Exit "ncbo"
   fi
 
@@ -2054,4 +2108,9 @@
 }
 
+#D-#==================================================
+#D-function IGCM_sys_ncdif
+#D-* Purpose: encapsulate ncdiff call so as to manage error code and retry
+#D-* Examples:
+#D-
 function IGCM_sys_ncdiff {
   IGCM_debug_PushStack "IGCM_sys_ncdiff" -- $@
@@ -2084,6 +2143,6 @@
 
   if [ ${status} -gt 0 ] ; then
-      echo "IGCM_sys_ncdiff : ncdiff error"
-      IGCM_debug_Exit "ncdiff"
+    echo "IGCM_sys_ncdiff : ncdiff error"
+    IGCM_debug_Exit "ncdiff"
   fi
 
@@ -2091,4 +2150,9 @@
 }
 
+#D-#==================================================
+#D-function IGCM_sys_ncea
+#D-* Purpose: encapsulate ncea call so as to manage error code and retry
+#D-* Examples:
+#D-
 function IGCM_sys_ncea {
   IGCM_debug_PushStack "IGCM_sys_ncea" -- $@
@@ -2121,6 +2185,6 @@
 
   if [ ${status} -gt 0 ] ; then
-      echo "IGCM_sys_ncea : ncea error"
-      IGCM_debug_Exit "ncea"
+    echo "IGCM_sys_ncea : ncea error"
+    IGCM_debug_Exit "ncea"
   fi
 
@@ -2128,4 +2192,9 @@
 }
 
+#D-#==================================================
+#D-function IGCM_sys_ncecat
+#D-* Purpose: encapsulate ncecat call so as to manage error code and retry
+#D-* Examples:
+#D-
 function IGCM_sys_ncecat {
   IGCM_debug_PushStack "IGCM_sys_ncecat" -- $@
@@ -2158,6 +2227,6 @@
 
   if [ ${status} -gt 0 ] ; then
-      echo "IGCM_sys_ncecat : ncecat error"
-      IGCM_debug_Exit "ncecat"
+    echo "IGCM_sys_ncecat : ncecat error"
+    IGCM_debug_Exit "ncecat"
   fi
 
@@ -2165,4 +2234,9 @@
 }
 
+#D-#==================================================
+#D-function IGCM_sys_ncflint
+#D-* Purpose: encapsulate ncflint call so as to manage error code and retry
+#D-* Examples:
+#D-
 function IGCM_sys_ncflint {
   IGCM_debug_PushStack "IGCM_sys_ncflint" -- $@
@@ -2195,6 +2269,6 @@
 
   if [ ${status} -gt 0 ] ; then
-      echo "IGCM_sys_ncflint : ncflint error"
-      IGCM_debug_Exit "ncflint"
+    echo "IGCM_sys_ncflint : ncflint error"
+    IGCM_debug_Exit "ncflint"
   fi
 
@@ -2202,4 +2276,9 @@
 }
 
+#D-#==================================================
+#D-function IGCM_sys_ncks
+#D-* Purpose: encapsulate ncks call so as to manage error code and retry
+#D-* Examples:
+#D-
 function IGCM_sys_ncks {
   IGCM_debug_PushStack "IGCM_sys_ncks" -- $@
@@ -2232,6 +2311,6 @@
 
   if [ ${status} -gt 0 ] ; then
-      echo "IGCM_sys_ncks : ncks error"
-      IGCM_debug_Exit "ncks"
+    echo "IGCM_sys_ncks : ncks error"
+    IGCM_debug_Exit "ncks"
   fi
 
@@ -2239,4 +2318,9 @@
 }
 
+#D-#==================================================
+#D-function IGCM_sys_ncpdq
+#D-* Purpose: encapsulate ncpdq call so as to manage error code and retry
+#D-* Examples:
+#D-
 function IGCM_sys_ncpdq {
   IGCM_debug_PushStack "IGCM_sys_ncpdq" -- $@
@@ -2269,6 +2353,6 @@
 
   if [ ${status} -gt 0 ] ; then
-      echo "IGCM_sys_ncpdq : ncpdq error"
-      IGCM_debug_Exit "ncpdq"
+    echo "IGCM_sys_ncpdq : ncpdq error"
+    IGCM_debug_Exit "ncpdq"
   fi
 
@@ -2276,4 +2360,9 @@
 }
 
+#D-#==================================================
+#D-function IGCM_sys_ncra
+#D-* Purpose: encapsulate ncra call so as to manage error code and retry
+#D-* Examples:
+#D-
 function IGCM_sys_ncra {
   IGCM_debug_PushStack "IGCM_sys_ncra" -- $@
@@ -2306,6 +2395,6 @@
 
   if [ ${status} -gt 0 ] ; then
-      echo "IGCM_sys_ncra : ncra error"
-      IGCM_debug_Exit "ncra"
+    echo "IGCM_sys_ncra : ncra error"
+    IGCM_debug_Exit "ncra"
   fi
 
@@ -2313,4 +2402,9 @@
 }
 
+#D-#==================================================
+#D-function IGCM_sys_ncrcat
+#D-* Purpose: encapsulate ncrcat call so as to manage error code and retry
+#D-* Examples:
+#D-
 function IGCM_sys_ncrcat {
   IGCM_debug_PushStack "IGCM_sys_ncrcat" -- $@
@@ -2353,6 +2447,6 @@
 
   if [ ${status} -gt 0 ] ; then
-      echo "IGCM_sys_ncrcat : ncrcat error"
-      #IGCM_debug_Exit "ncrcat"
+    echo "IGCM_sys_ncrcat : ncrcat error"
+    #IGCM_debug_Exit "ncrcat"
   fi
 
@@ -2360,4 +2454,9 @@
 }
 
+#D-#==================================================
+#D-function IGCM_sys_ncrename
+#D-* Purpose: encapsulate ncrename call so as to manage error code and retry
+#D-* Examples:
+#D-
 function IGCM_sys_ncrename {
   IGCM_debug_PushStack "IGCM_sys_ncrename" -- $@
@@ -2390,6 +2489,6 @@
 
   if [ ${status} -gt 0 ] ; then
-      echo "IGCM_sys_ncrename : ncrename error"
-      IGCM_debug_Exit "ncrename"
+    echo "IGCM_sys_ncrename : ncrename error"
+    IGCM_debug_Exit "ncrename"
   fi
 
@@ -2397,4 +2496,9 @@
 }
 
+#D-#==================================================
+#D-function IGCM_sys_ncwa
+#D-* Purpose: encapsulate ncwa call so as to manage error code and retry
+#D-* Examples:
+#D-
 function IGCM_sys_ncwa {
   IGCM_debug_PushStack "IGCM_sys_ncwa" -- $@
@@ -2427,6 +2531,6 @@
 
   if [ ${status} -gt 0 ] ; then
-      echo "IGCM_sys_ncwa : ncwa error"
-      IGCM_debug_Exit "ncwa"
+    echo "IGCM_sys_ncwa : ncwa error"
+    IGCM_debug_Exit "ncwa"
   fi
 
@@ -2437,4 +2541,9 @@
 # CDO OPERATOR
 
+#D-#==================================================
+#D-function IGCM_sys_cdo
+#D-* Purpose: encapsulate cdo call so as to manage error code and retry
+#D-* Examples:
+#D-
 function IGCM_sys_cdo {
   IGCM_debug_PushStack "IGCM_sys_cdo" -- $@
Index: /trunk/libIGCM/libIGCM_sys/libIGCM_sys_curie.ksh
===================================================================
--- /trunk/libIGCM/libIGCM_sys/libIGCM_sys_curie.ksh	(revision 810)
+++ /trunk/libIGCM/libIGCM_sys/libIGCM_sys_curie.ksh	(revision 811)
@@ -248,6 +248,7 @@
     ${@}
 EOF
-  if [ $? -gt 0 ] ; then
-    echo "IGCM_sys_RshArchive : erreur."
+  status=$?
+  if [ ${status} -gt 0 ] ; then
+    IGCM_debug_Print 2 "IGCM_sys_RshArchive : command failed error code ${status}"
     IGCM_debug_Exit "IGCM_sys_RshArchive"
   fi
@@ -265,13 +266,8 @@
     echo "IGCM_sys_RshPost :" $@
   fi
-
-  #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 ============ #
-
-  /bin/ksh <tmp_IGCM_sys_RshPost_$$
+  cat >/tmp/tmp_IGCM_sys_RshPost_$$_${LOGNAME}
+
+  /bin/ksh </tmp/tmp_IGCM_sys_RshPost_$$_${LOGNAME}
   if [ $? -gt 0 ] ; then
     echo "IGCM_sys_RshPost : erreur."
@@ -279,5 +275,5 @@
   fi
   # delete temporary file
-  \rm tmp_IGCM_sys_RshPost_$$
+  \rm /tmp/tmp_IGCM_sys_RshPost_$$_${LOGNAME}
 
 # ============ FRONTEND  END  ============ #
@@ -372,7 +368,8 @@
     mail -s "${config_UserChoices_JobName} ${status}" $( cat ~/.forward ) < job_end.mail
   fi
+
   sleep 10
   rm -f job_end.mail
-  
+
   if [ $? -gt 0 ] ; then
     echo "IGCM_sys_SendMail : erreur."
@@ -420,6 +417,8 @@
   if [ ! -d ${1} ]; then
     \mkdir -p $1
-    if [ $? -gt 0 ] ; then
-      echo "IGCM_sys_MkdirArchive : erreur."
+    status=$?
+
+    if [ ${status} -gt 0 ] ; then
+      IGCM_debug_Print 2 "IGCM_sys_MkdirArchive : mkdir failed error code ${status}"
       IGCM_debug_Exit "IGCM_sys_MkdirArchive"
     fi
@@ -533,5 +532,4 @@
   ExistFlag=$( [ -d $1 ] && echo 0 || echo 1 )
   IGCM_debug_PopStack "IGCM_sys_TestDirArchive"
-
   return ${ExistFlag}
 }
@@ -672,5 +670,5 @@
     echo "IGCM_sys_Qsub :" $@
   fi
-  typeset options
+  typeset options status
   if [ ${config_UserChoices_JobName}.${CumulPeriod} = "." ] ; then
     options=" -o ${Script_Output} -e ${Script_Output}"
@@ -680,6 +678,7 @@
 
   /usr/bin/ccc_msub ${options} < $1
-  if [ $? -gt 0 ] ; then
-    echo "IGCM_sys_Qsub : erreur ${options} $1"
+  status=$?
+  if [ ${status} -gt 0 ] ; then
+    IGCM_debug_Print 2 "IGCM_sys_Qsub ${options} $1 : error code ${status}"
     IGCM_debug_Exit "IGCM_sys_Qsub"
   fi
@@ -697,8 +696,10 @@
     echo "IGCM_sys_QsubPost :" $@
   fi
+  typeset status
   MY_PROJECT=$(echo ${BRIDGE_MSUB_PROJECT} | cut -d@ -f1 )
   /usr/bin/ccc_msub -Q normal -A ${MY_PROJECT} -o ${POST_DIR}/${Script_Post_Output}.out -e ${POST_DIR}/${Script_Post_Output}.out ${libIGCM_POST}/$1.job
-  if [ $? -gt 0 ] ; then
-    echo "IGCM_sys_QsubPost : erreur " $@
+  status=$?
+  if [ ${status} -gt 0 ] ; then
+    IGCM_debug_Print 2 "IGCM_sys_QsubPost $1 : error code ${status}"
     IGCM_debug_Exit "IGCM_sys_QsubPost"
   fi
@@ -823,5 +824,5 @@
 #D-#==================================================
 #D-function IGCM_sys_Miror_libIGCM
-#D-* Purpose: Mirror libIGCM PATH and lib to cesium
+#D-* Purpose: Mirror libIGCM PATH and lib to frontend
 #D-* Examples:
 #D-
@@ -841,5 +842,5 @@
 
   if [ ${status} -gt 0 ] ; then
-    echo "IGCM_sys_Mirror_libIGCM Warning : no libIGCM on cesium."
+    echo "IGCM_sys_Mirror_libIGCM Warning : no libIGCM on frontend."
     cat out_rsync
   fi
@@ -920,5 +921,5 @@
 
   if [ ${status} -gt 0 ] ; then
-    echo "IGCM_sys_RmRunDir : error code ${status}"
+    echo "IGCM_sys_RmRunDir : rm error code is ${status}."
     cat out_rsync
     IGCM_debug_Exit "IGCM_sys_RmRunDir"
@@ -989,5 +990,5 @@
 
     if [ ${status} -gt 0 ] ; then
-      echo "IGCM_sys_Put_Dir : error code ${status}"
+      IGCM_debug_Print 2 "IGCM_sys_Put_Dir : cp failed error code ${status}"
       cat out_rsync
       IGCM_debug_Exit "IGCM_sys_Put_Dir"
@@ -1035,5 +1036,5 @@
       \cp -ur $1 $2 >> out_rsync 2>&1
       status=$?
-      if [ ${status} -gt 0 ]; then
+      if [ ${status} -gt 0 ] ; then
         IGCM_debug_Print 2 "IGCM_sys_Get_Dir : cp failed error code ${status} ${i}/${NB_ESSAI}"
         IGCM_debug_Print 2 "IGCM_sys_Get_Dir : sleep ${DELAI} seconds and try again."
@@ -1389,4 +1390,5 @@
       if [ "X$( diff $1 $2 )" = X ] ; then
         IGCM_debug_Print 2 "$1 and $2 are the same file, we skip the copy"
+        status=0
         skip=true
       else
@@ -1835,4 +1837,9 @@
 # REBUILD OPERATOR
 
+#D-#==================================================
+#D-function IGCM_sys_rebuild
+#D-* Purpose: rebuild parallel files
+#D-* Examples:
+#D-
 function IGCM_sys_rebuild {
   IGCM_debug_PushStack "IGCM_sys_rebuild" -- $@
@@ -1874,4 +1881,9 @@
 }
 
+#D-#==================================================
+#D-function IGCM_sys_rebuild_station
+#D-* Purpose: rebuild parallel files describing station 
+#D-* Examples:
+#D-
 function IGCM_sys_rebuild_station {
   IGCM_debug_PushStack "IGCM_sys_rebuild_station" -- $@
@@ -1968,4 +1980,9 @@
 # Activate Running Environnment Variables
 
+#D-#==================================================
+#D-function IGCM_sys_desactiv_variables
+#D-* Purpose: set environement variables prior to execution
+#D-* Examples:
+#D-
 function IGCM_sys_activ_variables {
   IGCM_debug_PushStack "IGCM_sys_activ_variables"
@@ -1974,4 +1991,12 @@
   fi
 
+# --------------------------------------------------------------------
+#D- MPI specifications
+# --------------------------------------------------------------------
+
+# --------------------------------------------------------------------
+#D- Other specifications
+# --------------------------------------------------------------------
+
   ulimit -s unlimited
 
@@ -1982,4 +2007,9 @@
 # Desactivate Running Environnment Variables
 
+#D-#==================================================
+#D-function IGCM_sys_desactiv_variables
+#D-* Purpose: unset environement variables after execution
+#D-* Examples:
+#D-
 function IGCM_sys_desactiv_variables {
   IGCM_debug_PushStack "IGCM_sys_desactiv_variables"
@@ -1987,4 +2017,12 @@
     echo "IGCM_sys_desactiv_variables"
   fi
+# --------------------------------------------------------------------
+#D- MPI specifications
+# --------------------------------------------------------------------
+
+# --------------------------------------------------------------------
+#D- Other specifications
+# --------------------------------------------------------------------
+
   IGCM_debug_PopStack "IGCM_sys_desactiv_variables"
 }
@@ -1993,7 +2031,12 @@
 # Build MPI/OMP scripts run file (dummy function)
 
+#D-#==================================================
+#D-function IGCM_sys_build_run_file
+#D-* Purpose: build run file (deprecated)
+#D-* Examples:
+#D-
 function IGCM_sys_build_run_file {
 
-IGCM_debug_Print 3 " dummy function : IGCM_sys_build_run_file "
+  IGCM_debug_Print 3 " dummy function : IGCM_sys_build_run_file "
 
 }
@@ -2001,4 +2044,10 @@
 ############################################################
 # Build MPI/OMP scripts
+
+#D-#==================================================
+#D-function IGCM_sys_build_execution_scripts
+#D-* Purpose: build execution scripts to be launch by ${HOST_MPIRUN_COMMAND}
+#D-* Examples:
+#D-
 function IGCM_sys_build_execution_scripts
 {
@@ -2008,5 +2057,4 @@
   fi
 
-    # Verification with MSUB parameter
   EXECUTION=${HOST_MPIRUN_COMMAND}
 
@@ -2022,5 +2070,5 @@
 # Then first loop on the components for the coupler ie oasis
 
-### the coupler ie oasis must be the first one
+## the coupler ie oasis must be the first one
     for comp in ${config_ListOfComponents[*]} ; do
 
@@ -2063,5 +2111,4 @@
   else # Only one executable. launch it.
 
-    #
     for comp in ${config_ListOfComponents[*]} ; do
 
@@ -2114,5 +2161,11 @@
 
 ############################################################
-# Check of space available on temporary filesytems
+# Check of space available on temporary filesytems.
+
+#D-#==================================================
+#D-function IGCM_sys_check_quota
+#D-* Purpose: check user quota. Stop the simulation if quota above 90%
+#D-* Examples:
+#D-
 function IGCM_sys_check_quota {
   IGCM_debug_PushStack "IGCM_sys_check_quota"
@@ -2133,10 +2186,10 @@
 
     if [ "${unit_quota}" = "*" ] ; then
-        IGCM_debug_Print 1 "Please, check your quota of volume on scratch"
-        IGCM_debug_Print 1 "More than 100% of your quota is used"
-        IGCM_debug_Print 1 "Use the ccc_quota command to check"
-        IGCM_debug_Print 1 "You must have more than 10% available to run"
-        IGCM_debug_Exit "Not enough space to run ! STOP HERE"
-        IGCM_debug_Verif_Exit
+      IGCM_debug_Print 1 "Please, check your quota of volume on scratch"
+      IGCM_debug_Print 1 "More than 100% of your quota is used"
+      IGCM_debug_Print 1 "Use the ccc_quota command to check"
+      IGCM_debug_Print 1 "You must have more than 10% available to run"
+      IGCM_debug_Exit "Not enough space to run ! STOP HERE"
+      IGCM_debug_Verif_Exit
     fi
 
@@ -2196,10 +2249,10 @@
 
     if [ "${unit_quota}" = "*" ] ; then
-        IGCM_debug_Print 1 "Please, check your quota of inode on scratch"
-        IGCM_debug_Print 1 "More than 100% of your quota is used"
-        IGCM_debug_Print 1 "Use the ccc_quota command to check"
-        IGCM_debug_Print 1 "You must have more than 10% available to run"
-        IGCM_debug_Exit "Not enough space to run ! STOP HERE"
-        IGCM_debug_Verif_Exit
+      IGCM_debug_Print 1 "Please, check your quota of inode on scratch"
+      IGCM_debug_Print 1 "More than 100% of your quota is used"
+      IGCM_debug_Print 1 "Use the ccc_quota command to check"
+      IGCM_debug_Print 1 "You must have more than 10% available to run"
+      IGCM_debug_Exit "Not enough space to run ! STOP HERE"
+      IGCM_debug_Verif_Exit
     fi
 
@@ -2255,5 +2308,4 @@
 #D-* Examples: IGCM_sys_CountJobInQueue ${JobName} NbRun
 #D-
-
 function IGCM_sys_CountJobInQueue {
   IGCM_debug_PushStack "IGCM_sys_CountJobInQueue"
@@ -2275,4 +2327,9 @@
 # NCO OPERATOR
 
+#D-#==================================================
+#D-function IGCM_sys_ncap2
+#D-* Purpose: encapsulate ncap2 call so as to manage error code and retry
+#D-* Examples:
+#D-
 function IGCM_sys_ncap2 {
   IGCM_debug_PushStack "IGCM_sys_ncap2" -- $@
@@ -2305,6 +2362,6 @@
 
   if [ ${status} -gt 0 ] ; then
-      echo "IGCM_sys_ncap2 : ncap2 error"
-      IGCM_debug_Exit "ncap2"
+    echo "IGCM_sys_ncap2 : ncap2 error"
+    IGCM_debug_Exit "ncap2"
   fi
 
@@ -2312,4 +2369,9 @@
 }
 
+#D-#==================================================
+#D-function IGCM_sys_ncatted
+#D-* Purpose: encapsulate ncatted call so as to manage error code and retry
+#D-* Examples:
+#D-
 function IGCM_sys_ncatted {
   IGCM_debug_PushStack "IGCM_sys_ncatted" -- $@
@@ -2342,6 +2404,6 @@
 
   if [ ${status} -gt 0 ] ; then
-      echo "IGCM_sys_ncatted : ncatted error"
-      IGCM_debug_Exit "ncatted"
+    echo "IGCM_sys_ncatted : ncatted error"
+    IGCM_debug_Exit "ncatted"
   fi
 
@@ -2349,4 +2411,9 @@
 }
 
+#D-#==================================================
+#D-function IGCM_sys_ncbo
+#D-* Purpose: encapsulate ncbo call so as to manage error code and retry
+#D-* Examples:
+#D-
 function IGCM_sys_ncbo {
   IGCM_debug_PushStack "IGCM_sys_ncbo" -- $@
@@ -2379,6 +2446,6 @@
 
   if [ ${status} -gt 0 ] ; then
-      echo "IGCM_sys_ncbo : ncbo error"
-      IGCM_debug_Exit "ncbo"
+    echo "IGCM_sys_ncbo : ncbo error"
+    IGCM_debug_Exit "ncbo"
   fi
 
@@ -2386,4 +2453,9 @@
 }
 
+#D-#==================================================
+#D-function IGCM_sys_ncdif
+#D-* Purpose: encapsulate ncdiff call so as to manage error code and retry
+#D-* Examples:
+#D-
 function IGCM_sys_ncdiff {
   IGCM_debug_PushStack "IGCM_sys_ncdiff" -- $@
@@ -2416,6 +2488,6 @@
 
   if [ ${status} -gt 0 ] ; then
-      echo "IGCM_sys_ncdiff : ncdiff error"
-      IGCM_debug_Exit "ncdiff"
+    echo "IGCM_sys_ncdiff : ncdiff error"
+    IGCM_debug_Exit "ncdiff"
   fi
 
@@ -2423,4 +2495,9 @@
 }
 
+#D-#==================================================
+#D-function IGCM_sys_ncea
+#D-* Purpose: encapsulate ncea call so as to manage error code and retry
+#D-* Examples:
+#D-
 function IGCM_sys_ncea {
   IGCM_debug_PushStack "IGCM_sys_ncea" -- $@
@@ -2453,6 +2530,6 @@
 
   if [ ${status} -gt 0 ] ; then
-      echo "IGCM_sys_ncea : ncea error"
-      IGCM_debug_Exit "ncea"
+    echo "IGCM_sys_ncea : ncea error"
+    IGCM_debug_Exit "ncea"
   fi
 
@@ -2460,4 +2537,9 @@
 }
 
+#D-#==================================================
+#D-function IGCM_sys_ncecat
+#D-* Purpose: encapsulate ncecat call so as to manage error code and retry
+#D-* Examples:
+#D-
 function IGCM_sys_ncecat {
   IGCM_debug_PushStack "IGCM_sys_ncecat" -- $@
@@ -2490,6 +2572,6 @@
 
   if [ ${status} -gt 0 ] ; then
-      echo "IGCM_sys_ncecat : ncecat error"
-      IGCM_debug_Exit "ncecat"
+    echo "IGCM_sys_ncecat : ncecat error"
+    IGCM_debug_Exit "ncecat"
   fi
 
@@ -2497,4 +2579,9 @@
 }
 
+#D-#==================================================
+#D-function IGCM_sys_ncflint
+#D-* Purpose: encapsulate ncflint call so as to manage error code and retry
+#D-* Examples:
+#D-
 function IGCM_sys_ncflint {
   IGCM_debug_PushStack "IGCM_sys_ncflint" -- $@
@@ -2527,6 +2614,6 @@
 
   if [ ${status} -gt 0 ] ; then
-      echo "IGCM_sys_ncflint : ncflint error"
-      IGCM_debug_Exit "ncflint"
+    echo "IGCM_sys_ncflint : ncflint error"
+    IGCM_debug_Exit "ncflint"
   fi
 
@@ -2534,4 +2621,9 @@
 }
 
+#D-#==================================================
+#D-function IGCM_sys_ncks
+#D-* Purpose: encapsulate ncks call so as to manage error code and retry
+#D-* Examples:
+#D-
 function IGCM_sys_ncks {
   IGCM_debug_PushStack "IGCM_sys_ncks" -- $@
@@ -2564,6 +2656,6 @@
 
   if [ ${status} -gt 0 ] ; then
-      echo "IGCM_sys_ncks : ncks error"
-      IGCM_debug_Exit "ncks"
+    echo "IGCM_sys_ncks : ncks error"
+    IGCM_debug_Exit "ncks"
   fi
 
@@ -2571,4 +2663,9 @@
 }
 
+#D-#==================================================
+#D-function IGCM_sys_ncpdq
+#D-* Purpose: encapsulate ncpdq call so as to manage error code and retry
+#D-* Examples:
+#D-
 function IGCM_sys_ncpdq {
   IGCM_debug_PushStack "IGCM_sys_ncpdq" -- $@
@@ -2601,6 +2698,6 @@
 
   if [ ${status} -gt 0 ] ; then
-      echo "IGCM_sys_ncpdq : ncpdq error"
-      IGCM_debug_Exit "ncpdq"
+    echo "IGCM_sys_ncpdq : ncpdq error"
+    IGCM_debug_Exit "ncpdq"
   fi
 
@@ -2608,4 +2705,9 @@
 }
 
+#D-#==================================================
+#D-function IGCM_sys_ncra
+#D-* Purpose: encapsulate ncra call so as to manage error code and retry
+#D-* Examples:
+#D-
 function IGCM_sys_ncra {
   IGCM_debug_PushStack "IGCM_sys_ncra" -- $@
@@ -2638,6 +2740,6 @@
 
   if [ ${status} -gt 0 ] ; then
-      echo "IGCM_sys_ncra : ncra error"
-      IGCM_debug_Exit "ncra"
+    echo "IGCM_sys_ncra : ncra error"
+    IGCM_debug_Exit "ncra"
   fi
 
@@ -2645,4 +2747,9 @@
 }
 
+#D-#==================================================
+#D-function IGCM_sys_ncrcat
+#D-* Purpose: encapsulate ncrcat call so as to manage error code and retry
+#D-* Examples:
+#D-
 function IGCM_sys_ncrcat {
   IGCM_debug_PushStack "IGCM_sys_ncrcat" -- $@
@@ -2685,6 +2792,6 @@
 
   if [ ${status} -gt 0 ] ; then
-      echo "IGCM_sys_ncrcat : ncrcat error"
-      #IGCM_debug_Exit "ncrcat"
+    echo "IGCM_sys_ncrcat : ncrcat error"
+    #IGCM_debug_Exit "ncrcat"
   fi
 
@@ -2692,4 +2799,9 @@
 }
 
+#D-#==================================================
+#D-function IGCM_sys_ncrename
+#D-* Purpose: encapsulate ncrename call so as to manage error code and retry
+#D-* Examples:
+#D-
 function IGCM_sys_ncrename {
   IGCM_debug_PushStack "IGCM_sys_ncrename" -- $@
@@ -2722,6 +2834,6 @@
 
   if [ ${status} -gt 0 ] ; then
-      echo "IGCM_sys_ncrename : ncrename error"
-      IGCM_debug_Exit "ncrename"
+    echo "IGCM_sys_ncrename : ncrename error"
+    IGCM_debug_Exit "ncrename"
   fi
 
@@ -2729,4 +2841,9 @@
 }
 
+#D-#==================================================
+#D-function IGCM_sys_ncwa
+#D-* Purpose: encapsulate ncwa call so as to manage error code and retry
+#D-* Examples:
+#D-
 function IGCM_sys_ncwa {
   IGCM_debug_PushStack "IGCM_sys_ncwa" -- $@
@@ -2759,6 +2876,6 @@
 
   if [ ${status} -gt 0 ] ; then
-      echo "IGCM_sys_ncwa : ncwa error"
-      IGCM_debug_Exit "ncwa"
+    echo "IGCM_sys_ncwa : ncwa error"
+    IGCM_debug_Exit "ncwa"
   fi
 
@@ -2769,4 +2886,9 @@
 # CDO OPERATOR
 
+#D-#==================================================
+#D-function IGCM_sys_cdo
+#D-* Purpose: encapsulate cdo call so as to manage error code and retry
+#D-* Examples:
+#D-
 function IGCM_sys_cdo {
   IGCM_debug_PushStack "IGCM_sys_cdo" -- $@
Index: /trunk/libIGCM/libIGCM_sys/libIGCM_sys_default.ksh
===================================================================
--- /trunk/libIGCM/libIGCM_sys/libIGCM_sys_default.ksh	(revision 810)
+++ /trunk/libIGCM/libIGCM_sys/libIGCM_sys_default.ksh	(revision 811)
@@ -115,10 +115,10 @@
 
 #====================================================
-#- ARCHIVE (dedicated to large files)
-typeset -r ARCHIVE=/home/${LOGIN}
+#- ARCHIVE
+typeset ARCHIVE=${ARCHIVE:=/home/${LOGIN}}
 
 #====================================================
 #- STORAGE (dedicated to small/medium files)
-typeset -r STORAGE=${ARCHIVE}
+typeset STORAGE=${ARCHIVE}
 
 #====================================================
@@ -165,7 +165,5 @@
 #D-
 function IGCM_sys_ChangeArchive {
-
   IGCM_debug_Print 1 " dummy function : IGCM_sys_ChangeArchive "
-
 }
 
@@ -201,6 +199,7 @@
     ${@}
 EOF
-  if [ $? -gt 0 ] ; then
-    echo "IGCM_sys_RshArchive : erreur."
+  status=$?
+  if [ ${status} -gt 0 ] ; then
+    IGCM_debug_Print 2 "IGCM_sys_RshArchive : command failed error code ${status}"
     IGCM_debug_Exit "IGCM_sys_RshArchive"
   fi
@@ -219,6 +218,4 @@
   fi
 
-  #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_$$
@@ -231,5 +228,4 @@
   # delete temporary file
   \rm tmp_IGCM_sys_RshPost_$$
-
   IGCM_debug_PopStack "IGCM_sys_RshPost"
 }
@@ -270,4 +266,7 @@
   fi
 
+  sleep 10
+  rm -f job_end.mail
+
   if [ $? -gt 0 ] ; then
     echo "IGCM_sys_SendMail : erreur."
@@ -313,10 +312,10 @@
   fi
   #- creation de repertoire sur le serveur fichier
-  if [ ! -d ${1} ]; then
-    \mkdir -p $1
-    if [ $? -gt 0 ] ; then
-      echo "IGCM_sys_MkdirArchive : erreur."
-      IGCM_debug_Exit "IGCM_sys_MkdirArchive"
-    fi
+  mkdir -p $1
+  status=$?
+
+  if [ ${status} -gt 0 ] ; then
+    IGCM_debug_Print 2 "IGCM_sys_MkdirArchive : mkdir failed error code ${status}"
+    IGCM_debug_Exit "IGCM_sys_MkdirArchive"
   fi
   IGCM_debug_PopStack "IGCM_sys_MkdirArchive"
@@ -428,5 +427,4 @@
   ExistFlag=$( [ -d $1 ] && echo 0 || echo 1 )
   IGCM_debug_PopStack "IGCM_sys_TestDirArchive"
-
   return ${ExistFlag}
 }
@@ -712,4 +710,30 @@
 
 #D-#==================================================
+#D-function IGCM_sys_Miror_libIGCM
+#D-* Purpose: Mirror libIGCM PATH and lib to frontend
+#D-* Examples:
+#D-
+function IGCM_sys_Mirror_libIGCM {
+  IGCM_debug_PushStack "IGCM_sys_Mirror_libIGCM"
+  if ( $DEBUG_sys ) ; then
+    echo "IGCM_sys_Mirror_libIGCM"
+  fi
+
+  typeset status
+
+  mkdir -p ${HOME}/MIRROR/${PATHlibIGCM}
+
+  echo ${RSYNC} ${RSYNC_opt} ${libIGCM} ${HOME}/MIRROR/${PATHlibIGCM} > out_rsync 2>&1
+  ${RSYNC} ${RSYNC_opt} ${libIGCM} ${HOME}/MIRROR/${PATHlibIGCM} >> out_rsync 2>&1
+  status=$?
+
+  if [ ${status} -gt 0 ] ; then
+    echo "IGCM_sys_Mirror_libIGCM Warning : no libIGCM on frontend."
+    cat out_rsync
+  fi
+  IGCM_debug_PopStack "IGCM_sys_Mirror_libIGCM"
+}
+
+#D-#==================================================
 #D-function IGCM_sys_Cp
 #D-* Purpose: generic cp
@@ -841,5 +865,5 @@
 
     if [ ${status} -gt 0 ] ; then
-      echo "IGCM_sys_Put_Dir : error code ${status}"
+      IGCM_debug_Print 2 "IGCM_sys_Put_Dir : cp failed error code ${status}"
       cat out_rsync
       IGCM_debug_Exit "IGCM_sys_Put_Dir"
@@ -870,12 +894,12 @@
     fi
 
-    typeset RET
+    typeset status
 
     #USUAL WAY
-    \cp -R $1 $2 > out_rsync 2>&1
-    RET=$?
-
-    if [ ${RET} -gt 0 ] ; then
-      echo "IGCM_sys_Get_Dir : error."
+    \cp -ur $1 $2 > out_rsync 2>&1
+    status=$?
+
+    if [ ${status} -gt 0 ] ; then
+      IGCM_debug_Print 2 "IGCM_sys_Get_Dir : cp failed error code ${status}"
       cat out_rsync
       IGCM_debug_Exit "IGCM_sys_Get_Dir"
@@ -906,11 +930,25 @@
     fi
 
-    typeset RET
-
-    #USUAL WAY
-    cp -RL $1 $2 > out_rsync 2>&1
-    RET=$?
-
-    if [ ${RET} -gt 0 ] ; then
+    typeset NB_ESSAI DELAI status i
+    # number of tentative
+    NB_ESSAI=3
+    # time delay between tentative
+    DELAI=2
+
+    i=0
+    while [ $i -lt $NB_ESSAI ] ; do
+      \cp -urL $1 $2 > out_rsync 2>&1
+      status=$?
+      if [ ${status} -gt 0 ]; then
+        IGCM_debug_Print 2 "IGCM_sys_Get_Master : cp failed error code ${status} ${i}/${NB_ESSAI}"
+        IGCM_debug_Print 2 "IGCM_sys_Get_Master : sleep ${DELAI} seconds and try again."
+        sleep $DELAI
+      else
+        break
+      fi
+      (( i = i + 1 ))
+    done
+
+    if [ ${status} -gt 0 ] ; then
       echo "IGCM_sys_Get_Master : error."
       cat out_rsync
@@ -924,4 +962,10 @@
   IGCM_debug_PopStack "IGCM_sys_Get_Master"
 }
+
+#====================================================
+#- Call IGCM_sys_Mirror_libIGCM now !
+if ( $MirrorlibIGCM ) ; then
+  IGCM_sys_Mirror_libIGCM
+fi
 
 #D-#==================================================
@@ -947,4 +991,61 @@
       IGCM_sys_Chmod 444 ${1}
     fi
+    #
+    # Only if we use rsync
+    #IGCM_sys_MkdirArchive $( dirname $2 )
+    #
+    #USUAL WAY
+    \cp $1 $2 > out_rsync 2>&1
+    status=$?
+
+#       #RSYNC WITH NETWORK SSH CALL
+#       echo ${RSYNC} ${RSYNC_opt} -e ssh ${RUN_DIR}/$1 ${STOREHOST}:${2} > out_rsync 2>&1
+#       ${RSYNC} ${RSYNC_opt} -e ssh ${RUN_DIR}/$1 ${STOREHOST}:${2} >> out_rsync 2>&1
+
+#       #RSYNC WITH NFS USE
+#       echo ${RSYNC} ${RSYNC_opt} ${RUN_DIR}/$1 ${2} > out_rsync 2>&1
+#       ${RSYNC} ${RSYNC_opt} ${RUN_DIR}/$1 ${2} >> out_rsync 2>&1
+
+#       status=$?
+#       IGCM_sys_Rsync_out $status
+
+#       ${libIGCM}/libIGCM_sys/IGCM_analyse_rsync_out.awk out_rsync
+#       (( status=status+$? ))
+
+    if [ ${status} -gt 0 ] ; then
+      echo "IGCM_sys_Put_Rest : cp failed error code ${status}"
+      cat out_rsync
+      IGCM_debug_Exit "IGCM_sys_Put_Rest"
+    else
+      \rm out_rsync
+    fi
+  else
+    ( ${DEBUG_debug} ) && echo "DRYRUN mode = " $DRYRUN >> stack
+  fi
+  IGCM_debug_PopStack "IGCM_sys_Put_Rest"
+}
+
+#D-#==================================================
+#D-function IGCM_sys_PutBuffer_Rest
+#D-* Purpose: Put computied restarts on ${SCRATCHDIR}.
+#D-           File and target directory must exist.
+#D-* Examples:
+#D-
+function IGCM_sys_PutBuffer_Rest {
+  IGCM_debug_PushStack "IGCM_sys_PutBuffer_Rest" $@
+  if ( $DEBUG_sys ) ; then
+    echo "IGCM_sys_PutBuffer_Rest :" $@
+  fi
+  if [ $DRYRUN = 0 ]; then
+    if [ ! -f ${1} ] ; then
+      echo "ERROR : IGCM_sys_PutBuffer_Rest ${1} DOES NOT EXIST ."
+      IGCM_debug_Exit "IGCM_sys_PutBuffer_Rest"
+    fi
+
+    typeset status
+    #
+    if [ X${JobType} = XRUN ] ; then
+      IGCM_sys_Chmod 444 ${1}
+    fi
 
     #
@@ -953,61 +1054,8 @@
     status=$?
 
-#       #RSYNC WITH NETWORK SSH CALL
-#       echo ${RSYNC} ${RSYNC_opt} -e ssh ${RUN_DIR}/$1 ${STOREHOST}:${2} > out_rsync 2>&1
-#       ${RSYNC} ${RSYNC_opt} -e ssh ${RUN_DIR}/$1 ${STOREHOST}:${2} >> out_rsync 2>&1
-
-#       #RSYNC WITH NFS USE
-#       echo ${RSYNC} ${RSYNC_opt} ${RUN_DIR}/$1 ${2} > out_rsync 2>&1
-#       ${RSYNC} ${RSYNC_opt} ${RUN_DIR}/$1 ${2} >> out_rsync 2>&1
-
-#       status=$?
-#       IGCM_sys_Rsync_out $status
-
-#       ${libIGCM}/libIGCM_sys/IGCM_analyse_rsync_out.awk out_rsync
-#       (( status=status+$? ))
-
-    if [ ${status} -gt 0 ] ; then
-      echo "IGCM_sys_Put_Rest : cp failed error code ${status}"
-      cat out_rsync
-      IGCM_debug_Exit "IGCM_sys_Put_Rest"
-    else
-      \rm out_rsync
-    fi
-  else
-    ( ${DEBUG_debug} ) && echo "DRYRUN mode = " $DRYRUN >> stack
-  fi
-  IGCM_debug_PopStack "IGCM_sys_Put_Rest"
-}
-
-#D-#==================================================
-#D-function IGCM_sys_PutBuffer_Rest
-#D-* Purpose: Put computied restarts on ${SCRATCHDIR}.
-#D-           File and target directory must exist.
-#D-* Examples:
-#D-
-function IGCM_sys_PutBuffer_Rest {
-  IGCM_debug_PushStack "IGCM_sys_PutBuffer_Rest" $@
-  if ( $DEBUG_sys ) ; then
-    echo "IGCM_sys_PutBuffer_Rest :" $@
-  fi
-  if [ $DRYRUN = 0 ]; then
-    if [ ! -f ${1} ] ; then
-      echo "ERROR : IGCM_sys_PutBuffer_Rest ${1} DOES NOT EXIST ."
-      IGCM_debug_Exit "IGCM_sys_PutBuffer_Rest"
-    fi
-
-    typeset status
-    #
-    if [ X${JobType} = XRUN ] ; then
-      IGCM_sys_Chmod 444 ${1}
-    fi
-
-    #
-    # USUAL WAY
-    \cp $1 $2 > out_rsync 2>&1
-    status=$?
-
     if [ ${status} -gt 0 ] ; then
       echo "IGCM_sys_PutBuffer_Rest : error code ${status}"
+      [ -f ${2} ] && ls -l ${2}
+      [ -f ${2}/${1} ] && ls -l ${2}/${1}
       cat out_rsync
       IGCM_debug_Exit "IGCM_sys_PutBuffer_Rest"
@@ -1042,16 +1090,15 @@
     echo "IGCM_sys_Put_Out :" $@
   fi
+
+  typeset status
+
   if [ $DRYRUN = 0 ]; then
-    if [ -f ${1} ] ; then
-      if [ ! -d $( dirname $2 ) ] ; then
-        IGCM_sys_MkdirArchive $( dirname $2 )
-      fi
-    else
+    if [ ! -f ${1} ] ; then
       echo "WARNING : IGCM_sys_Put_Out ${1} DOES NOT EXIST ."
       IGCM_debug_PopStack "IGCM_sys_Put_Out"
       return 1
     fi
-
-    typeset RET
+    #
+    IGCM_sys_MkdirArchive $( dirname $2 )
     #
     if [ X${JobType} = XRUN ] ; then
@@ -1064,12 +1111,12 @@
     echo ${RSYNC} ${RSYNC_opt} $1 $2 > out_rsync 2>&1
     ${RSYNC} ${RSYNC_opt} $1 $2 >> out_rsync 2>&1
-    RET=$?
-    IGCM_sys_Rsync_out $RET
+    status=$?
+    IGCM_sys_Rsync_out $status
 
     ${libIGCM}/libIGCM_sys/IGCM_analyse_rsync_out.awk out_rsync
-    (( RET=RET+$? ))
-
-    if [ ${RET} -gt 0 ] ; then
-      echo "IGCM_sys_Put_Out : error."
+    (( status=status+$? ))
+
+    if [ ${status} -gt 0 ] ; then
+      IGCM_debug_Print 2 "IGCM_sys_Put_Out : rsync failed error code ${status}"
       cat out_rsync
       IGCM_debug_Exit "IGCM_sys_Put_Out"
@@ -1094,4 +1141,12 @@
     echo "IGCM_sys_PutBuffer_Out :" $@
   fi
+
+  typeset NB_ESSAI DELAI status i exist skip
+
+  # number of tentative
+  NB_ESSAI=3
+  # time delay between tentative
+  DELAI=2
+
   if [ $DRYRUN = 0 ]; then
     if [ ! -f ${1} ] ; then
@@ -1103,21 +1158,58 @@
     IGCM_sys_Mkdir $( dirname $2 )
     #
-    typeset RET
-
-    if [ X${JobType} = XRUN ] ; then
-      if [ X${3} = X ] ; then
-        IGCM_sys_Chmod 444 ${1}
+
+    exist=false
+    skip=false
+    if [ -f $2 ] ; then
+      IGCM_debug_Print 1 "$2 already exist"
+      exist=true
+      if [ "X$( diff $1 $2 )" = X ] ; then
+        IGCM_debug_Print 2 "$1 and $2 are the same file, we skip the copy"
+        status=0
+        skip=true
+      else
+        IGCM_debug_Print 2 "$1 and $2 are not the same file, we force the copy"
+        skip=false
       fi
     fi
     #
-    # USUAL WAY
-    \cp $1 $2 > out_rsync 2>&1
-    RET=$?
-
-    if [ ${RET} -gt 0 ] ; then
+    if ( [ X${exist} = Xtrue ] && [ X${skip} = Xfalse ] ) ; then
+      IGCM_sys_Chmod u+w $2
+    fi
+
+    if [ X${skip} = Xfalse ] ; then
+      i=0
+      while [ $i -lt $NB_ESSAI ] ; do
+        # USUAL WAY
+        \cp $1 $2 > out_rsync 2>&1
+        status=$?
+        if [ ${status} -gt 0 ]; then
+          IGCM_debug_Print 2 "IGCM_sys_PutBuffer_Out : cp failed error code ${status} ${i}/${NB_ESSAI}"
+          IGCM_debug_Print 2 "IGCM_sys_PutBuffer_Out : sleep ${DELAI} seconds and try again."
+          [ -f ${2} ] && ls -l ${2}
+          [ -f ${2}/${1} ] && ls -l ${2}/${1}
+          sleep $DELAI
+        else
+          break
+        fi
+        (( i = i + 1 ))
+      done
+    fi
+
+    if [ ${status} -gt 0 ] ; then
       echo "IGCM_sys_PutBuffer_Out : error."
+      [ -f ${2} ] && ls -l ${2}
+      [ -f ${2}/${1} ] && ls -l ${2}/${1}
       cat out_rsync
       IGCM_debug_Exit "IGCM_sys_PutBuffer_Out"
     else
+
+      if [ X${JobType} = XRUN ] ; then
+        if [ X${3} = X ] ; then
+          [ -f ${2} ] && IGCM_sys_Chmod 444 ${2}
+          [ -f ${2}/${1} ] && IGCM_sys_Chmod 444 ${2}/${1}
+        fi
+      fi
+
       \rm out_rsync
     fi
@@ -1137,5 +1229,5 @@
   IGCM_debug_PushStack "IGCM_sys_Get" $@
 
-  typeset DEST RET dm_liste ifile target
+  typeset DEST status dm_liste
 
   if ( $DEBUG_sys ) ; then
@@ -1153,29 +1245,18 @@
     # test if the (first) file is present in the old computation :
     IGCM_sys_TestFileArchive ${dm_liste[0]}
-    RET=$?
-    if [ ${RET} -gt 0 ] ; then
+    status=$?
+    if [ ${status} -gt 0 ] ; then
       echo "IGCM_sys_Get, ERROR : regular file ${dm_liste[0]} DOES NOT EXIST ."
       IGCM_debug_Exit "IGCM_sys_Get"
-            #return
-    fi
-
-    (( RET=0 ))
-    for target in ${dm_liste[*]} ; do
-      \cp ${target} ${DEST} >> out_rsync 2>&1
-      (( RET=RET+$? ))
-    done
-
-#       echo ${RSYNC} ${RSYNC_opt} $@ > out_rsync 2>&1
-#       ${RSYNC} ${RSYNC_opt} $@ >> out_rsync 2>&1
-#       RET=$?
-#       IGCM_sys_Rsync_out $RET
-
-#       ${libIGCM}/libIGCM_sys/IGCM_analyse_rsync_out.awk out_rsync
-#       (( RET=RET+$? ))
-
-    if [ ${RET} -gt 0 ] ; then
-      echo "IGCM_sys_Get : error"
+      return
+    fi
+
+    #USUAL WAY
+    \cp ${dm_liste[*]} ${DEST} > out_rsync 2>&1
+    status=$?
+
+    if [ ${status} -gt 0 ] ; then
+      IGCM_debug_Print 2 "IGCM_sys_Get : cp failed error code ${status}"
       cat out_rsync
-      \rm out_rsync
       IGCM_debug_Exit "IGCM_sys_Get"
     else
@@ -1196,9 +1277,16 @@
   IGCM_debug_PushStack "IGCM_sys_GetBuffer" $@
 
-  typeset DEST RET status buf_liste ifile target file_work
+  typeset DEST buf_liste target file_work
+  typeset NB_ESSAI DELAI status i
 
   if ( $DEBUG_sys ) ; then
     echo "IGCM_sys_GetBuffer :" $@
   fi
+
+  # number of tentative
+  NB_ESSAI=3
+  # time delay between tentative
+  DELAI=2
+
   if [ $DRYRUN -le 2 ]; then
     if [ X${1} = X'/l' ] ; then
@@ -1212,22 +1300,50 @@
     #USUAL WAY
     if [ X${1} = X'/l' ] ; then
-      (( RET=0 ))
       for target in ${buf_liste[*]} ; do
         local_file=$( basename ${target} )
-        \cp ${target} ${DEST}/${local_file} >> out_rsync 2>&1
-        (( RET = RET + $? ))
+        i=0
+        while [ $i -lt $NB_ESSAI ] ; do
+          \cp ${target} ${DEST}/${local_file} >> out_rsync 2>&1
+          status=$?
+          if [ ${status} -gt 0 ]; then
+            IGCM_debug_Print 2 "IGCM_sys_GetBuffer : cp failed error code ${status} ${i}/${NB_ESSAI}"
+            IGCM_debug_Print 2 "IGCM_sys_GetBuffer : sleep ${DELAI} seconds and try again."
+            sleep $DELAI
+          else
+            break
+          fi
+          (( i = i + 1 ))
+        done
+        if [ ${status} -gt 0 ] ; then
+          echo "IGCM_sys_Get : error"
+          cat out_rsync
+          \rm out_rsync
+          IGCM_debug_Exit "IGCM_sys_GetBuffer"
+        else
+          \rm out_rsync
+        fi
       done
     else
-      \cp ${buf_liste} ${DEST} >> out_rsync 2>&1
-      status=$?
-    fi
-
-    if [ ${RET} -gt 0 ] ; then
-      echo "IGCM_sys_GetBuffer : error"
-      cat out_rsync
-      \rm out_rsync
-      IGCM_debug_Exit "IGCM_sys_GetBuffer"
-    else
-      \rm out_rsync
+      i=0
+      while [ $i -lt $NB_ESSAI ] ; do
+        \cp ${buf_liste} ${DEST} >> out_rsync 2>&1
+        status=$?
+        if [ ${status} -gt 0 ]; then
+          IGCM_debug_Print 2 "IGCM_sys_GetBuffer : cp failed error code ${status} ${i}/${NB_ESSAI}"
+          IGCM_debug_Print 2 "IGCM_sys_GetBuffer : sleep ${DELAI} seconds and try again."
+          sleep $DELAI
+        else
+          break
+        fi
+        (( i = i + 1 ))
+      done
+      if [ ${status} -gt 0 ] ; then
+        echo "IGCM_sys_Get : error"
+        cat out_rsync
+        \rm out_rsync
+        IGCM_debug_Exit "IGCM_sys_GetBuffer"
+      else
+        \rm out_rsync
+      fi
     fi
   else
@@ -1286,5 +1402,5 @@
 #D-#==================================================
 #D-function IGCM_sys_Dods_Cp
-#D-* Purpose: Copy from $(ARCHIVE) files to /tmp/DODS for simulation of internet protocole.
+#D-* Purpose: Copy $(ARCHIVE) files on DODS internet protocole.
 #D-* Examples:
 #D-
@@ -1298,5 +1414,5 @@
 #D-#==================================================
 #D-function IGCM_sys_Put_Dods
-#D-* Purpose: Put $(ARCHIVE) files on /tmp/DODS for simulation of internet protocole.
+#D-* Purpose: Put ${ARCHIVE} files on DODS internet protocole. Dummy function here
 #D-* Examples:
 #D-
@@ -1306,14 +1422,4 @@
     echo "IGCM_sys_Put_Dods :" $@
   fi
-  if [ $DRYRUN = 0 ]; then
-    RET=0
-
-    if [ ${RET} -gt 0 ] ; then
-      echo "IGCM_sys_Put_Dods : error."
-      IGCM_debug_Exit "IGCM_sys_Put_Dods"
-    fi
-  else
-    ( ${DEBUG_debug} ) && echo "DRYRUN mode = " $DRYRUN >> stack
-  fi
   IGCM_debug_PopStack "IGCM_sys_Put_Dods"
 }
@@ -1322,4 +1428,9 @@
 # REBUILD OPERATOR
 
+#D-#==================================================
+#D-function IGCM_sys_rebuild
+#D-* Purpose: rebuild parallel files
+#D-* Examples:
+#D-
 function IGCM_sys_rebuild {
   IGCM_debug_PushStack "IGCM_sys_rebuild" -- $@
@@ -1327,7 +1438,32 @@
     echo "IGCM_sys_rebuild :" $@
   fi
-  rebuild -f -o $@
-  if [ $? -gt 0 ] ; then
-    echo "IGCM_sys_rebuild : rebuild error"
+
+  typeset NB_ESSAI DELAI status i firstArg
+  # number of tentative
+  NB_ESSAI=3
+  # time delay between tentative
+  DELAI=2
+
+  i=0
+  while [ $i -lt $NB_ESSAI ] ; do
+    rebuild -f -o $@ > out_rsync 2>&1
+    status=$?
+    if [ ${status} -gt 0 ] ; then
+      IGCM_debug_Print 2 "IGCM_sys_rebuild : error code ${status}"
+      cat out_rsync
+      \rm out_rsync
+      IGCM_debug_Print 2 "IGCM_sys_rebuild : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again."
+      firstArg=${1}
+      \rm ${firstArg}
+      sleep $DELAI
+    else
+      \rm out_rsync
+      break
+    fi
+    (( i = i + 1 ))
+  done
+
+  if [ ${status} -gt 0 ] ; then
+    echo "IGCM_sys_rebuild : rebuild error code is ${status}"
     IGCM_debug_Exit "rebuild"
   fi
@@ -1336,4 +1472,9 @@
 }
 
+#D-#==================================================
+#D-function IGCM_sys_rebuild_station
+#D-* Purpose: rebuild parallel files describing station 
+#D-* Examples:
+#D-
 function IGCM_sys_rebuild_station {
   IGCM_debug_PushStack "IGCM_sys_rebuild_station" -- $@
@@ -1430,4 +1571,9 @@
 # Activate Running Environnment Variables
 
+#D-#==================================================
+#D-function IGCM_sys_desactiv_variables
+#D-* Purpose: set environement variables prior to execution
+#D-* Examples:
+#D-
 function IGCM_sys_activ_variables {
   IGCM_debug_PushStack "IGCM_sys_activ_variables"
@@ -1435,4 +1581,13 @@
     echo "IGCM_sys_activ_variables"
   fi
+
+# --------------------------------------------------------------------
+#D- MPI specifications
+# --------------------------------------------------------------------
+
+# --------------------------------------------------------------------
+#D- Other specifications
+# --------------------------------------------------------------------
+
   IGCM_debug_PopStack "IGCM_sys_activ_variables"
 }
@@ -1441,4 +1596,9 @@
 # Desactivate Running Environnment Variables
 
+#D-#==================================================
+#D-function IGCM_sys_desactiv_variables
+#D-* Purpose: unset environement variables after execution
+#D-* Examples:
+#D-
 function IGCM_sys_desactiv_variables {
   IGCM_debug_PushStack "IGCM_sys_desactiv_variables"
@@ -1446,4 +1606,12 @@
     echo "IGCM_sys_desactiv_variables"
   fi
+# --------------------------------------------------------------------
+#D- MPI specifications
+# --------------------------------------------------------------------
+
+# --------------------------------------------------------------------
+#D- Other specifications
+# --------------------------------------------------------------------
+
   IGCM_debug_PopStack "IGCM_sys_desactiv_variables"
 }
@@ -1452,4 +1620,9 @@
 # Build MPI/OMP scripts run file (dummy function)
 
+#D-#==================================================
+#D-function IGCM_sys_build_run_file
+#D-* Purpose: build run file (deprecated)
+#D-* Examples:
+#D-
 function IGCM_sys_build_run_file {
 
@@ -1460,4 +1633,10 @@
 ############################################################
 # Build MPI/OMP scripts
+
+#D-#==================================================
+#D-function IGCM_sys_build_execution_scripts
+#D-* Purpose: build execution scripts to be launch by ${HOST_MPIRUN_COMMAND}
+#D-* Examples:
+#D-
 function IGCM_sys_build_execution_scripts
 {
@@ -1471,5 +1650,5 @@
 
   if [ ! -f ${SUBMIT_DIR}/Job_${config_UserChoices_JobName} ]  ; then
-    IGCM_debug_Exit "IGCM_sys_titane build_execution_scripts : Job_${config_UserChoices_JobName} doesn't exist in SUBMIT_DIR : ${SUBMIT_DIR} "
+    IGCM_debug_Exit "IGCM_sys_default build_execution_scripts : Job_${config_UserChoices_JobName} don't exist in SUBMIT_DIR : ${SUBMIT_DIR} "
   fi
 
@@ -1712,6 +1891,6 @@
   fi
 
-  IGCM_debug_Print 1 "sys $( hostname ) : La commande d execution est "
-  IGCM_debug_Print 1 $EXECUTION
+  IGCM_debug_Print 1 "sys $( hostname ) : execution command is"
+  IGCM_debug_Print 1 "$EXECUTION"
 
   IGCM_debug_PopStack "IGCM_sys_build_execution_scripts"
@@ -1719,5 +1898,11 @@
 
 ############################################################
-# Check of space available on temporary filesytems
+# Check of space available on temporary filesytems. Dummy function here
+
+#D-#==================================================
+#D-function IGCM_sys_check_quota. Dummy call here
+#D-* Purpose: check user quota. Stop the simulation if quota above 90%
+#D-* Examples:
+#D-
 function IGCM_sys_check_quota {
   IGCM_debug_PushStack "IGCM_sys_check_quota"
@@ -1728,7 +1913,26 @@
 }
 
+#D-#==================================================
+#D-function IGCM_sys_CountJobInQueue
+#D-* Purpose: Check if job_name is currently
+#D-  running or in queue
+#D-* Examples: IGCM_sys_CountJobInQueue ${JobName} NbRun
+#D-
+function IGCM_sys_CountJobInQueue {
+  IGCM_debug_PushStack "IGCM_sys_CountJobInQueue"
+  if ( $DEBUG_sys ) ; then
+    echo "IGCM_sys_CountJobInQueue"
+  fi
+  IGCM_debug_PopStack "IGCM_sys_CountJobInQueue"
+}
+
 ##############################################################
 # NCO OPERATOR
 
+#D-#==================================================
+#D-function IGCM_sys_ncap2
+#D-* Purpose: encapsulate ncap2 call so as to manage error code and retry
+#D-* Examples:
+#D-
 function IGCM_sys_ncap2 {
   IGCM_debug_PushStack "IGCM_sys_ncap2" -- $@
@@ -1761,6 +1965,6 @@
 
   if [ ${status} -gt 0 ] ; then
-      echo "IGCM_sys_ncap2 : ncap2 error"
-      IGCM_debug_Exit "ncap2"
+    echo "IGCM_sys_ncap2 : ncap2 error"
+    IGCM_debug_Exit "ncap2"
   fi
 
@@ -1768,4 +1972,9 @@
 }
 
+#D-#==================================================
+#D-function IGCM_sys_ncatted
+#D-* Purpose: encapsulate ncatted call so as to manage error code and retry
+#D-* Examples:
+#D-
 function IGCM_sys_ncatted {
   IGCM_debug_PushStack "IGCM_sys_ncatted" -- $@
@@ -1798,6 +2007,6 @@
 
   if [ ${status} -gt 0 ] ; then
-      echo "IGCM_sys_ncatted : ncatted error"
-      IGCM_debug_Exit "ncatted"
+    echo "IGCM_sys_ncatted : ncatted error"
+    IGCM_debug_Exit "ncatted"
   fi
 
@@ -1805,4 +2014,9 @@
 }
 
+#D-#==================================================
+#D-function IGCM_sys_ncbo
+#D-* Purpose: encapsulate ncbo call so as to manage error code and retry
+#D-* Examples:
+#D-
 function IGCM_sys_ncbo {
   IGCM_debug_PushStack "IGCM_sys_ncbo" -- $@
@@ -1835,6 +2049,6 @@
 
   if [ ${status} -gt 0 ] ; then
-      echo "IGCM_sys_ncbo : ncbo error"
-      IGCM_debug_Exit "ncbo"
+    echo "IGCM_sys_ncbo : ncbo error"
+    IGCM_debug_Exit "ncbo"
   fi
 
@@ -1842,4 +2056,9 @@
 }
 
+#D-#==================================================
+#D-function IGCM_sys_ncdif
+#D-* Purpose: encapsulate ncdiff call so as to manage error code and retry
+#D-* Examples:
+#D-
 function IGCM_sys_ncdiff {
   IGCM_debug_PushStack "IGCM_sys_ncdiff" -- $@
@@ -1872,6 +2091,6 @@
 
   if [ ${status} -gt 0 ] ; then
-      echo "IGCM_sys_ncdiff : ncdiff error"
-      IGCM_debug_Exit "ncdiff"
+    echo "IGCM_sys_ncdiff : ncdiff error"
+    IGCM_debug_Exit "ncdiff"
   fi
 
@@ -1879,4 +2098,9 @@
 }
 
+#D-#==================================================
+#D-function IGCM_sys_ncea
+#D-* Purpose: encapsulate ncea call so as to manage error code and retry
+#D-* Examples:
+#D-
 function IGCM_sys_ncea {
   IGCM_debug_PushStack "IGCM_sys_ncea" -- $@
@@ -1909,6 +2133,6 @@
 
   if [ ${status} -gt 0 ] ; then
-      echo "IGCM_sys_ncea : ncea error"
-      IGCM_debug_Exit "ncea"
+    echo "IGCM_sys_ncea : ncea error"
+    IGCM_debug_Exit "ncea"
   fi
 
@@ -1916,4 +2140,9 @@
 }
 
+#D-#==================================================
+#D-function IGCM_sys_ncecat
+#D-* Purpose: encapsulate ncecat call so as to manage error code and retry
+#D-* Examples:
+#D-
 function IGCM_sys_ncecat {
   IGCM_debug_PushStack "IGCM_sys_ncecat" -- $@
@@ -1946,6 +2175,6 @@
 
   if [ ${status} -gt 0 ] ; then
-      echo "IGCM_sys_ncecat : ncecat error"
-      IGCM_debug_Exit "ncecat"
+    echo "IGCM_sys_ncecat : ncecat error"
+    IGCM_debug_Exit "ncecat"
   fi
 
@@ -1953,4 +2182,9 @@
 }
 
+#D-#==================================================
+#D-function IGCM_sys_ncflint
+#D-* Purpose: encapsulate ncflint call so as to manage error code and retry
+#D-* Examples:
+#D-
 function IGCM_sys_ncflint {
   IGCM_debug_PushStack "IGCM_sys_ncflint" -- $@
@@ -1983,6 +2217,6 @@
 
   if [ ${status} -gt 0 ] ; then
-      echo "IGCM_sys_ncflint : ncflint error"
-      IGCM_debug_Exit "ncflint"
+    echo "IGCM_sys_ncflint : ncflint error"
+    IGCM_debug_Exit "ncflint"
   fi
 
@@ -1990,4 +2224,9 @@
 }
 
+#D-#==================================================
+#D-function IGCM_sys_ncks
+#D-* Purpose: encapsulate ncks call so as to manage error code and retry
+#D-* Examples:
+#D-
 function IGCM_sys_ncks {
   IGCM_debug_PushStack "IGCM_sys_ncks" -- $@
@@ -2020,6 +2259,6 @@
 
   if [ ${status} -gt 0 ] ; then
-      echo "IGCM_sys_ncks : ncks error"
-      IGCM_debug_Exit "ncks"
+    echo "IGCM_sys_ncks : ncks error"
+    IGCM_debug_Exit "ncks"
   fi
 
@@ -2027,4 +2266,9 @@
 }
 
+#D-#==================================================
+#D-function IGCM_sys_ncpdq
+#D-* Purpose: encapsulate ncpdq call so as to manage error code and retry
+#D-* Examples:
+#D-
 function IGCM_sys_ncpdq {
   IGCM_debug_PushStack "IGCM_sys_ncpdq" -- $@
@@ -2057,6 +2301,6 @@
 
   if [ ${status} -gt 0 ] ; then
-      echo "IGCM_sys_ncpdq : ncpdq error"
-      IGCM_debug_Exit "ncpdq"
+    echo "IGCM_sys_ncpdq : ncpdq error"
+    IGCM_debug_Exit "ncpdq"
   fi
 
@@ -2064,4 +2308,9 @@
 }
 
+#D-#==================================================
+#D-function IGCM_sys_ncra
+#D-* Purpose: encapsulate ncra call so as to manage error code and retry
+#D-* Examples:
+#D-
 function IGCM_sys_ncra {
   IGCM_debug_PushStack "IGCM_sys_ncra" -- $@
@@ -2094,6 +2343,6 @@
 
   if [ ${status} -gt 0 ] ; then
-      echo "IGCM_sys_ncra : ncra error"
-      IGCM_debug_Exit "ncra"
+    echo "IGCM_sys_ncra : ncra error"
+    IGCM_debug_Exit "ncra"
   fi
 
@@ -2101,4 +2350,9 @@
 }
 
+#D-#==================================================
+#D-function IGCM_sys_ncrcat
+#D-* Purpose: encapsulate ncrcat call so as to manage error code and retry
+#D-* Examples:
+#D-
 function IGCM_sys_ncrcat {
   IGCM_debug_PushStack "IGCM_sys_ncrcat" -- $@
@@ -2107,5 +2361,5 @@
   fi
 
-  typeset NB_ESSAI DELAI status i
+  typeset NB_ESSAI DELAI status i lastArg
   # number of tentative
   NB_ESSAI=3
@@ -2123,4 +2377,14 @@
       IGCM_debug_Print 2 "IGCM_sys_ncrcat : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again."
       sleep $DELAI
+    elif [ ! "X$( grep "WARNING Intra-file non-monotonicity" out_rsync )" = "X" ] ; then
+      IGCM_debug_Print 2 "IGCM_sys_ncrcat : WARNING Intra-file non-monotonicity"
+      cat out_rsync
+      # remove files having corrupted time axis
+      eval lastArg=\${$#}
+      IGCM_debug_Print 2 "IGCM_sys_ncrcat : Delete ${lastArg}"
+      \rm ${lastArg}
+      \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
@@ -2131,6 +2395,6 @@
 
   if [ ${status} -gt 0 ] ; then
-      echo "IGCM_sys_ncrcat : ncrcat error"
-      #IGCM_debug_Exit "ncrcat"
+    echo "IGCM_sys_ncrcat : ncrcat error"
+    #IGCM_debug_Exit "ncrcat"
   fi
 
@@ -2138,4 +2402,9 @@
 }
 
+#D-#==================================================
+#D-function IGCM_sys_ncrename
+#D-* Purpose: encapsulate ncrename call so as to manage error code and retry
+#D-* Examples:
+#D-
 function IGCM_sys_ncrename {
   IGCM_debug_PushStack "IGCM_sys_ncrename" -- $@
@@ -2168,6 +2437,6 @@
 
   if [ ${status} -gt 0 ] ; then
-      echo "IGCM_sys_ncrename : ncrename error"
-      IGCM_debug_Exit "ncrename"
+    echo "IGCM_sys_ncrename : ncrename error"
+    IGCM_debug_Exit "ncrename"
   fi
 
@@ -2175,4 +2444,9 @@
 }
 
+#D-#==================================================
+#D-function IGCM_sys_ncwa
+#D-* Purpose: encapsulate ncwa call so as to manage error code and retry
+#D-* Examples:
+#D-
 function IGCM_sys_ncwa {
   IGCM_debug_PushStack "IGCM_sys_ncwa" -- $@
@@ -2205,6 +2479,6 @@
 
   if [ ${status} -gt 0 ] ; then
-      echo "IGCM_sys_ncwa : ncwa error"
-      IGCM_debug_Exit "ncwa"
+    echo "IGCM_sys_ncwa : ncwa error"
+    IGCM_debug_Exit "ncwa"
   fi
 
@@ -2215,4 +2489,9 @@
 # CDO OPERATOR
 
+#D-#==================================================
+#D-function IGCM_sys_cdo
+#D-* Purpose: encapsulate cdo call so as to manage error code and retry
+#D-* Examples:
+#D-
 function IGCM_sys_cdo {
   IGCM_debug_PushStack "IGCM_sys_cdo" -- $@
Index: /trunk/libIGCM/libIGCM_sys/libIGCM_sys_iitm.ksh
===================================================================
--- /trunk/libIGCM/libIGCM_sys/libIGCM_sys_iitm.ksh	(revision 810)
+++ /trunk/libIGCM/libIGCM_sys/libIGCM_sys_iitm.ksh	(revision 811)
@@ -210,16 +210,8 @@
 function IGCM_sys_RshArchive {
   IGCM_debug_PushStack "IGCM_sys_RshArchive" $@
-  DEBUG_sys=false IGCM_sys_IsFileArchived "$@"
-  if [ $? = 0 ] ; then
-    /bin/ksh <<-EOF
+  /bin/ksh <<-EOF
     ${@}
 EOF
-    status=$?
-  else
-    /bin/ksh <<-EOF
-    ${@}
-EOF
-    status=$?
-  fi
+  status=$?
   if [ ${status} -gt 0 ] ; then
     IGCM_debug_Print 2 "IGCM_sys_RshArchive : command failed error code ${status}"
@@ -547,5 +539,5 @@
   fi
 
-  \ls -r $@
+  \tree -f $@
 
   IGCM_debug_PopStack "IGCM_sys_Tree"
@@ -596,6 +588,5 @@
   IGCM_debug_PushStack "IGCM_sys_Qsub" $@
 
-  typeset ERROR
-  ERROR=0
+  typeset status
 
   if ( $DEBUG_sys ) ; then
@@ -606,10 +597,10 @@
   [ ${#@} = 2 ] &&  REP_FOR_JOB=${2}
   sed -e "s:\# \@ output *= .*:\# \@ output = ${Script_Output}:" \
-      -e "s:\# \@ error *= .*:\# \@ error = ${Script_Output}:"   \
-      $1 > ${REP_FOR_JOB}/JOB_FOR_IGCM
-  cd $REP_FOR_JOB ; /usr/lpp/LoadL/full/bin/llsubmit JOB_FOR_IGCM ; ERROR=$? ; cd - ;
-
-  if [ ${ERROR} -gt 0 ] ; then
-    echo "IGCM_sys_Qsub : erreur $@"
+    -e "s:\# \@ error *= .*:\# \@ error = ${Script_Output}:"   \
+    $1 > ${REP_FOR_JOB}/JOB_FOR_IGCM
+  cd $REP_FOR_JOB ; /usr/lpp/LoadL/full/bin/llsubmit JOB_FOR_IGCM ; status=$? ; cd - ;
+
+  if [ ${status} -gt 0 ] ; then
+    IGCM_debug_Print 2 "IGCM_sys_Qsub $1 : error code ${status}"
     IGCM_debug_Exit "IGCM_sys_Qsub"
   else
@@ -627,6 +618,5 @@
   IGCM_debug_PushStack "IGCM_sys_QsubPost" $@
 
-  typeset ERROR
-  ERROR=0
+  typeset status
 
   if ( $DEBUG_sys ) ; then
@@ -638,15 +628,14 @@
 
   sed -e "s:\# \@ output *= .*:\# \@ output = ${Script_Post_Output}.out:" \
-      -e "s:\# \@ error *= .*:\# \@ error = ${Script_Post_Output}.out:"   \
-      ${libIGCM_POST}/$1.job > ${REP_FOR_JOB}/JOB_FOR_IGCM
-
-  cd $REP_FOR_JOB ; /usr/lpp/LoadL/full/bin/llsubmit JOB_FOR_IGCM ; ERROR=$? ; cd - ;
-  if [ ${ERROR} -gt 0 ] ; then
-    echo "IGCM_sys_QsubPost : erreur $@."
+    -e "s:\# \@ error *= .*:\# \@ error = ${Script_Post_Output}.out:"   \
+    ${libIGCM_POST}/$1.job > ${REP_FOR_JOB}/JOB_FOR_IGCM
+
+  cd $REP_FOR_JOB ; /usr/lpp/LoadL/full/bin/llsubmit JOB_FOR_IGCM ; status=$? ; cd - ;
+  if [ ${status} -gt 0 ] ; then
+    IGCM_debug_Print 2 "IGCM_sys_QsubPost $1 : error code ${status}"
     IGCM_debug_Exit "IGCM_sys_QsubPost"
   else
     IGCM_sys_Rm ${REP_FOR_JOB}/JOB_FOR_IGCM
   fi
-
   IGCM_debug_PopStack "IGCM_sys_QsubPost"
 }
@@ -872,5 +861,4 @@
     \rm out_rsync
   fi
-
   IGCM_debug_PopStack "IGCM_sys_RmRunDir"
 }
@@ -967,6 +955,6 @@
     typeset status
 
-      #USUAL WAY
-    \cp -rp $1 $2 > out_rsync 2>&1
+    #USUAL WAY
+    \cp -ur $1 $2 > out_rsync 2>&1
     status=$?
 
@@ -1158,6 +1146,4 @@
     #
     IGCM_sys_MkdirArchive $( dirname $2 )
-    #
-    typeset RET
     #
     if [ X${JobType} = XRUN ] ; then
@@ -1312,15 +1298,4 @@
       return
     fi
-
-    # SD : dm_liste is not suited for computing job
-    #      because we change filename during transfert
-    #      dm_liste is better suited for post-treatment
-    #dm_liste=" "
-    #(( ifile=1 ))
-    #while [ $ifile -lt $# ] ; do
-    #    dm_liste=$( eval echo ${dm_liste} " "\${${ifile}} )
-    #    (( ifile = ifile + 1 ))
-    #done
-    #DEST=$( eval echo \${${#}} )
 
     #USUAL WAY
@@ -1453,4 +1428,28 @@
 
 #D-#==================================================
+#D-function IGCM_sys_Dods_Rm
+#D-* Purpose: DO NOTHING ! Put ${ARCHIVE} files on DODS internet protocole.
+#D-* Examples:
+#D-
+function IGCM_sys_Dods_Rm {
+  if ( $DEBUG_sys ) ; then
+    echo "IGCM_sys_Dods_Rm :" $@
+  fi
+  return 0
+}
+
+#D-#==================================================
+#D-function IGCM_sys_Dods_Cp
+#D-* Purpose: Copy $(ARCHIVE) files on DODS internet protocole.
+#D-* Examples:
+#D-
+function IGCM_sys_Dods_Cp {
+  if ( $DEBUG_sys ) ; then
+    echo "IGCM_sys_Dods_Cp :" $@
+  fi
+  return 0
+}
+
+#D-#==================================================
 #D-function IGCM_sys_Put_Dods
 #D-* Purpose: Put ${ARCHIVE} files on DODS internet protocole. Dummy function here
@@ -1619,5 +1618,5 @@
   IGCM_debug_PushStack "IGCM_sys_activ_variables"
   if ( $DEBUG_sys ) ; then
-    echo "IGCM_sys_activ_variables "
+    echo "IGCM_sys_activ_variables"
   fi
 
@@ -1644,5 +1643,5 @@
   IGCM_debug_PushStack "IGCM_sys_desactiv_variables"
   if ( $DEBUG_sys ) ; then
-    echo "IGCM_sys_desactiv_variables "
+    echo "IGCM_sys_desactiv_variables"
   fi
 # --------------------------------------------------------------------
@@ -1667,5 +1666,5 @@
 function IGCM_sys_build_run_file {
 
-IGCM_debug_Print 3 " dummy function : IGCM_sys_build_run_file "
+  IGCM_debug_Print 3 " dummy function : IGCM_sys_build_run_file "
 
 }
@@ -1831,5 +1830,5 @@
   fi
 
-  IGCM_debug_Print 1 "sys iitm : execution command is "
+  IGCM_debug_Print 1 "sys iitm : execution command is"
   IGCM_debug_Print 1 "$EXECUTION"
 
@@ -1911,6 +1910,6 @@
 
   if [ ${status} -gt 0 ] ; then
-      echo "IGCM_sys_ncap2 : ncap2 error"
-      IGCM_debug_Exit "ncap2"
+    echo "IGCM_sys_ncap2 : ncap2 error"
+    IGCM_debug_Exit "ncap2"
   fi
 
@@ -1953,6 +1952,6 @@
 
   if [ ${status} -gt 0 ] ; then
-      echo "IGCM_sys_ncatted : ncatted error"
-      IGCM_debug_Exit "ncatted"
+    echo "IGCM_sys_ncatted : ncatted error"
+    IGCM_debug_Exit "ncatted"
   fi
 
@@ -1995,6 +1994,6 @@
 
   if [ ${status} -gt 0 ] ; then
-      echo "IGCM_sys_ncbo : ncbo error"
-      IGCM_debug_Exit "ncbo"
+    echo "IGCM_sys_ncbo : ncbo error"
+    IGCM_debug_Exit "ncbo"
   fi
 
@@ -2037,6 +2036,6 @@
 
   if [ ${status} -gt 0 ] ; then
-      echo "IGCM_sys_ncdiff : ncdiff error"
-      IGCM_debug_Exit "ncdiff"
+    echo "IGCM_sys_ncdiff : ncdiff error"
+    IGCM_debug_Exit "ncdiff"
   fi
 
@@ -2079,6 +2078,6 @@
 
   if [ ${status} -gt 0 ] ; then
-      echo "IGCM_sys_ncea : ncea error"
-      IGCM_debug_Exit "ncea"
+    echo "IGCM_sys_ncea : ncea error"
+    IGCM_debug_Exit "ncea"
   fi
 
@@ -2121,6 +2120,6 @@
 
   if [ ${status} -gt 0 ] ; then
-      echo "IGCM_sys_ncecat : ncecat error"
-      IGCM_debug_Exit "ncecat"
+    echo "IGCM_sys_ncecat : ncecat error"
+    IGCM_debug_Exit "ncecat"
   fi
 
@@ -2163,6 +2162,6 @@
 
   if [ ${status} -gt 0 ] ; then
-      echo "IGCM_sys_ncflint : ncflint error"
-      IGCM_debug_Exit "ncflint"
+    echo "IGCM_sys_ncflint : ncflint error"
+    IGCM_debug_Exit "ncflint"
   fi
 
@@ -2205,6 +2204,6 @@
 
   if [ ${status} -gt 0 ] ; then
-      echo "IGCM_sys_ncks : ncks error"
-      IGCM_debug_Exit "ncks"
+    echo "IGCM_sys_ncks : ncks error"
+    IGCM_debug_Exit "ncks"
   fi
 
@@ -2247,6 +2246,6 @@
 
   if [ ${status} -gt 0 ] ; then
-      echo "IGCM_sys_ncpdq : ncpdq error"
-      IGCM_debug_Exit "ncpdq"
+    echo "IGCM_sys_ncpdq : ncpdq error"
+    IGCM_debug_Exit "ncpdq"
   fi
 
@@ -2289,6 +2288,6 @@
 
   if [ ${status} -gt 0 ] ; then
-      echo "IGCM_sys_ncra : ncra error"
-      IGCM_debug_Exit "ncra"
+    echo "IGCM_sys_ncra : ncra error"
+    IGCM_debug_Exit "ncra"
   fi
 
@@ -2341,5 +2340,5 @@
 
   if [ ${status} -gt 0 ] ; then
-      echo "IGCM_sys_ncrcat : ncrcat error"
+    echo "IGCM_sys_ncrcat : ncrcat error"
       #IGCM_debug_Exit "ncrcat"
   fi
@@ -2383,6 +2382,6 @@
 
   if [ ${status} -gt 0 ] ; then
-      echo "IGCM_sys_ncrename : ncrename error"
-      IGCM_debug_Exit "ncrename"
+    echo "IGCM_sys_ncrename : ncrename error"
+    IGCM_debug_Exit "ncrename"
   fi
 
@@ -2425,6 +2424,6 @@
 
   if [ ${status} -gt 0 ] ; then
-      echo "IGCM_sys_ncwa : ncwa error"
-      IGCM_debug_Exit "ncwa"
+    echo "IGCM_sys_ncwa : ncwa error"
+    IGCM_debug_Exit "ncwa"
   fi
 
Index: /trunk/libIGCM/libIGCM_sys/libIGCM_sys_obelix.ksh
===================================================================
--- /trunk/libIGCM/libIGCM_sys/libIGCM_sys_obelix.ksh	(revision 810)
+++ /trunk/libIGCM/libIGCM_sys/libIGCM_sys_obelix.ksh	(revision 811)
@@ -123,5 +123,5 @@
 
 #====================================================
-#- ARCHIVE (dedicated to large files)
+#- ARCHIVE
 typeset ARCHIVE=${ARCHIVE:=/home/scratch01/${LOGIN}}
 
@@ -173,7 +173,5 @@
 #D-
 function IGCM_sys_ChangeArchive {
-
   IGCM_debug_Print 1 " dummy function : IGCM_sys_ChangeArchive "
-
 }
 
@@ -209,6 +207,7 @@
     ${@}
 EOF
-  if [ $? -gt 0 ] ; then
-    echo "IGCM_sys_RshArchive : erreur."
+  status=$?
+  if [ ${status} -gt 0 ] ; then
+    IGCM_debug_Print 2 "IGCM_sys_RshArchive : command failed error code ${status}"
     IGCM_debug_Exit "IGCM_sys_RshArchive"
   fi
@@ -227,6 +226,4 @@
   fi
 
-  #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_$$
@@ -234,5 +231,5 @@
 # ============ FRONTEND START ============ #
 
-    ssh obelix3 exec /bin/ksh <tmp_IGCM_sys_RshPost_$$
+  ssh obelix3 exec /bin/ksh <tmp_IGCM_sys_RshPost_$$
   if [ $? -gt 0 ] ; then
     echo "IGCM_sys_RshPost : erreur."
@@ -279,4 +276,7 @@
   fi
 
+  sleep 10
+  rm -f job_end.mail
+
   if [ $? -gt 0 ] ; then
     echo "IGCM_sys_SendMail : erreur."
@@ -323,7 +323,9 @@
   #- creation de repertoire sur le serveur fichier
   if [ ! -d ${1} ]; then
-    \mkdir -p $1
-    if [ $? -gt 0 ] ; then
-      echo "IGCM_sys_MkdirArchive : erreur."
+    mkdir -p $1
+    status=$?
+
+    if [ ${status} -gt 0 ] ; then
+      IGCM_debug_Print 2 "IGCM_sys_MkdirArchive : mkdir failed error code ${status}"
       IGCM_debug_Exit "IGCM_sys_MkdirArchive"
     fi
@@ -437,5 +439,4 @@
   ExistFlag=$( [ -d $1 ] && echo 0 || echo 1 )
   IGCM_debug_PopStack "IGCM_sys_TestDirArchive"
-
   return ${ExistFlag}
 }
@@ -577,7 +578,9 @@
     echo "IGCM_sys_Qsub :" $@
   fi
+  typeset status
   /usr/local/bin/qsub -q medium -o ${Script_Output} -N ${config_UserChoices_JobName}.${CumulPeriod} < $1
-  if [ $? -gt 0 ] ; then
-    echo "IGCM_sys_Qsub : erreur."
+  status=$?
+  if [ ${status} -gt 0 ] ; then
+    IGCM_debug_Print 2 "IGCM_sys_Qsub $1 : error code ${status}"
     IGCM_debug_Exit "IGCM_sys_Qsub"
   fi
@@ -595,7 +598,9 @@
     echo "IGCM_sys_QsubPost :" $@
   fi
+  typeset status
   /usr/local/bin/qsub -q medium -o ${POST_DIR}/${Script_Post_Output}.out ${libIGCM_POST}/$1.job -v ${listVarEnv}
-  if [ $? -gt 0 ] ; then
-    echo "IGCM_sys_QsubPost : erreur " $@
+  status=$?
+  if [ ${status} -gt 0 ] ; then
+    IGCM_debug_Print 2 "IGCM_sys_QsubPost $1 : error code ${status}"
     IGCM_debug_Exit "IGCM_sys_QsubPost"
   fi
@@ -719,4 +724,30 @@
 
 #D-#==================================================
+#D-function IGCM_sys_Miror_libIGCM
+#D-* Purpose: Mirror libIGCM PATH and lib to frontend
+#D-* Examples:
+#D-
+function IGCM_sys_Mirror_libIGCM {
+  IGCM_debug_PushStack "IGCM_sys_Mirror_libIGCM"
+  if ( $DEBUG_sys ) ; then
+    echo "IGCM_sys_Mirror_libIGCM"
+  fi
+
+  typeset status
+
+  mkdir -p ${HOME}/MIRROR/${PATHlibIGCM}
+
+  echo ${RSYNC} ${RSYNC_opt} ${libIGCM} ${HOME}/MIRROR/${PATHlibIGCM} > out_rsync 2>&1
+  ${RSYNC} ${RSYNC_opt} ${libIGCM} ${HOME}/MIRROR/${PATHlibIGCM} >> out_rsync 2>&1
+  status=$?
+
+  if [ ${status} -gt 0 ] ; then
+    echo "IGCM_sys_Mirror_libIGCM Warning : no libIGCM on frontend."
+    cat out_rsync
+  fi
+  IGCM_debug_PopStack "IGCM_sys_Mirror_libIGCM"
+}
+
+#D-#==================================================
 #D-function IGCM_sys_Cp
 #D-* Purpose: generic cp
@@ -791,5 +822,5 @@
 
   if [ ${status} -gt 0 ] ; then
-    echo "IGCM_sys_RmRunDir : error code ${status}"
+    echo "IGCM_sys_RmRunDir : rm error code is ${status}."
     cat out_rsync
     IGCM_debug_Exit "IGCM_sys_RmRunDir"
@@ -860,5 +891,5 @@
 
     if [ ${status} -gt 0 ] ; then
-      echo "IGCM_sys_Put_Dir : error code ${status}"
+      IGCM_debug_Print 2 "IGCM_sys_Put_Dir : cp failed error code ${status}"
       cat out_rsync
       IGCM_debug_Exit "IGCM_sys_Put_Dir"
@@ -892,9 +923,9 @@
 
     #USUAL WAY
-    \cp -R $1 $2 > out_rsync 2>&1
+    \cp -ur $1 $2 > out_rsync 2>&1
     status=$?
 
     if [ ${status} -gt 0 ] ; then
-      echo "IGCM_sys_Get_Dir : error."
+      IGCM_debug_Print 2 "IGCM_sys_Get_Dir : cp failed error code ${status}"
       cat out_rsync
       IGCM_debug_Exit "IGCM_sys_Get_Dir"
@@ -925,9 +956,23 @@
     fi
 
-    typeset status
-
-    #USUAL WAY
-    cp -RL $1 $2 > out_rsync 2>&1
-    status=$?
+    typeset NB_ESSAI DELAI status i
+    # number of tentative
+    NB_ESSAI=3
+    # time delay between tentative
+    DELAI=2
+
+    i=0
+    while [ $i -lt $NB_ESSAI ] ; do
+      \cp -urL $1 $2 > out_rsync 2>&1
+      status=$?
+      if [ ${status} -gt 0 ]; then
+        IGCM_debug_Print 2 "IGCM_sys_Get_Master : cp failed error code ${status} ${i}/${NB_ESSAI}"
+        IGCM_debug_Print 2 "IGCM_sys_Get_Master : sleep ${DELAI} seconds and try again."
+        sleep $DELAI
+      else
+        break
+      fi
+      (( i = i + 1 ))
+    done
 
     if [ ${status} -gt 0 ] ; then
@@ -936,5 +981,5 @@
       IGCM_debug_Exit "IGCM_sys_Get_Master"
     else
-      rm out_rsync
+      \rm out_rsync
     fi
   else
@@ -943,4 +988,10 @@
   IGCM_debug_PopStack "IGCM_sys_Get_Master"
 }
+
+#====================================================
+#- Call IGCM_sys_Mirror_libIGCM now !
+if ( $MirrorlibIGCM ) ; then
+  IGCM_sys_Mirror_libIGCM
+fi
 
 #D-#==================================================
@@ -966,4 +1017,61 @@
       IGCM_sys_Chmod 444 ${1}
     fi
+    #
+    # Only if we use rsync
+    #IGCM_sys_MkdirArchive $( dirname $2 )
+    #
+    #USUAL WAY
+    \cp $1 $2 > out_rsync 2>&1
+    status=$?
+
+#       #RSYNC WITH NETWORK SSH CALL
+#       echo ${RSYNC} ${RSYNC_opt} -e ssh ${RUN_DIR}/$1 ${STOREHOST}:${2} > out_rsync 2>&1
+#       ${RSYNC} ${RSYNC_opt} -e ssh ${RUN_DIR}/$1 ${STOREHOST}:${2} >> out_rsync 2>&1
+
+#       #RSYNC WITH NFS USE
+#       echo ${RSYNC} ${RSYNC_opt} ${RUN_DIR}/$1 ${2} > out_rsync 2>&1
+#       ${RSYNC} ${RSYNC_opt} ${RUN_DIR}/$1 ${2} >> out_rsync 2>&1
+
+#       status=$?
+#       IGCM_sys_Rsync_out $status
+
+#       ${libIGCM}/libIGCM_sys/IGCM_analyse_rsync_out.awk out_rsync
+#       (( status=status+$? ))
+
+    if [ ${status} -gt 0 ] ; then
+      echo "IGCM_sys_Put_Rest : cp failed error code ${status}"
+      cat out_rsync
+      IGCM_debug_Exit "IGCM_sys_Put_Rest"
+    else
+      \rm out_rsync
+    fi
+  else
+    ( ${DEBUG_debug} ) && echo "DRYRUN mode = " $DRYRUN >> stack
+  fi
+  IGCM_debug_PopStack "IGCM_sys_Put_Rest"
+}
+
+#D-#==================================================
+#D-function IGCM_sys_PutBuffer_Rest
+#D-* Purpose: Put computied restarts on ${SCRATCHDIR}.
+#D-           File and target directory must exist.
+#D-* Examples:
+#D-
+function IGCM_sys_PutBuffer_Rest {
+  IGCM_debug_PushStack "IGCM_sys_PutBuffer_Rest" $@
+  if ( $DEBUG_sys ) ; then
+    echo "IGCM_sys_PutBuffer_Rest :" $@
+  fi
+  if [ $DRYRUN = 0 ]; then
+    if [ ! -f ${1} ] ; then
+      echo "ERROR : IGCM_sys_PutBuffer_Rest ${1} DOES NOT EXIST ."
+      IGCM_debug_Exit "IGCM_sys_PutBuffer_Rest"
+    fi
+
+    typeset status
+    #
+    if [ X${JobType} = XRUN ] ; then
+      IGCM_sys_Chmod 444 ${1}
+    fi
 
     #
@@ -972,61 +1080,8 @@
     status=$?
 
-#       #RSYNC WITH NETWORK SSH CALL
-#       echo ${RSYNC} ${RSYNC_opt} -e ssh ${RUN_DIR}/$1 ${STOREHOST}:${2} > out_rsync 2>&1
-#       ${RSYNC} ${RSYNC_opt} -e ssh ${RUN_DIR}/$1 ${STOREHOST}:${2} >> out_rsync 2>&1
-
-#       #RSYNC WITH NFS USE
-#       echo ${RSYNC} ${RSYNC_opt} ${RUN_DIR}/$1 ${2} > out_rsync 2>&1
-#       ${RSYNC} ${RSYNC_opt} ${RUN_DIR}/$1 ${2} >> out_rsync 2>&1
-
-#       status=$?
-#       IGCM_sys_Rsync_out $status
-
-#       ${libIGCM}/libIGCM_sys/IGCM_analyse_rsync_out.awk out_rsync
-#       (( status=status+$? ))
-
-    if [ ${status} -gt 0 ] ; then
-      echo "IGCM_sys_Put_Rest : cp failed error code ${status}"
-      cat out_rsync
-      IGCM_debug_Exit "IGCM_sys_Put_Rest"
-    else
-      \rm out_rsync
-    fi
-  else
-    ( ${DEBUG_debug} ) && echo "DRYRUN mode = " $DRYRUN >> stack
-  fi
-  IGCM_debug_PopStack "IGCM_sys_Put_Rest"
-}
-
-#D-#==================================================
-#D-function IGCM_sys_PutBuffer_Rest
-#D-* Purpose: Put computied restarts on ${SCRATCHDIR}.
-#D-           File and target directory must exist.
-#D-* Examples:
-#D-
-function IGCM_sys_PutBuffer_Rest {
-  IGCM_debug_PushStack "IGCM_sys_PutBuffer_Rest" $@
-  if ( $DEBUG_sys ) ; then
-    echo "IGCM_sys_PutBuffer_Rest :" $@
-  fi
-  if [ $DRYRUN = 0 ]; then
-    if [ ! -f ${1} ] ; then
-      echo "ERROR : IGCM_sys_PutBuffer_Rest ${1} DOES NOT EXIST ."
-      IGCM_debug_Exit "IGCM_sys_PutBuffer_Rest"
-    fi
-
-    typeset status
-    #
-    if [ X${JobType} = XRUN ] ; then
-      IGCM_sys_Chmod 444 ${1}
-    fi
-
-    #
-    # USUAL WAY
-    \cp $1 $2 > out_rsync 2>&1
-    status=$?
-
     if [ ${status} -gt 0 ] ; then
       echo "IGCM_sys_PutBuffer_Rest : error code ${status}"
+      [ -f ${2} ] && ls -l ${2}
+      [ -f ${2}/${1} ] && ls -l ${2}/${1}
       cat out_rsync
       IGCM_debug_Exit "IGCM_sys_PutBuffer_Rest"
@@ -1061,16 +1116,15 @@
     echo "IGCM_sys_Put_Out :" $@
   fi
+
+  typeset status
+
   if [ $DRYRUN = 0 ]; then
-    if [ -f ${1} ] ; then
-      if [ ! -d $( dirname $2 ) ] ; then
-        IGCM_sys_MkdirArchive $( dirname $2 )
-      fi
-    else
+    if [ ! -f ${1} ] ; then
       echo "WARNING : IGCM_sys_Put_Out ${1} DOES NOT EXIST ."
       IGCM_debug_PopStack "IGCM_sys_Put_Out"
       return 1
     fi
-
-    typeset status
+    #
+    IGCM_sys_MkdirArchive $( dirname $2 )
     #
     if [ X${JobType} = XRUN ] ; then
@@ -1090,5 +1144,5 @@
 
     if [ ${status} -gt 0 ] ; then
-      echo "IGCM_sys_Put_Out : error."
+      IGCM_debug_Print 2 "IGCM_sys_Put_Out : rsync failed error code ${status}"
       cat out_rsync
       IGCM_debug_Exit "IGCM_sys_Put_Out"
@@ -1114,5 +1168,10 @@
   fi
 
-  typeset status
+  typeset NB_ESSAI DELAI status i exist skip
+
+  # number of tentative
+  NB_ESSAI=3
+  # time delay between tentative
+  DELAI=2
 
   if [ $DRYRUN = 0 ]; then
@@ -1126,19 +1185,57 @@
     #
 
-    if [ X${JobType} = XRUN ] ; then
-      if [ X${3} = X ] ; then
-        IGCM_sys_Chmod 444 ${1}
+    exist=false
+    skip=false
+    if [ -f $2 ] ; then
+      IGCM_debug_Print 1 "$2 already exist"
+      exist=true
+      if [ "X$( diff $1 $2 )" = X ] ; then
+        IGCM_debug_Print 2 "$1 and $2 are the same file, we skip the copy"
+        status=0
+        skip=true
+      else
+        IGCM_debug_Print 2 "$1 and $2 are not the same file, we force the copy"
+        skip=false
       fi
     fi
     #
-    # USUAL WAY
-    \cp $1 $2 > out_rsync 2>&1
-    status=$?
+    if ( [ X${exist} = Xtrue ] && [ X${skip} = Xfalse ] ) ; then
+      IGCM_sys_Chmod u+w $2
+    fi
+
+    if [ X${skip} = Xfalse ] ; then
+      i=0
+      while [ $i -lt $NB_ESSAI ] ; do
+        # USUAL WAY
+        \cp $1 $2 > out_rsync 2>&1
+        status=$?
+        if [ ${status} -gt 0 ]; then
+          IGCM_debug_Print 2 "IGCM_sys_PutBuffer_Out : cp failed error code ${status} ${i}/${NB_ESSAI}"
+          IGCM_debug_Print 2 "IGCM_sys_PutBuffer_Out : sleep ${DELAI} seconds and try again."
+          [ -f ${2} ] && ls -l ${2}
+          [ -f ${2}/${1} ] && ls -l ${2}/${1}
+          sleep $DELAI
+        else
+          break
+        fi
+        (( i = i + 1 ))
+      done
+    fi
 
     if [ ${status} -gt 0 ] ; then
       echo "IGCM_sys_PutBuffer_Out : error."
+      [ -f ${2} ] && ls -l ${2}
+      [ -f ${2}/${1} ] && ls -l ${2}/${1}
       cat out_rsync
       IGCM_debug_Exit "IGCM_sys_PutBuffer_Out"
     else
+
+      if [ X${JobType} = XRUN ] ; then
+        if [ X${3} = X ] ; then
+          [ -f ${2} ] && IGCM_sys_Chmod 444 ${2}
+          [ -f ${2}/${1} ] && IGCM_sys_Chmod 444 ${2}/${1}
+        fi
+      fi
+
       \rm out_rsync
     fi
@@ -1158,5 +1255,5 @@
   IGCM_debug_PushStack "IGCM_sys_Get" $@
 
-  typeset DEST RET status dm_liste ifile target
+  typeset DEST status dm_liste
 
   if ( $DEBUG_sys ) ; then
@@ -1178,25 +1275,14 @@
       echo "IGCM_sys_Get, ERROR : regular file ${dm_liste[0]} DOES NOT EXIST ."
       IGCM_debug_Exit "IGCM_sys_Get"
-      #return
-    fi
-
-    (( RET=0 ))
-    for target in ${dm_liste[*]} ; do
-      \cp ${target} ${DEST} >> out_rsync 2>&1
-      (( RET=RET+$? ))
-    done
-
-#       echo ${RSYNC} ${RSYNC_opt} $@ > out_rsync 2>&1
-#       ${RSYNC} ${RSYNC_opt} $@ >> out_rsync 2>&1
-#       status=$?
-#       IGCM_sys_Rsync_out $status
-
-#       ${libIGCM}/libIGCM_sys/IGCM_analyse_rsync_out.awk out_rsync
-#       (( RET=RET+$? ))
-
-    if [ ${RET} -gt 0 ] ; then
-      echo "IGCM_sys_Get : error"
+      return
+    fi
+
+    #USUAL WAY
+    \cp ${dm_liste[*]} ${DEST} > out_rsync 2>&1
+    status=$?
+
+    if [ ${status} -gt 0 ] ; then
+      IGCM_debug_Print 2 "IGCM_sys_Get : cp failed error code ${status}"
       cat out_rsync
-      \rm out_rsync
       IGCM_debug_Exit "IGCM_sys_Get"
     else
@@ -1217,9 +1303,16 @@
   IGCM_debug_PushStack "IGCM_sys_GetBuffer" $@
 
-  typeset DEST RET status buf_liste ifile target file_work
+  typeset DEST buf_liste target file_work
+  typeset NB_ESSAI DELAI status i
 
   if ( $DEBUG_sys ) ; then
     echo "IGCM_sys_GetBuffer :" $@
   fi
+
+  # number of tentative
+  NB_ESSAI=3
+  # time delay between tentative
+  DELAI=2
+
   if [ $DRYRUN -le 2 ]; then
     if [ X${1} = X'/l' ] ; then
@@ -1233,22 +1326,50 @@
     #USUAL WAY
     if [ X${1} = X'/l' ] ; then
-      (( RET=0 ))
       for target in ${buf_liste[*]} ; do
         local_file=$( basename ${target} )
-        \cp ${target} ${DEST}/${local_file} >> out_rsync 2>&1
-        (( RET = RET + $? ))
+        i=0
+        while [ $i -lt $NB_ESSAI ] ; do
+          \cp ${target} ${DEST}/${local_file} >> out_rsync 2>&1
+          status=$?
+          if [ ${status} -gt 0 ]; then
+            IGCM_debug_Print 2 "IGCM_sys_GetBuffer : cp failed error code ${status} ${i}/${NB_ESSAI}"
+            IGCM_debug_Print 2 "IGCM_sys_GetBuffer : sleep ${DELAI} seconds and try again."
+            sleep $DELAI
+          else
+            break
+          fi
+          (( i = i + 1 ))
+        done
+        if [ ${status} -gt 0 ] ; then
+          echo "IGCM_sys_Get : error"
+          cat out_rsync
+          \rm out_rsync
+          IGCM_debug_Exit "IGCM_sys_GetBuffer"
+        else
+          \rm out_rsync
+        fi
       done
     else
-      \cp ${buf_liste} ${DEST} >> out_rsync 2>&1
-      status=$?
-    fi
-
-    if [ ${RET} -gt 0 ] ; then
-      echo "IGCM_sys_GetBuffer : error"
-      cat out_rsync
-      \rm out_rsync
-      IGCM_debug_Exit "IGCM_sys_GetBuffer"
-    else
-      \rm out_rsync
+      i=0
+      while [ $i -lt $NB_ESSAI ] ; do
+        \cp ${buf_liste} ${DEST} >> out_rsync 2>&1
+        status=$?
+        if [ ${status} -gt 0 ]; then
+          IGCM_debug_Print 2 "IGCM_sys_GetBuffer : cp failed error code ${status} ${i}/${NB_ESSAI}"
+          IGCM_debug_Print 2 "IGCM_sys_GetBuffer : sleep ${DELAI} seconds and try again."
+          sleep $DELAI
+        else
+          break
+        fi
+        (( i = i + 1 ))
+      done
+      if [ ${status} -gt 0 ] ; then
+        echo "IGCM_sys_Get : error"
+        cat out_rsync
+        \rm out_rsync
+        IGCM_debug_Exit "IGCM_sys_GetBuffer"
+      else
+        \rm out_rsync
+      fi
     fi
   else
@@ -1319,5 +1440,5 @@
 #D-#==================================================
 #D-function IGCM_sys_Put_Dods
-#D-* Purpose: Put $(ARCHIVE) files on DODS internet protocole.
+#D-* Purpose: Put ${ARCHIVE} files on DODS internet protocole. Dummy function here
 #D-* Examples:
 #D-
@@ -1333,4 +1454,9 @@
 # REBUILD OPERATOR
 
+#D-#==================================================
+#D-function IGCM_sys_rebuild
+#D-* Purpose: rebuild parallel files
+#D-* Examples:
+#D-
 function IGCM_sys_rebuild {
   IGCM_debug_PushStack "IGCM_sys_rebuild" -- $@
@@ -1339,10 +1465,31 @@
   fi
 
-  typeset status
-
-  /home/users/igcmg/rebuild/bin/rebuild -f -o $@
-  status=$?
+  typeset NB_ESSAI DELAI status i firstArg
+  # number of tentative
+  NB_ESSAI=3
+  # time delay between tentative
+  DELAI=2
+
+  i=0
+  while [ $i -lt $NB_ESSAI ] ; do
+    /home/users/igcmg/rebuild/bin/rebuild -f -o $@ > out_rsync 2>&1
+    status=$?
+    if [ ${status} -gt 0 ] ; then
+      IGCM_debug_Print 2 "IGCM_sys_rebuild : error code ${status}"
+      cat out_rsync
+      \rm out_rsync
+      IGCM_debug_Print 2 "IGCM_sys_rebuild : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again."
+      firstArg=${1}
+      \rm ${firstArg}
+      sleep $DELAI
+    else
+      \rm out_rsync
+      break
+    fi
+    (( i = i + 1 ))
+  done
+
   if [ ${status} -gt 0 ] ; then
-    IGCM_debug_Print 2 "IGCM_sys_rebuild : error code ${status}"
+    echo "IGCM_sys_rebuild : rebuild error code is ${status}"
     IGCM_debug_Exit "rebuild"
   fi
@@ -1351,4 +1498,9 @@
 }
 
+#D-#==================================================
+#D-function IGCM_sys_rebuild_station
+#D-* Purpose: rebuild parallel files describing station 
+#D-* Examples:
+#D-
 function IGCM_sys_rebuild_station {
   IGCM_debug_PushStack "IGCM_sys_rebuild_station" -- $@
@@ -1445,4 +1597,9 @@
 # Activate Running Environnment Variables
 
+#D-#==================================================
+#D-function IGCM_sys_desactiv_variables
+#D-* Purpose: set environement variables prior to execution
+#D-* Examples:
+#D-
 function IGCM_sys_activ_variables {
   IGCM_debug_PushStack "IGCM_sys_activ_variables"
@@ -1450,4 +1607,13 @@
     echo "IGCM_sys_activ_variables"
   fi
+
+# --------------------------------------------------------------------
+#D- MPI specifications
+# --------------------------------------------------------------------
+
+# --------------------------------------------------------------------
+#D- Other specifications
+# --------------------------------------------------------------------
+
   IGCM_debug_PopStack "IGCM_sys_activ_variables"
 }
@@ -1456,4 +1622,9 @@
 # Desactivate Running Environnment Variables
 
+#D-#==================================================
+#D-function IGCM_sys_desactiv_variables
+#D-* Purpose: unset environement variables after execution
+#D-* Examples:
+#D-
 function IGCM_sys_desactiv_variables {
   IGCM_debug_PushStack "IGCM_sys_desactiv_variables"
@@ -1461,4 +1632,12 @@
     echo "IGCM_sys_desactiv_variables"
   fi
+# --------------------------------------------------------------------
+#D- MPI specifications
+# --------------------------------------------------------------------
+
+# --------------------------------------------------------------------
+#D- Other specifications
+# --------------------------------------------------------------------
+
   IGCM_debug_PopStack "IGCM_sys_desactiv_variables"
 }
@@ -1467,4 +1646,9 @@
 # Build MPI/OMP scripts run file (dummy function)
 
+#D-#==================================================
+#D-function IGCM_sys_build_run_file
+#D-* Purpose: build run file (deprecated)
+#D-* Examples:
+#D-
 function IGCM_sys_build_run_file {
 
@@ -1475,4 +1659,10 @@
 ############################################################
 # Build MPI/OMP scripts
+
+#D-#==================================================
+#D-function IGCM_sys_build_execution_scripts
+#D-* Purpose: build execution scripts to be launch by ${HOST_MPIRUN_COMMAND}
+#D-* Examples:
+#D-
 function IGCM_sys_build_execution_scripts
 {
@@ -1486,5 +1676,5 @@
 
   if [ ! -f ${SUBMIT_DIR}/Job_${config_UserChoices_JobName} ]  ; then
-    IGCM_debug_Exit "IGCM_sys_titane build_execution_scripts : Job_${config_UserChoices_JobName} doesn't exist in SUBMIT_DIR : ${SUBMIT_DIR} "
+    IGCM_debug_Exit "IGCM_sys_obelix build_execution_scripts : Job_${config_UserChoices_JobName} don't exist in SUBMIT_DIR : ${SUBMIT_DIR} "
   fi
 
@@ -1675,5 +1865,5 @@
       done
 
-        # Then second loop on the components
+      # Then second loop on the components
 
       for comp in ${config_ListOfComponents[*]} ; do
@@ -1727,6 +1917,6 @@
   fi
 
-  IGCM_debug_Print 1 "sys Obelix : La commande d execution est "
-  IGCM_debug_Print 1 $EXECUTION
+  IGCM_debug_Print 1 "sys Obelix : execution command is"
+  IGCM_debug_Print 1 "$EXECUTION"
 
   IGCM_debug_PopStack "IGCM_sys_build_execution_scripts"
@@ -1734,5 +1924,11 @@
 
 ############################################################
-# Check of space available on temporary filesytems
+# Check of space available on temporary filesytems. Dummy function here
+
+#D-#==================================================
+#D-function IGCM_sys_check_quota. Dummy call here
+#D-* Purpose: check user quota. Stop the simulation if quota above 90%
+#D-* Examples:
+#D-
 function IGCM_sys_check_quota {
   IGCM_debug_PushStack "IGCM_sys_check_quota"
@@ -1743,7 +1939,26 @@
 }
 
+#D-#==================================================
+#D-function IGCM_sys_CountJobInQueue
+#D-* Purpose: Check if job_name is currently
+#D-  running or in queue
+#D-* Examples: IGCM_sys_CountJobInQueue ${JobName} NbRun
+#D-
+function IGCM_sys_CountJobInQueue {
+  IGCM_debug_PushStack "IGCM_sys_CountJobInQueue"
+  if ( $DEBUG_sys ) ; then
+    echo "IGCM_sys_CountJobInQueue"
+  fi
+  IGCM_debug_PopStack "IGCM_sys_CountJobInQueue"
+}
+
 ##############################################################
 # NCO OPERATOR
 
+#D-#==================================================
+#D-function IGCM_sys_ncap2
+#D-* Purpose: encapsulate ncap2 call so as to manage error code and retry
+#D-* Examples:
+#D-
 function IGCM_sys_ncap2 {
   IGCM_debug_PushStack "IGCM_sys_ncap2" -- $@
@@ -1776,6 +1991,6 @@
 
   if [ ${status} -gt 0 ] ; then
-      echo "IGCM_sys_ncap2 : ncap2 error"
-      IGCM_debug_Exit "ncap2"
+    echo "IGCM_sys_ncap2 : ncap2 error"
+    IGCM_debug_Exit "ncap2"
   fi
 
@@ -1783,4 +1998,9 @@
 }
 
+#D-#==================================================
+#D-function IGCM_sys_ncatted
+#D-* Purpose: encapsulate ncatted call so as to manage error code and retry
+#D-* Examples:
+#D-
 function IGCM_sys_ncatted {
   IGCM_debug_PushStack "IGCM_sys_ncatted" -- $@
@@ -1813,6 +2033,6 @@
 
   if [ ${status} -gt 0 ] ; then
-      echo "IGCM_sys_ncatted : ncatted error"
-      IGCM_debug_Exit "ncatted"
+    echo "IGCM_sys_ncatted : ncatted error"
+    IGCM_debug_Exit "ncatted"
   fi
 
@@ -1820,4 +2040,9 @@
 }
 
+#D-#==================================================
+#D-function IGCM_sys_ncbo
+#D-* Purpose: encapsulate ncbo call so as to manage error code and retry
+#D-* Examples:
+#D-
 function IGCM_sys_ncbo {
   IGCM_debug_PushStack "IGCM_sys_ncbo" -- $@
@@ -1850,6 +2075,6 @@
 
   if [ ${status} -gt 0 ] ; then
-      echo "IGCM_sys_ncbo : ncbo error"
-      IGCM_debug_Exit "ncbo"
+    echo "IGCM_sys_ncbo : ncbo error"
+    IGCM_debug_Exit "ncbo"
   fi
 
@@ -1857,4 +2082,9 @@
 }
 
+#D-#==================================================
+#D-function IGCM_sys_ncdif
+#D-* Purpose: encapsulate ncdiff call so as to manage error code and retry
+#D-* Examples:
+#D-
 function IGCM_sys_ncdiff {
   IGCM_debug_PushStack "IGCM_sys_ncdiff" -- $@
@@ -1887,6 +2117,6 @@
 
   if [ ${status} -gt 0 ] ; then
-      echo "IGCM_sys_ncdiff : ncdiff error"
-      IGCM_debug_Exit "ncdiff"
+    echo "IGCM_sys_ncdiff : ncdiff error"
+    IGCM_debug_Exit "ncdiff"
   fi
 
@@ -1894,4 +2124,9 @@
 }
 
+#D-#==================================================
+#D-function IGCM_sys_ncea
+#D-* Purpose: encapsulate ncea call so as to manage error code and retry
+#D-* Examples:
+#D-
 function IGCM_sys_ncea {
   IGCM_debug_PushStack "IGCM_sys_ncea" -- $@
@@ -1924,6 +2159,6 @@
 
   if [ ${status} -gt 0 ] ; then
-      echo "IGCM_sys_ncea : ncea error"
-      IGCM_debug_Exit "ncea"
+    echo "IGCM_sys_ncea : ncea error"
+    IGCM_debug_Exit "ncea"
   fi
 
@@ -1931,4 +2166,9 @@
 }
 
+#D-#==================================================
+#D-function IGCM_sys_ncecat
+#D-* Purpose: encapsulate ncecat call so as to manage error code and retry
+#D-* Examples:
+#D-
 function IGCM_sys_ncecat {
   IGCM_debug_PushStack "IGCM_sys_ncecat" -- $@
@@ -1961,6 +2201,6 @@
 
   if [ ${status} -gt 0 ] ; then
-      echo "IGCM_sys_ncecat : ncecat error"
-      IGCM_debug_Exit "ncecat"
+    echo "IGCM_sys_ncecat : ncecat error"
+    IGCM_debug_Exit "ncecat"
   fi
 
@@ -1968,4 +2208,9 @@
 }
 
+#D-#==================================================
+#D-function IGCM_sys_ncflint
+#D-* Purpose: encapsulate ncflint call so as to manage error code and retry
+#D-* Examples:
+#D-
 function IGCM_sys_ncflint {
   IGCM_debug_PushStack "IGCM_sys_ncflint" -- $@
@@ -1998,6 +2243,6 @@
 
   if [ ${status} -gt 0 ] ; then
-      echo "IGCM_sys_ncflint : ncflint error"
-      IGCM_debug_Exit "ncflint"
+    echo "IGCM_sys_ncflint : ncflint error"
+    IGCM_debug_Exit "ncflint"
   fi
 
@@ -2005,4 +2250,9 @@
 }
 
+#D-#==================================================
+#D-function IGCM_sys_ncks
+#D-* Purpose: encapsulate ncks call so as to manage error code and retry
+#D-* Examples:
+#D-
 function IGCM_sys_ncks {
   IGCM_debug_PushStack "IGCM_sys_ncks" -- $@
@@ -2035,6 +2285,6 @@
 
   if [ ${status} -gt 0 ] ; then
-      echo "IGCM_sys_ncks : ncks error"
-      IGCM_debug_Exit "ncks"
+    echo "IGCM_sys_ncks : ncks error"
+    IGCM_debug_Exit "ncks"
   fi
 
@@ -2042,4 +2292,9 @@
 }
 
+#D-#==================================================
+#D-function IGCM_sys_ncpdq
+#D-* Purpose: encapsulate ncpdq call so as to manage error code and retry
+#D-* Examples:
+#D-
 function IGCM_sys_ncpdq {
   IGCM_debug_PushStack "IGCM_sys_ncpdq" -- $@
@@ -2072,6 +2327,6 @@
 
   if [ ${status} -gt 0 ] ; then
-      echo "IGCM_sys_ncpdq : ncpdq error"
-      IGCM_debug_Exit "ncpdq"
+    echo "IGCM_sys_ncpdq : ncpdq error"
+    IGCM_debug_Exit "ncpdq"
   fi
 
@@ -2079,4 +2334,9 @@
 }
 
+#D-#==================================================
+#D-function IGCM_sys_ncra
+#D-* Purpose: encapsulate ncra call so as to manage error code and retry
+#D-* Examples:
+#D-
 function IGCM_sys_ncra {
   IGCM_debug_PushStack "IGCM_sys_ncra" -- $@
@@ -2109,6 +2369,6 @@
 
   if [ ${status} -gt 0 ] ; then
-      echo "IGCM_sys_ncra : ncra error"
-      IGCM_debug_Exit "ncra"
+    echo "IGCM_sys_ncra : ncra error"
+    IGCM_debug_Exit "ncra"
   fi
 
@@ -2116,4 +2376,9 @@
 }
 
+#D-#==================================================
+#D-function IGCM_sys_ncrcat
+#D-* Purpose: encapsulate ncrcat call so as to manage error code and retry
+#D-* Examples:
+#D-
 function IGCM_sys_ncrcat {
   IGCM_debug_PushStack "IGCM_sys_ncrcat" -- $@
@@ -2122,5 +2387,5 @@
   fi
 
-  typeset NB_ESSAI DELAI status i
+  typeset NB_ESSAI DELAI status i lastArg
   # number of tentative
   NB_ESSAI=3
@@ -2138,4 +2403,14 @@
       IGCM_debug_Print 2 "IGCM_sys_ncrcat : ${i}/${NB_ESSAI} sleep ${DELAI} seconds and try again."
       sleep $DELAI
+    elif [ ! "X$( grep "WARNING Intra-file non-monotonicity" out_rsync )" = "X" ] ; then
+      IGCM_debug_Print 2 "IGCM_sys_ncrcat : WARNING Intra-file non-monotonicity"
+      cat out_rsync
+      # remove files having corrupted time axis
+      eval lastArg=\${$#}
+      IGCM_debug_Print 2 "IGCM_sys_ncrcat : Delete ${lastArg}"
+      \rm ${lastArg}
+      \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
@@ -2146,6 +2421,6 @@
 
   if [ ${status} -gt 0 ] ; then
-      echo "IGCM_sys_ncrcat : ncrcat error"
-      #IGCM_debug_Exit "ncrcat"
+    echo "IGCM_sys_ncrcat : ncrcat error"
+    #IGCM_debug_Exit "ncrcat"
   fi
 
@@ -2153,4 +2428,9 @@
 }
 
+#D-#==================================================
+#D-function IGCM_sys_ncrename
+#D-* Purpose: encapsulate ncrename call so as to manage error code and retry
+#D-* Examples:
+#D-
 function IGCM_sys_ncrename {
   IGCM_debug_PushStack "IGCM_sys_ncrename" -- $@
@@ -2183,6 +2463,6 @@
 
   if [ ${status} -gt 0 ] ; then
-      echo "IGCM_sys_ncrename : ncrename error"
-      IGCM_debug_Exit "ncrename"
+    echo "IGCM_sys_ncrename : ncrename error"
+    IGCM_debug_Exit "ncrename"
   fi
 
@@ -2190,4 +2470,9 @@
 }
 
+#D-#==================================================
+#D-function IGCM_sys_ncwa
+#D-* Purpose: encapsulate ncwa call so as to manage error code and retry
+#D-* Examples:
+#D-
 function IGCM_sys_ncwa {
   IGCM_debug_PushStack "IGCM_sys_ncwa" -- $@
@@ -2220,6 +2505,6 @@
 
   if [ ${status} -gt 0 ] ; then
-      echo "IGCM_sys_ncwa : ncwa error"
-      IGCM_debug_Exit "ncwa"
+    echo "IGCM_sys_ncwa : ncwa error"
+    IGCM_debug_Exit "ncwa"
   fi
 
@@ -2230,4 +2515,9 @@
 # CDO OPERATOR
 
+#D-#==================================================
+#D-function IGCM_sys_cdo
+#D-* Purpose: encapsulate cdo call so as to manage error code and retry
+#D-* Examples:
+#D-
 function IGCM_sys_cdo {
   IGCM_debug_PushStack "IGCM_sys_cdo" -- $@
