Index: /trunk/libIGCM/AA_pack_debug
===================================================================
--- /trunk/libIGCM/AA_pack_debug	(revision 616)
+++ /trunk/libIGCM/AA_pack_debug	(revision 617)
@@ -295,5 +295,5 @@
 
 # List renamed debug files. Exclude Job_xxx files.
-find ${RUN_DIR} -name "???_*${JobName}*" -ls | grep -v Job_ | sort -k 11 > ${RUN_DIR}/new_liste_debug_files.txt
+find ${RUN_DIR} -maxdepth 1 -mindepth 1 -name "???_*${JobName}*" -ls | sort -k 11 > ${RUN_DIR}/new_liste_debug_files.txt
 
 # ------------------------------------------------------------------
@@ -322,6 +322,6 @@
 #   echo pack nÂ°${number_pack}  ${date_file} ${date_begin_pack} ${date_end_pack}
     if [ ${date_file} -le ${date_end_pack} ] && [ ${date_file} -ge ${date_begin_pack} ] ; then
-        echo $( basename ${file} ) >> ${RUN_DIR}/liste_pack_${number_pack}.txt
-        echo $( readlink ${file} ) >> ${RUN_DIR}/liste_remove_pack_${number_pack}.txt
+        echo $( basename ${file} ) >> ${RUN_DIR}/liste_pack_${date_begin_pack}_${date_end_pack}.txt
+        echo $( readlink ${file} ) >> ${RUN_DIR}/liste_remove_pack_${date_begin_pack}_${date_end_pack}.txt
 #    Will not work. Need to find a better ordering.
 #    elif [ ${date_file} -ge ${date_end_pack} ] ; then
@@ -332,5 +332,5 @@
   # Create tar files
   IGCM_debug_Print 1 "Tar ongoing"
-  tar -cvf ${JobName}_${date_begin_pack}_${date_end_pack}_debug.tar --dereference --files-from ${RUN_DIR}/liste_pack_${number_pack}.txt
+  tar -cvf ${JobName}_${date_begin_pack}_${date_end_pack}_debug.tar --dereference --files-from ${RUN_DIR}/liste_pack_${date_begin_pack}_${date_end_pack}.txt
   # Save it
   IGCM_sys_Put_Out ${JobName}_${date_begin_pack}_${date_end_pack}_debug.tar ${STORE_DEBUG}
@@ -338,9 +338,9 @@
   IGCM_sys_Rm ${JobName}_${date_begin_pack}_${date_end_pack}_debug.tar
   # Clean links
-  cat ${RUN_DIR}/liste_pack_${number_pack}.txt | xargs rm
+  cat ${RUN_DIR}/liste_pack_${date_begin_pack}_${date_end_pack}.txt | xargs rm
   # Clean files links pointed to
-  cat ${RUN_DIR}/liste_remove_pack_${number_pack}.txt | xargs rm
+  cat ${RUN_DIR}/liste_remove_pack_${date_begin_pack}_${date_end_pack}.txt | xargs rm
   # Save the list of files that has been pack (tar)
-  mv ${RUN_DIR}/liste_pack_${number_pack}.txt ${STORE_DEBUG}
+  mv ${RUN_DIR}/liste_pack_${date_begin_pack}_${date_end_pack}.txt ${STORE_DEBUG}
   IGCM_debug_Print 1 "Tar and cleaning done"
 
Index: /trunk/libIGCM/AA_pack_output
===================================================================
--- /trunk/libIGCM/AA_pack_output	(revision 616)
+++ /trunk/libIGCM/AA_pack_output	(revision 617)
@@ -287,16 +287,16 @@
           # echo pack nÂ°${number_pack}  ${date_file} ${date_begin_pack} ${date_end_pack}
           if [ ${date_file} -le ${date_end_pack} ] && [ ${date_file} -ge ${date_begin_pack} ] ; then
-            echo ${file} >> liste_pack_${myType}_${number_pack}.txt
-            ncdump -h ${file} | grep -E 'float|double' | cut -f 1 -d '(' | cut -f 2 -d ' ' >> liste_variables_${myType}_${number_pack}.txt
+            echo ${file} >> liste_pack_${myType}_${date_begin_pack}_${date_end_pack}.txt
+            ncdump -h ${file} | grep -E 'float|double' | cut -f 1 -d '(' | cut -f 2 -d ' ' >> liste_variables_${myType}_${date_begin_pack}_${date_end_pack}.txt
             (( nbfile = nbfile + 1 ))
           fi
         done
         # Select list of variables to work with
