Index: unk/libIGCM/AA_rebuild_fromArchive
===================================================================
--- /trunk/libIGCM/AA_rebuild_fromArchive	(revision 926)
+++ 	(revision )
@@ -1,228 +1,0 @@
-#-Q- curie ######################
-#-Q- curie ## CURIE   TGCC/CEA ##
-#-Q- curie ######################
-#-Q- curie #MSUB -r REBUILDARCH    # Nom du job
-#-Q- curie #MSUB -eo
-#-Q- curie #MSUB -n 1              # Reservation du processus
-#-Q- curie #MSUB -T 36000          # Limite de temps elapsed du job
-#-Q- curie #MSUB -q xlarge
-#-Q- curie #MSUB -Q normal
-#-Q- curie #MSUB -A ::default_project::
-#-Q- curie set +x
-#-Q- ada #!/bin/ksh
-#-Q- ada #######################
-#-Q- ada ##     ADA  IDRIS    ##
-#-Q- ada #######################
-#-Q- ada # @ job_type = serial
-#-Q- ada # @ requirements = (Feature == "prepost")
-#-Q- ada # Temps Elapsed max. d'une requete hh:mm:ss
-#-Q- ada # @ wall_clock_limit = 10:00:00
-#-Q- ada # Nom du travail LoadLeveler
-#-Q- ada # @ job_name   = REBUILDARCH
-#-Q- ada # Fichier de sortie standard du travail
-#-Q- ada # @ output     = $(job_name).$(jobid)
-#-Q- ada # Fichier de sortie d'erreur du travail
-#-Q- ada # @ error      =  $(job_name).$(jobid)
-#-Q- ada # pour recevoir un mail en cas de depassement du temps Elapsed (ou autre pb.)
-#-Q- ada # @ notification = error
-#-Q- ada # @ 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_MBG ; $RESOL_SRF ; $RESOL_SBG ; $MASTER
-#-Q- ada # @ queue
-#-Q- sx9mercure #!/bin/ksh
-#-Q- sx9mercure ######################
-#-Q- sx9mercure ## SX9MERCURE  CCRT ##
-#-Q- sx9mercure ######################
-#-Q- sx9mercure #PBS -N REBUILDARCH          # Nom du job
-#-Q- sx9mercure #PBS -j o                    # regroupement des stdout et stderr
-#-Q- sx9mercure #PBS -S /usr/bin/ksh         # shell de soumission
-#-Q- sx9mercure #PBS -l memsz_job=1gb        # Limite memoire a 1 Go
-#-Q- sx9mercure #PBS -l elapstim_req=24:00:00  # Limite temps a 1 heures
-#-Q- sx9mercure #PBS -q scalaire
-#-Q- sx9mercure #PBS -r n
-#-Q- titane #!/bin/ksh
-#-Q- titane ######################
-#-Q- titane ## TITANE   CEA     ##
-#-Q- titane ######################
-#-Q- titane #MSUB -r REBUILDARCH     # Nom du job
-#-Q- titane #MSUB -eo
-#-Q- titane #MSUB -n 1               # Reservation du processus
-#-Q- titane #MSUB -T 86400           # Limite de temps elapsed du job
-#-Q- titane #MSUB -q mono
-#-Q- titane #MSUB -E '-rn'
-#-Q- lxiv8 ######################
-#-Q- lxiv8 ## OBELIX      LSCE ##
-#-Q- lxiv8 ######################
-#-Q- lxiv8 #PBS -N REBUILDARCH
-#-Q- lxiv8 #PBS -m a
-#-Q- lxiv8 #PBS -j oe
-#-Q- lxiv8 #PBS -q medium
-#-Q- lxiv8 #PBS -o REBUILDARCH.$$
-#-Q- lxiv8 #PBS -S /bin/ksh
-#-Q- default #!/bin/ksh
-#-Q- default ##################
-#-Q- default ## DEFAULT HOST ##
-#-Q- default ##################
-
-#**************************************************************
-# Author: Sebastien Denvil
-# Contact: Sebastien.Denvil__at__ipsl.jussieu.fr
-# $Revision::                                          $ Revision of last commit
-# $Author::                                            $ Author of last commit
-# $Date::                                              $ Date of last commit
-# IPSL (2006)
-#  This software is governed by the CeCILL licence see libIGCM/libIGCM_CeCILL.LIC
-#
-#**************************************************************
-
-#set -eu
-#set -vx
-
-date
-
-#-Q- ada export OMP_NUM_THREADS=1
-
-#D- Task type (computing or post-processing)
-TaskType=post-processing
-
-########################################################################
-
-#D- Flag to determine if this job in a standalone mode
-#D- Default : value from AA_job if any
-StandAlone=${StandAlone:=true}
-
-#D- Path to libIGCM
-#D- Default : value from AA_job if any
-# WARNING For StandAlone use : To run this script on some machine (ulam and cesium)
-# WARNING you must check MirrorlibIGCM variable in sys library.
-# WARNING If this variable is true, you must use libIGCM_POST path instead
-# WARNING of your running libIGCM directory.
-libIGCM=${libIGCM:=::modipsl::/libIGCM}
-
-#-D- $hostname of the MASTER job when SUBMIT_DIR is not visible on postprocessing computer.
-MASTER=${MASTER:=mercure|titane|brodie|vargas}
-
-#D- Do we rebuild parallel output from archive or from ${BIGDIR}
-#D- Default : value from AA_job if any
-RebuildFromArchive=${RebuildFromArchive:=true}
-
-#D- Directory where files we need to rebuild are store
-#D- Default : value from AA_job if any
-#D- if RebuildFromArchive=true REBUILD_DIR=${DMFDIR}/IGCM_OUT/.../JobName/TMP
-#D- example : /dmnfs09/cont003/p86denv/IGCM_OUT/IPSLCM5/CM5PIRC7/TMP
-#D- if RebuildFromArchive=false REBUILD_DIR=${BIGDIR}/REBUILD/TagName/JobName/
-#D- example : /scratch/cont003/p86denv/REBUILD/IPSLCM5/SCAL-NEW
-REBUILD_DIR=${REBUILD_DIR:=/path/to/your/TMP/REBUILD/FILES}
-
-#D- How many directory to rebuild we have to consider
-#D- Default : value from AA_job if any
-NbRebuildDir=${NbRebuildDir:=1000}
-
-#D- Suffix date we will use to determine which directory to rebuild
-#D- We will rebuild NbRebuildDir before and including PeriodDateBegin
-#D- Default : value from AA_job if any
-LastPeriodForRebuild=${LastPeriodForRebuild:=${PeriodDateBegin:=18901201}}
-
-#D- Flag to determine atlas job's output directory
-#D- Default : value from libIGCM_post.ksh if any
-POST_DIR=${POST_DIR:=${PBS_O_WORKDIR}}
-
-#-D- libIGCM_SX contains libIGCM on Master computer. Required on some center. Always OK.
-libIGCM_SX=${libIGCM_SX:=::modipsl::/libIGCM}
-
-#D- Increased verbosity (1, 2, 3)
-#D- Default : value from AA_job if any
-Verbosity=${Verbosity:=3}
-
-#D- Low level debug : to bypass lib test checks and stack construction
-#D- Default : value from AA_job if any
-DEBUG_debug=${DEBUG_debug:=false}
-
-#D- TEMPORARY Flag to determine atmospheric resolution
-#D- Default : value from atmospheric driver if any
-RESOL_ATM=${RESOL_ATM:=ALL}
-
-#D- TEMPORARY Flag to determine ocean resolution
-#D- Default : value from ocean driver if any
-RESOL_OCE=${RESOL_OCE:=ORCA2}
-
-#D- TEMPORARY Flag to determine ice resolution
-#D- Default : value from ice driver if any
-RESOL_ICE=${RESOL_ICE:=ORCA2}
-
-#D- TEMPORARY Flag to determine biogeochemistry resolution
-#D- Default : value from ice driver if any
-RESOL_MBG=${RESOL_MBG:=ORCA2}
-
-#D- Flag to determine surface resolution
-#D- Default : value from surface driver if any
-RESOL_SRF=ALL
-
-#D- Flag to determine surface resolution
-#D- Default : value from surface driver if any
-RESOL_SBG=ALL
-
-########################################################################
-
-. ${libIGCM}/libIGCM_debug/libIGCM_debug.ksh
-. ${libIGCM}/libIGCM_card/libIGCM_card.ksh
-. ${libIGCM}/libIGCM_date/libIGCM_date.ksh
-#-------
-. ${libIGCM}/libIGCM_sys/libIGCM_sys.ksh
-. ${libIGCM}/libIGCM_post/libIGCM_post.ksh
-#-------
-( ${DEBUG_debug} ) && IGCM_debug_Check
-( ${DEBUG_debug} ) && IGCM_card_Check
-( ${DEBUG_debug} ) && IGCM_date_Check
-
-########################################################################
-
-#set -vx
-
-RUN_DIR=${RUN_DIR_PATH}
-IGCM_sys_MkdirWork ${RUN_DIR}
-IGCM_sys_Cd ${RUN_DIR}
-
-# ------------------------------------------------------------------
-# Test if all was right before proceeding further
-# ------------------------------------------------------------------
-IGCM_debug_Verif_Exit_Post
-
-#
-if [ ${RebuildFromArchive} = true ] ; then
-  ListAllRebuildDir=$( IGCM_sys_RshArchive ls -d ${REBUILD_DIR}/REBUILD_* | grep -B $(( ${NbRebuildDir} -1 )) ${LastPeriodForRebuild} )
-else
-  ListAllRebuildDir=$( IGCM_sys_RshMaster ls -d ${REBUILD_DIR}/REBUILD_* | grep -B $(( ${NbRebuildDir} -1 )) ${LastPeriodForRebuild} )
-fi
-#
-
-for directory in ${ListAllRebuildDir} ; do
-  #
-  if [ ${RebuildFromArchive} = true ] ; then
-    IGCM_sys_Get_Dir ${directory} ${RUN_DIR}
-  else
-    IGCM_sys_Get_Master ${directory} ${RUN_DIR}
-  fi
-  #
-  IGCM_sys_Cd ${RUN_DIR}/$( basename ${directory} )
-
-  # --------------------------------------------------------------------
-  # Source function include in the REBUILD ksh and rebuild
-  # --------------------------------------------------------------------
-  . ${RUN_DIR}/$( basename ${directory} )/rebuild.ksh
-  IGCM_FlushRebuild
-  #
-  IGCM_sys_Cd ${RUN_DIR}
-  # Clean Up
-  # local clean up
-  IGCM_sys_Rm -rf $( basename ${directory} )
-  # remote clean up
-  if [ ${RebuildFromArchive} = true ] ; then
-    IGCM_sys_RshArchive rm -rf ${directory}
-  else
-    IGCM_sys_Rm -rf ${directory}
-  fi
-done
-
-# Clean RUN_DIR_PATH (necessary for cesium and titane only)
-IGCM_sys_RmRunDir -Rf ${RUN_DIR_PATH}
-
-date
Index: /trunk/libIGCM/libIGCM_post/libIGCM_post.ksh
===================================================================
--- /trunk/libIGCM/libIGCM_post/libIGCM_post.ksh	(revision 926)
+++ /trunk/libIGCM/libIGCM_post/libIGCM_post.ksh	(revision 927)
@@ -593,12 +593,9 @@
       IGCM_debug_Print 1 "REBUILD POST-PROCESSING FROM ARCHIVE"
       echo
-      #
-      script=rebuild_fromArchive
     else
       IGCM_debug_Print 1 "REBUILD POST-PROCESSING FROM WORKDIR"
       echo
-      #
-      script=rebuild_fromWorkdir
     fi
+    script=rebuild_fromWorkdir
     #
     Script_Post_Output=${script}.${PeriodDateEnd}
