Index: trunk/libIGCM/libIGCM_comp/libIGCM_comp.ksh
===================================================================
--- trunk/libIGCM/libIGCM_comp/libIGCM_comp.ksh	(revision 893)
+++ trunk/libIGCM/libIGCM_comp/libIGCM_comp.ksh	(revision 897)
@@ -709,5 +709,5 @@
 
             if [ $( IGCM_sys_TestFileBuffer ${Path_OUT}*.${extension_in} ; echo $? ) = 0 ] ; then
-              IGCM_debug_Print 3 "Buffered restart"
+              IGCM_debug_Print 3 "Buffered restart ${Path_OUT}*.${extension_in} "
               Buffered=true
               Archived=false
@@ -715,5 +715,5 @@
               nb_restart_file=$(IGCM_sys_CountFileBuffer ${Path_OUT}_????.${extension_in})
             elif [ $( IGCM_sys_TestFileArchive ${Path_OUT}*.${extension_in} ; echo $? ) = 0 ] ; then
-              IGCM_debug_Print 3 "Archived restart"
+              IGCM_debug_Print 3 "Archived restart ${Path_OUT}*.${extension_in}"
               Buffered=false
               Archived=true
@@ -721,5 +721,7 @@
               nb_restart_file=$(IGCM_sys_CountFileArchive ${Path_OUT}_????.${extension_in})
             else
-              IGCM_debug_Print 3 "Tared restart"
+              IGCM_debug_Print 3 "No restart file in the buffer nor in the archive directory"
+              IGCM_debug_Print 3 "${Path_OUT}*.${extension_in} do not exist"
+              IGCM_debug_Print 3 "Tared restart case then"
               Buffered=false
               Archived=false
@@ -727,16 +729,23 @@
               # Look after the tar file we want if we did not found it already
               if [ X${IsMatching} = X ] ; then
-                for PotentialTarFile in $( IGCM_sys_RshArchive "find ${RestartPath}/${RestartJobName}/RESTART -name "${RestartJobName}_*restart*.tar" -print" ) ; do
-                  IsMatching=$( echo ${PotentialTarFile##*/} | \
-                        sed "s:_restart::" | \
-                        sed "s:^${RestartJobName}_::" | \
-                        sed "s:\.tar$::" | \
-                        gawk -F_ -v restartdate=${Date_r} \
-                             '{if (($1 <= restartdate) && ($2 >= restartdate)) {print $1"_"$2}}' )
-                  if [ ! X${IsMatching} = X ] ; then
-                    TarFileFound=${PotentialTarFile}
-                    break
-                  fi
-                done
+                if [ -d ${RestartPath}/${RestartJobName}/RESTART ] ; then
+                  for PotentialTarFile in $( IGCM_sys_RshArchive "find ${RestartPath}/${RestartJobName}/RESTART -name "${RestartJobName}_*restart*.tar" -print" ) ; do
+                    IsMatching=$( echo ${PotentialTarFile##*/} | \
+                      sed "s:_restart::" | \
+                      sed "s:^${RestartJobName}_::" | \
+                      sed "s:\.tar$::" | \
+                      gawk -F_ -v restartdate=${Date_r} \
+                      '{if (($1 <= restartdate) && ($2 >= restartdate)) {print $1"_"$2}}' )
+                    if [ ! X${IsMatching} = X ] ; then
+                      TarFileFound=${PotentialTarFile}
+                      break
+                    fi
+                  done
+                else
+                  IGCM_debug_Print 3 "${RestartPath}/${RestartJobName}/RESTART do not currently exist"
+                  IGCM_debug_Print 3 "It must exist and contain tared restart files"
+                  IGCM_debug_Exit "Please double check restart settings in config.card"
+                  IGCM_debug_Verif_Exit
+                fi
               fi
               TarFileLocation=$( IGCM_sys_PrepareTaredRestart ${TarFileFound} )
@@ -815,5 +824,5 @@
 
           if [ $( IGCM_sys_TestFileBuffer ${Path_BUF}*.${extension_in} ; echo $? ) = 0 ] ; then
-            IGCM_debug_Print 3 "Buffered restart"
+            IGCM_debug_Print 3 "Buffered restart ${Path_BUF}*.${extension_in}"
             Buffered=true
             Archived=false
@@ -821,5 +830,5 @@
             nb_restart_file=$(IGCM_sys_CountFileBuffer ${Path_BUF}_????.${extension_in})
           elif [ $( IGCM_sys_TestFileArchive ${Path_OUT}*.${extension_in} ; echo $? ) = 0 ] ; then
-            IGCM_debug_Print 3 "Archived restart"
+            IGCM_debug_Print 3 "Archived restart ${Path_OUT}*.${extension_in}"
             Buffered=false
             Archived=true
@@ -827,5 +836,6 @@
             nb_restart_file=$(IGCM_sys_CountFileArchive ${Path_OUT}_????.${extension_in})
           else
-            IGCM_debug_Print 3 "Tared restart"
+            IGCM_debug_Print 3 "No restart file in the buffer nor in the archive directory"
+            IGCM_debug_Print 3 "Tared restart case then"
             Buffered=false
             Archived=false
