Index: trunk/libIGCM/AA_TimeSeries_Checker
===================================================================
--- trunk/libIGCM/AA_TimeSeries_Checker	(revision 797)
+++ trunk/libIGCM/AA_TimeSeries_Checker	(revision 798)
@@ -275,6 +275,7 @@
                 TestedFile=${config_UserChoices_JobName}_${ChunckDebut}_${ChunckFin}_${FlagDir}_${var}.nc
                 #
-                if [ -d ${DIRECTORY} ] ; then
-                  Candidat=$( find ${DIRECTORY} -name "${config_UserChoices_JobName}_${ChunckDebut}_*_${FlagDir}_${var}.nc" )
+                IGCM_sys_TestDirArchive ${DIRECTORY}
+                if [ $? = 0 ] ; then
+                  Candidat=$( IGCM_sys_RshArchive "find ${DIRECTORY} -name "${config_UserChoices_JobName}_${ChunckDebut}_*_${FlagDir}_${var}.nc"" )
                 else
                   Candidat=""
Index: trunk/libIGCM/libIGCM_sys/libIGCM_sys_ada.ksh
===================================================================
--- trunk/libIGCM/libIGCM_sys/libIGCM_sys_ada.ksh	(revision 797)
+++ trunk/libIGCM/libIGCM_sys/libIGCM_sys_ada.ksh	(revision 798)
@@ -226,9 +226,18 @@
 function IGCM_sys_RshArchive {
   IGCM_debug_PushStack "IGCM_sys_RshArchive" $@
-  rsh ${STOREHOST} exec /bin/ksh <<-EOF
+  DEBUG_sys=false IGCM_sys_IsFileArchived "$@"
+  if [ $? = 0 ] ; then
+    rsh ${STOREHOST} exec /bin/ksh <<-EOF
     ${@}
 EOF
-  if [ $? -gt 0 ] ; then
-    echo "IGCM_sys_RshArchive : erreur."
+    status=$?
+  else
+    /bin/ksh <<-EOF
+    ${@}
+EOF
+    status=$?
+  fi
+  if [ ${status} -gt 0 ] ; then
+    IGCM_debug_Print 2 "IGCM_sys_RshArchive : rsh or command failed error code ${status}"
     IGCM_debug_Exit "IGCM_sys_RshArchive"
   fi
@@ -344,5 +353,5 @@
   fi
   #- creation de repertoire sur le serveur fichier
-  IGCM_sys_IsFileArchived $1
+  DEBUG_sys=false IGCM_sys_IsFileArchived $1
   if [ $? = 0 ] ; then
     rsh ${STOREHOST} -n mkdir -p $1
@@ -468,5 +477,5 @@
   typeset ExistFlag
   #Command depends on targeted file system
-  IGCM_sys_IsFileArchived $1
+  DEBUG_sys=false IGCM_sys_IsFileArchived $1
   if [ $? = 0 ] ; then
     ExistFlag=$( IGCM_sys_RshArchive "[ -d $1 ] && echo 0 || echo 1" )
@@ -489,5 +498,5 @@
   fi
   typeset IsArchivedFlag
-  IsArchivedFlag=$( [ X$( echo $1 | grep ^\/u\/rech ) != X ] && echo 0 || echo 1 )
+  IsArchivedFlag=$( [ "X$( echo $1 | grep \/u\/rech )" != "X" ] && echo 0 || echo 1 )
   IGCM_debug_PopStack "IGCM_sys_IsFileArchived"
 
@@ -504,5 +513,6 @@
   typeset ExistFlag
   #Command depends on targeted file system
-  IGCM_sys_IsFileArchived $1
+  #We want it quiet
+  DEBUG_sys=false IGCM_sys_IsFileArchived $1
   if [ $? = 0 ] ; then
     ExistFlag=$( IGCM_sys_RshArchive "[ -f $1 ] && echo 0 || echo 1" )
@@ -537,5 +547,5 @@
   IGCM_debug_PushStack "IGCM_sys_CountFileArchive" $@
   #Command depends on targeted file system
-  IGCM_sys_IsFileArchived $1
+  DEBUG_sys=false IGCM_sys_IsFileArchived $1
   if [ $? = 0 ] ; then
     IGCM_sys_RshArchive "ls ${@} 2>/dev/null | wc -l"
@@ -947,5 +957,5 @@
     #
     #Command depends on targeted file system
-    IGCM_sys_IsFileArchived $2
+    DEBUG_sys=false IGCM_sys_IsFileArchived $2
     if [ $? = 0 ] ; then
       \rcp -r $1 ${STOREHOST}:$2 > out_rsync 2>&1
@@ -996,5 +1006,5 @@
     #
     # Command depends on targeted filesystem
-    IGCM_sys_IsFileArchived $1
+    DEBUG_sys=false IGCM_sys_IsFileArchived $1
     if [ $? = 0 ] ; then
       # add dmget (to demigrate all offline files) to reduce time of this command :
@@ -1118,5 +1128,5 @@
     #
     #Command depends on targeted file system
-    IGCM_sys_IsFileArchived $2
+    DEBUG_sys=false IGCM_sys_IsFileArchived $2
     if [ $? = 0 ] ; then
       mfput $1 $2 > out_rsync 2>&1
@@ -1228,5 +1238,5 @@
     #
     #Command depends on targeted file system
-    IGCM_sys_IsFileArchived $2
+    DEBUG_sys=false IGCM_sys_IsFileArchived $2
     if [ $? = 0 ] ; then
       mfput $1 $2 > out_rsync 2>&1
@@ -1380,10 +1390,10 @@
 
     # test if the (first) file is present in the old computation :
-    IGCM_sys_IsFileArchived ${dm_liste[0]}
+    DEBUG_sys=false IGCM_sys_IsFileArchived ${dm_liste[0]}
     if [ $? = 0 ] ; then
       IGCM_sys_TestFileArchive ${dm_liste[0]}
       status=$?
     else
-      IGCM_sys_TestFile ${dm_liste[0]}
+      IGCM_sys_TestFileBuffer ${dm_liste[0]}
       status=$?
     fi
@@ -1396,5 +1406,5 @@
 
     #Command depends on targeted file system
-    IGCM_sys_IsFileArchived ${dm_liste[0]}
+    DEBUG_sys=false IGCM_sys_IsFileArchived ${dm_liste[0]}
     if [ $? = 0 ] ; then
       mfget ${dm_liste[*]} ${DEST} > out_rsync 2>&1
