Index: /trunk/libIGCM/AA_rebuild_fromArchive
===================================================================
--- /trunk/libIGCM/AA_rebuild_fromArchive	(revision 158)
+++ /trunk/libIGCM/AA_rebuild_fromArchive	(revision 159)
@@ -22,5 +22,5 @@
 #-Q- sx8brodie # pour recevoir un mail en cas de depassement du temps Elapsed (ou autre pb.)
 #-Q- sx8brodie # @ notification = error
-#-Q- sx8brodie # @ environment  = $DEBUG_debug ; $MODIPSL ; $libIGCM ; $libIGCM_SX ; $SUBMIT_DIR ; $REBUILD_DIR ; $RebuildFromArchive ; $POST_DIR ; $DateBegin ; $PeriodDateBegin ; $PeriodDateEnd ; $NbRebuildDir ; $StandAlone ; $RESOL_ATM ; $RESOL_OCE ; $RESOL_ICE ; $RESOL_SRF
+#-Q- sx8brodie # @ environment  = $DEBUG_debug ; $MODIPSL ; $libIGCM ; $libIGCM_SX ; $SUBMIT_DIR ; $REBUILD_DIR ; $RebuildFromArchive ; $POST_DIR ; $DateBegin ; $PeriodDateBegin ; $PeriodDateEnd ; $NbRebuildDir ; $StandAlone ; $RESOL_ATM ; $RESOL_OCE ; $RESOL_ICE ; $RESOL_SRF ; $MASTER
 #-Q- sx8brodie # @ queue
 #-Q- aix6 #!/bin/ksh
@@ -29,5 +29,5 @@
 #-Q- aix6 #######################
 #-Q- aix6 # Temps Elapsed max. d'une requete hh:mm:ss
-#-Q- aix6 # @ wall_clock_limit = 10:00:00
+#-Q- aix6 # @ wall_clock_limit = 20:00:00
 #-Q- aix6 # Nom du travail LoadLeveler
 #-Q- aix6 # @ job_name   = REBUILDARCH
@@ -38,5 +38,5 @@
 #-Q- aix6 # pour recevoir un mail en cas de depassement du temps Elapsed (ou autre pb.)
 #-Q- aix6 # @ notification = error
-#-Q- aix6 # @ environment  = $DEBUG_debug ; $MODIPSL ; $libIGCM ; $libIGCM_SX ; $SUBMIT_DIR ; $REBUILD_DIR ; $RebuildFromArchive ; $POST_DIR ; $DateBegin ; $PeriodDateBegin ; $PeriodDateEnd ; $NbRebuildDir ; $StandAlone ; $RESOL_ATM ; $RESOL_OCE ; $RESOL_ICE ; $RESOL_SRF
+#-Q- aix6 # @ environment  = $DEBUG_debug ; $MODIPSL ; $libIGCM ; $libIGCM_SX ; $SUBMIT_DIR ; $REBUILD_DIR ; $RebuildFromArchive ; $POST_DIR ; $DateBegin ; $PeriodDateBegin ; $PeriodDateEnd ; $NbRebuildDir ; $StandAlone ; $RESOL_ATM ; $RESOL_OCE ; $RESOL_ICE ; $RESOL_SRF ; $MASTER
 #-Q- aix6 # @ queue
 #-Q- sx8mercure #!/bin/ksh
Index: /trunk/libIGCM/AA_rebuild_fromWorkdir
===================================================================
--- /trunk/libIGCM/AA_rebuild_fromWorkdir	(revision 158)
+++ /trunk/libIGCM/AA_rebuild_fromWorkdir	(revision 159)
@@ -125,5 +125,5 @@
 
 RUN_DIR=${REBUILD_DIR}
-ListAllRebuildDir=$( ls -d ${REBUILD_DIR}/REBUILD_* | grep  ${PeriodDateBegin} | tail -${NbRebuildDir} )
+ListAllRebuildDir=$( ls -d ${REBUILD_DIR}/REBUILD_* | grep -B $(( ${NbRebuildDir} -1 )) ${PeriodDateBegin} )
 #
 IGCM_sys_Cd ${RUN_DIR}
Index: /trunk/libIGCM/libIGCM_comp/libIGCM_comp.ksh
===================================================================
--- /trunk/libIGCM/libIGCM_comp/libIGCM_comp.ksh	(revision 158)
+++ /trunk/libIGCM/libIGCM_comp/libIGCM_comp.ksh	(revision 159)
@@ -254,6 +254,5 @@
 		      
 		      IGCM_sys_Get ${file_in} ${file_out}
-
-		      IGCM_comp_PrepareDeletedFiles ${file_in} ${file_out}
+		      #IGCM_comp_PrepareDeletedFiles ${file_in} ${file_out}
 
 		      (( i=i+2 ))
@@ -311,5 +310,4 @@
 
 		IGCM_sys_Get ${file_in} ${file_out}
-
 		IGCM_comp_PrepareDeletedFiles ${file_in} ${file_out}
 
@@ -406,5 +404,4 @@
 
 		IGCM_sys_Cp ${file_in} ${file_out} 
-
 		IGCM_comp_PrepareDeletedFiles ${file_in} ${file_out}
 
@@ -770,5 +767,5 @@
 		    # If we need to apply a patch we use TMP DIRECTORY before ARCHIVING if asynchronous rebuild is on
 		    #
-		    if ( [ X$( eval echo \${${compname}_${flag_post}_Patches[0]} ) !=  X${NULL_STR} ] && [ ! X${config_Post_RebuildFrequency} = X${NULL_STR} ] && [ ! X${config_Post_RebuildFrequency} = XNONE ] ) ; then
+		    if ( [ ! X$( eval echo \${${compname}_${flag_post}_Patches[0]} ) =  X${NULL_STR} ] && [ ! X${config_Post_RebuildFrequency} = X ] && [ ! X${config_Post_RebuildFrequency} = XNONE ] ) ; then
 			if [ -f ${file_in} ] ; then
 			    IGCM_sys_Mv ${file_in} ${RUN_DIR}/REBUILD_${PeriodDateBegin}
Index: /trunk/libIGCM/libIGCM_post/libIGCM_post.ksh
===================================================================
--- /trunk/libIGCM/libIGCM_post/libIGCM_post.ksh	(revision 158)
+++ /trunk/libIGCM/libIGCM_post/libIGCM_post.ksh	(revision 159)
@@ -686,5 +686,5 @@
             export SUBMIT_DIR=${SUBMIT_DIR}
             export REBUILD_DIR=${REBUILD_DIR}
-            export POST_DIR=${libIGCM}
+            export POST_DIR=${POST_DIR}
             export DateBegin=${DateBegin}
             export PeriodDateBegin=${PeriodDateBegin}