-        list_var=$( cat liste_variables_${myType}_${number_pack}.txt | sort | uniq -c | awk -v nbfile=$nbfile '{if ($1 != nbfile) {print $2}}' | paste -s -d ',' )
-        liste_file_tmp=$( for i in $( cat liste_pack_${myType}_${number_pack}.txt ) ; do basename $i ; done )
+        list_var=$( cat liste_variables_${myType}_${date_begin_pack}_${date_end_pack}.txt | sort | uniq -c | awk -v nbfile=$nbfile '{if ($1 != nbfile) {print $2}}' | paste -s -d ',' )
+        liste_file_tmp=$( for i in $( cat liste_pack_${myType}_${date_begin_pack}_${date_end_pack}.txt ) ; do basename $i ; done )
         # Create packed files
         IGCM_debug_Print 1 "Ncrcat ongoing for ${dir} and ${myType}"
         output=${JobName}_${date_begin_pack}_${date_end_pack}_${myType}
-        #cat liste_pack_${myType}_${number_pack}.txt | xargs ncrcat -v ${list_var} -o ${output}
+        #cat liste_pack_${myType}_${date_begin_pack}_${date_end_pack}.txt | xargs ncrcat -v ${list_var} -o ${output}
         if [ X${list_var} = X ] ; then
           IGCM_sys_ncrcat -p ${dir} ${liste_file_tmp} --output ${output}
@@ -317,5 +317,5 @@
         IGCM_sys_Rm ${output}
         # Clean files used by ncrcat
-        cat liste_pack_${myType}_${number_pack}.txt | xargs rm
+        cat liste_pack_${myType}_${date_begin_pack}_${date_end_pack}.txt | xargs rm
         # Save the list of files that has been pack (ncrcat)
         mv liste_pack_${myType}_${date_begin_pack}_${date_end_pack}.txt ${STORE_DEBUG}
Index: /trunk/libIGCM/AA_pack_restart
===================================================================
--- /trunk/libIGCM/AA_pack_restart	(revision 616)
+++ /trunk/libIGCM/AA_pack_restart	(revision 617)
@@ -318,10 +318,10 @@
     date_file=$( echo ${extract_date_file} | sed 's/\([0-9]\{8\}\)_.*$/\1/g' )
 #   warning demenagement. delete last restart of the previous pack
-    [  ${date_file} -eq ${date_end_previous} ] && echo $( readlink ${file} ) >> ${RUN_DIR}/liste_remove_pack_${number_pack}.txt
+    [  ${date_file} -eq ${date_end_previous} ] && echo $( readlink ${file} ) >> ${RUN_DIR}/liste_remove_pack_${date_begin_pack}_${date_end_pack}.txt
 #   echo pack number ${number_pack}  ${date_file} ${date_begin_pack} ${date_end_pack}
     if [ ${date_file} -le ${date_end_pack} ] && [ ${date_file} -ge ${date_begin_pack} ] ; then
-      echo $( basename ${file} ) >> ${RUN_DIR}/liste_pack_${number_pack}.txt
+      echo $( basename ${file} ) >> ${RUN_DIR}/liste_pack_${date_begin_pack}_${date_end_pack}.txt
 #   warning demenagement. do not delete last restart of this pack
-      [ ${date_file} -eq ${date_end_pack} ] || echo $( readlink ${file} ) >> ${RUN_DIR}/liste_remove_pack_${number_pack}.txt
+      [ ${date_file} -eq ${date_end_pack} ] || echo $( readlink ${file} ) >> ${RUN_DIR}/liste_remove_pack_${date_begin_pack}_${date_end_pack}.txt
 #   Will not work. Need to find a better ordering.
 #   elif [ ${date_file} -ge ${date_end_pack} ] ; then
@@ -332,5 +332,5 @@
   # Create tar files
   IGCM_debug_Print 1 "Tar ongoing"
-  tar -cvf ${JobName}_${date_begin_pack}_${date_end_pack}_restart.tar --dereference --files-from ${RUN_DIR}/liste_pack_${number_pack}.txt
+  tar -cvf ${JobName}_${date_begin_pack}_${date_end_pack}_restart.tar --dereference --files-from ${RUN_DIR}/liste_pack_${date_begin_pack}_${date_end_pack}.txt
   # Save it
   IGCM_sys_Put_Out ${JobName}_${date_begin_pack}_${date_end_pack}_restart.tar ${STORE_RESTART}
@@ -338,9 +338,9 @@
   IGCM_sys_Rm ${JobName}_${date_begin_pack}_${date_end_pack}_restart.tar
   # Clean links
-  cat ${RUN_DIR}/liste_pack_${number_pack}.txt | xargs rm
+  cat ${RUN_DIR}/liste_pack_${date_begin_pack}_${date_end_pack}.txt | xargs rm
   # Clean files links pointed to
-  cat ${RUN_DIR}/liste_remove_pack_${number_pack}.txt | xargs rm
+  cat ${RUN_DIR}/liste_remove_pack_${date_begin_pack}_${date_end_pack}.txt | xargs rm
   # Save the list of files that has been pack (tar)
-  mv ${RUN_DIR}/liste_pack_${number_pack}.txt ${STORE_RESTART}
+  mv ${RUN_DIR}/liste_pack_${date_begin_pack}_${date_end_pack}.txt ${STORE_RESTART}
   IGCM_debug_Print 1 "Tar and cleaning done"
 
