source: trunk/libIGCM/AA_pack_output @ 1603

Last change on this file since 1603 was 1603, checked in by aclsce, 7 months ago
  • Changed libIGCM behaviour in case of pb in pack_output.job : now, we exit from the job if there is any problem, whatever we are in PROD, DEVT, TEST mode.
  • Specification of pack frequency per file :

In order to reduce the number of inodes, it is possible to specify by file the frequency of packing. The syntax to do that is in the 4th column of OutputFiles? section of the component.card, for example as follows in lmdz.card :
[OutputFiles?]
List= (histmth.nc, ${R_OUT_ATM_O_M}/${PREFIX}_1M_histmth.nc, Post_1M_histmth, 100Y), \

(histday.nc, ${R_OUT_ATM_O_D}/${PREFIX}_1D_histday.nc, Post_1D_histday, 10Y), \

...

In this example, histmth files will be packed every 100 years and histday files will be packed every 10 years.
The pack frequency you defined in config.card is the frequency of pack by default, that means if a specific frequency of pack is specified for a file in a component.card, this file will be packed at the specific frequency whereas all other files will be packed at global pack frequency (specified in config.card) and in this case, the frequency pack (from the config.card) is the frequency the pack_output job will be launched at.
There is a constraint to use this fonctionality : the Packfrequency you defined in config.card must be greater or equal to the pack frequencies you specified for each type of file in component.card, otherwise the computing job will be stopped (with an explicit error message).
Surpack mode :
A surpack mode functionality is available through the use of pack_output.job. To enable this functionality, you have to put "surpack_mode=y" (default value is n). The way to use is similar to restart post-processing pack_output jobs, as indicated here : http://forge.ipsl.jussieu.fr/igcmg_doc/wiki/Doc/CheckDebug#RestartPack_output. You can either use a global pack frequency in config.card or specific pack frequency per file, as explained above.

  • Property licence set to
    The following licence information concerns ONLY the libIGCM tools
    ==================================================================

    Copyright © Centre National de la Recherche Scientifique CNRS
    Commissariat à l'Énergie Atomique CEA

    libIGCM : Library for Portable Models Computation of IGCM Group.

    IGCM Group is the french IPSL Global Climate Model Group.

    This library is a set of shell scripts and functions whose purpose is
    the management of the initialization, the launch, the transfer of
    output files, the post-processing and the monitoring of datas produce
    by any numerical program on any plateforme.

    This software is governed by the CeCILL license under French law and
    abiding by the rules of distribution of free software. You can use,
    modify and/ or redistribute the software under the terms of the CeCILL
    license as circulated by CEA, CNRS and INRIA at the following URL
    "http://www.cecill.info".

    As a counterpart to the access to the source code and rights to copy,
    modify and redistribute granted by the license, users are provided only
    with a limited warranty and the software's author, the holder of the
    economic rights, and the successive licensors have only limited
    liability.

    In this respect, the user's attention is drawn to the risks associated
    with loading, using, modifying and/or developing or reproducing the
    software by the user in light of its specific status of free software,
    that may mean that it is complicated to manipulate, and that also
    therefore means that it is reserved for developers and experienced
    professionals having in-depth computer knowledge. Users are therefore
    encouraged to load and test the software's suitability as regards their
    requirements in conditions enabling the security of their systems and/or
    data to be ensured and, more generally, to use and operate it in the
    same conditions as regards security.

    The fact that you are presently reading this means that you have had
    knowledge of the CeCILL license and that you accept its terms.
  • Property svn:keywords set to Revision Author Date
File size: 18.0 KB
Line 
1#-Q- curie ######################
2#-Q- curie ## CURIE   TGCC/CEA ##
3#-Q- curie ######################
4#-Q- curie #MSUB -r PACKOUTPUT     # Nom du job
5#-Q- curie #MSUB -o PACKOUTPUT.out_%I
6#-Q- curie #MSUB -e PACKOUTPUT.out_%I
7#-Q- curie #MSUB -n 1              # Reservation du processus
8#-Q- curie #MSUB -T 36000          # Limite de temps elapsed du job
9#-Q- curie #MSUB -q ::default_node::
10#-Q- curie #MSUB -c ::default_core::
11#-Q- curie #MSUB -Q normal
12#-Q- curie #MSUB -A ::default_project::
13#-Q- curie set +x
14#-Q- irene ######################
15#-Q- irene ## IRENE   TGCC/CEA ##
16#-Q- irene ######################
17#-Q- irene #MSUB -r PACKOUTPUT     # Job name
18#-Q- irene #MSUB -o PACKOUTPUT.out_%I
19#-Q- irene #MSUB -e PACKOUTPUT.out_%I
20#-Q- irene #MSUB -n 1              # Number of cores
21#-Q- irene #MSUB -T 36000          # Maximum elapsed time
22#-Q- irene #MSUB -q ::default_node::
23#-Q- irene #MSUB -c ::default_core::
24#-Q- irene #MSUB -Q normal
25#-Q- irene #MSUB -A ::default_post_project::
26#-Q- irene #MSUB -m store,work,scratch
27#-Q- irene set +x
28#-Q- irene-amd ######################
29#-Q- irene-amd ## IRENE   TGCC/CEA ##
30#-Q- irene-amd ######################
31#-Q- irene-amd #MSUB -r PACKOUTPUT     # Job name
32#-Q- irene-amd #MSUB -o PACKOUTPUT.out_%I
33#-Q- irene-amd #MSUB -e PACKOUTPUT.out_%I
34#-Q- irene-amd #MSUB -n 1              # Number of cores
35#-Q- irene-amd #MSUB -T 36000          # Maximum elapsed time
36#-Q- irene-amd #MSUB -q ::default_node::
37#-Q- irene-amd #MSUB -c ::default_core::
38#-Q- irene-amd #MSUB -Q normal
39#-Q- irene-amd #MSUB -A ::default_post_project::
40#-Q- irene-amd #MSUB -m store,work,scratch
41#-Q- irene-amd set +x
42#-Q- jeanzay #!/bin/ksh
43#-Q- jeanzay ######################
44#-Q- jeanzay ## JEANZAY    IDRIS ##
45#-Q- jeanzay ######################
46#-Q- jeanzay #SBATCH --job-name=PACKOUTPUT         # Job Name
47#-Q- jeanzay #SBATCH --output=PACKOUTPUT.out_%J    # standard output
48#-Q- jeanzay #SBATCH --error=PACKOUTPUT.out_%J     # error output
49#-Q- jeanzay #SBATCH -N  1                        # Number of core
50#-Q- jeanzay #SBATCH --partition=prepost          # Post-processing partition
51#-Q- jeanzay #SBATCH --time=10:00:00               # Wall clock limit (seconds)
52#-Q- jeanzay #SBATCH --account ::default_project::@cpu
53#-Q- jeanzay set +x
54#-Q- ada #!/bin/ksh
55#-Q- ada #######################
56#-Q- ada ## ADA         IDRIS ##
57#-Q- ada #######################
58#-Q- ada # @ job_type = mpich
59#-Q- ada # @ requirements = (Feature == "prepost")
60#-Q- ada # Temps Elapsed max. d'une requete hh:mm:ss
61#-Q- ada # @ wall_clock_limit = 10:00:00
62#-Q- ada # Memory required for ncrcat
63#-Q- ada # @ as_limit = 30Gb
64#-Q- ada # Nom du travail LoadLeveler
65#-Q- ada # @ job_name   = PACKOUTPUT
66#-Q- ada # Fichier de sortie standard du travail
67#-Q- ada # @ output     = $(job_name).$(jobid)
68#-Q- ada # Fichier de sortie d'erreur du travail
69#-Q- ada # @ error      =  $(job_name).$(jobid)
70#-Q- ada # pour recevoir un mail en cas de depassement du temps Elapsed (ou autre pb.)
71#-Q- ada # @ notification = error
72#-Q- ada # @ environment  = $DEBUG_debug ; $BigBrother ; $postProcessingStopLevel ; $MODIPSL ; $libIGCM ; $libIGCM_SX ; $POST_DIR ; $Script_Post_Output ; $SUBMIT_DIR ; $DateBegin ; $DateEnd ; $PeriodPack ; $StandAlone ; $MASTER ; wall_clock_limit=$(wall_clock_limit)
73#-Q- ada # @ queue
74#-Q- obelix ######################
75#-Q- obelix ## OBELIX      LSCE ##
76#-Q- obelix ######################
77#-Q- obelix #PBS -N PACKOUTPUT
78#-Q- obelix #PBS -m a
79#-Q- obelix #PBS -j oe
80#-Q- obelix #PBS -q medium
81#-Q- obelix #PBS -o PACKOUTPUT.$$
82#-Q- obelix #PBS -S /bin/ksh
83#-Q- ifort_CICLAD ######################
84#-Q- ifort_CICLAD ##   CICLAD    IPSL ##
85#-Q- ifort_CICLAD ######################
86#-Q- ifort_CICLAD #PBS -N PACKOUTPUT
87#-Q- ifort_CICLAD #PBS -m a
88#-Q- ifort_CICLAD #PBS -j oe
89#-Q- ifort_CICLAD #PBS -q std
90#-Q- ifort_CICLAD #PBS -S /bin/ksh
91#-Q- default #!/bin/ksh
92#-Q- default ##################
93#-Q- default ## DEFAULT HOST ##
94#-Q- default ##################
95
96#**************************************************************
97# Author: Sebastien Denvil
98# Contact: Sebastien.Denvil__at__ipsl.jussieu.fr
99# $Revision::                                          $ Revision of last commit
100# $Author::                                            $ Author of last commit
101# $Date::                                              $ Date of last commit
102# IPSL (2006)
103#  This software is governed by the CeCILL licence see libIGCM/libIGCM_CeCILL.LIC
104#
105#**************************************************************
106
107#set -eu
108#set -vx
109
110date
111
112#D- Task type DO NOT CHANGE (computing, post-processing or checking)
113TaskType=post-processing
114
115########################################################################
116
117#D- Flag to determine if this job in a standalone mode
118#D- Default : value from AA_job if any
119StandAlone=${StandAlone:=true}
120
121#D- Path to libIGCM
122#D- Default : value from AA_job if any
123# WARNING For StandAlone use : To run this script on some machine (ulam and cesium)
124# WARNING you must check MirrorlibIGCM variable in sys library.
125# WARNING If this variable is true, you must use libIGCM_POST path instead
126# WARNING of your running libIGCM directory.
127libIGCM=${libIGCM:=::modipsl::/libIGCM}
128
129#-D- $hostname of the MASTER job when SUBMIT_DIR is not visible on postprocessing computer.
130MASTER=${MASTER:=ada|curie}
131
132#D- Flag to determine begin date for restart pack
133#D- Default : value from AA_job if any
134DateBegin=${DateBegin:=20000101}
135
136#D- Flag to determine end date for restart pack
137#D- Default : value from AA_job if any
138DateEnd=${DateEnd:=20691231}
139
140#D- Flag to determine pack period
141#D- Default : value from AA_job if any
142PeriodPack=${PeriodPack:=10Y}
143
144#D- Uncomment to run interactively
145#D- For testing purpose, will be remove
146#SUBMIT_DIR=${PWD}
147#RUN_DIR_PATH=${SCRATCHDIR}/Pack_Test
148
149#D- Increased verbosity (1, 2, 3)
150#D- Default : value from AA_job if any
151Verbosity=${Verbosity:=3}
152
153#D- Low level debug : to bypass lib test checks and stack construction
154#D- Default : value from AA_job if any
155DEBUG_debug=${DEBUG_debug:=false}
156
157#D- Surpack_mode : to pack existing packs output files
158#D- Default : n
159surpack_mode=n
160
161########################################################################
162
163. ${libIGCM}/libIGCM_debug/libIGCM_debug.ksh
164. ${libIGCM}/libIGCM_card/libIGCM_card.ksh
165. ${libIGCM}/libIGCM_date/libIGCM_date.ksh
166#-------
167. ${libIGCM}/libIGCM_sys/libIGCM_sys.ksh
168. ${libIGCM}/libIGCM_config/libIGCM_config.ksh
169. ${libIGCM}/libIGCM_post/libIGCM_post.ksh
170#-------
171RUN_DIR=${RUN_DIR_PATH}
172IGCM_sys_MkdirWork ${RUN_DIR}
173IGCM_sys_Cd ${RUN_DIR}
174#-------
175( ${DEBUG_debug} ) && IGCM_debug_Check
176( ${DEBUG_debug} ) && IGCM_card_Check
177( ${DEBUG_debug} ) && IGCM_date_Check
178
179########################################################################
180
181#set -vx
182
183# ------------------------------------------------------------------
184# Test if all was right before proceeding further
185# ------------------------------------------------------------------
186IGCM_debug_Verif_Exit
187
188if [ ${StandAlone} = true ] ; then
189    CARD_DIR=${SUBMIT_DIR}
190else
191    CARD_DIR=${RUN_DIR_PATH}
192    IGCM_sys_Get_Master ${SUBMIT_DIR}/config.card ${RUN_DIR_PATH}
193    IGCM_sys_Get_Master ${SUBMIT_DIR}/run.card    ${RUN_DIR_PATH}
194    IGCM_sys_Get_Master ${SUBMIT_DIR}/COMP        ${RUN_DIR_PATH}
195    IGCM_sys_Get_Master ${SUBMIT_DIR}/POST        ${RUN_DIR_PATH}
196fi
197
198#==================================
199# First of all
200#
201# Read libIGCM compatibility version in config.card
202# Read UserChoices section
203# Read Ensemble section
204# Read Post section
205# Define all netcdf output directories
206#==================================
207IGCM_config_CommonConfiguration ${CARD_DIR}/config.card
208
209# ------------------------------------------------------------------
210# Activate BigBrother so as to supervise this job
211# ------------------------------------------------------------------
212IGCM_debug_BigBro_Initialize
213
214#==================================
215# Read ListOfComponents section
216# to drive the loop over find
217IGCM_card_DefineArrayFromSection ${CARD_DIR}/config.card ListOfComponents
218
219#==================================
220# Test and set up directories
221#==================================
222IGCM_sys_TestDirArchive ${R_SAVE}
223[ $? != 0 ] && IGCM_debug_Exit "IGCM_sys_TestDirArchive"
224
225# Where to store used file list /!\ TEMPORARY /!\
226STORE_DEBUG=${R_SAVE}/DEBUG
227
228# Switch to script variables meaning (try to be compatible with ipsl_pack TGCC moving procedure)
229JobName=${config_UserChoices_JobName}
230echo $JobName $DateBegin $DateEnd
231
232# ------------------------------------------------------------------
233# Test if all was right before proceeding further
234# ------------------------------------------------------------------
235IGCM_debug_Verif_Exit
236
237# Init loop
238date_begin_pack=${DateBegin}
239date_end_simulation=${DateEnd}
240number_pack=1
241
242IGCM_debug_PrintVariables 3 date_begin_pack
243IGCM_debug_PrintVariables 3 date_end_simulation
244
245# Loop over components
246for comp in ${config_ListOfComponents[*]} ; do
247
248    IGCM_card_DefineArrayFromOption ${SUBMIT_DIR}/config.card ListOfComponents ${comp}
249    eval compname=\${config_ListOfComponents_${comp}[0]} > /dev/null 2>&1
250    card=${SUBMIT_DIR}/COMP/${compname}.card
251    #     
252    if [ X${surpack_mode} = Xy ] ; then
253        dirList=$( find ${R_SAVE}/${comp}/Output -maxdepth 1 -mindepth 1 -type d ) 
254    else
255    dirList=$( find ${R_BUFR}/${comp}/Output -maxdepth 1 -mindepth 1 -type d )
256    fi
257    # Loop over directories containing output files
258    for dir in ${dirList} ; do
259      # dirID is like ATM.Output.MO
260      dirID=$( echo $dir | sed "s:${R_BUFR}/::" | sed "s:/:.:g" )
261      # Sort what's in the directory
262      find ${dir} -type f -name "${JobName}*.nc" -ls | sort -k 11 > liste_files.${dirID}.txt
263      # How much file type. Example : 1M_histmthCOSP.nc, 1M_histmth.nc, 1M_histmthNMC.nc, 1M_paramLMDZ_phy.nc
264      # /!\ fileType include the .nc extension /!\
265      fileType=$( gawk '{print $11}' liste_files.${dirID}.txt | gawk -F$dir/ '{print $2}' | sed "s:${JobName}_[0-9]\{8,9\}_[0-9]\{8,9\}_::g" | sort | uniq )
266      # Loop over the file type and pack them when in between date_begin_pack and date_end_pack
267      for myType in ${fileType} ; do
268                # Read comp.card and find specific pack period for each type of file
269                IGCM_card_DefineArrayFromOption ${card} OutputFiles List
270                ListFilesName=${compname}_OutputFiles_List
271                eval FileName0=\${${ListFilesName}[0]} > /dev/null 2>&1
272
273                if [ X${FileName0} != X${NULL_STR} ] ; then
274                    eval NbFiles=\${#${ListFilesName}[@]} > /dev/null 2>&1
275                   
276                    (( i=0 ))
277                    until [ $i -ge $NbFiles ]; do
278                        (( i_ = i+1 ))
279                        eval file_out_=\${${ListFilesName}[$i_]} > /dev/null 2>&1
280                        eval file_out=${file_out_}
281                        (( i_ = i+3 ))
282                        eval Testvar_=\${${ListFilesName}[$i_]} > /dev/null 2>&1
283                        eval Testvar=${Testvar_}
284                        if [[ ${Testvar} =~ [0-9][DMY]$ ]] ; then
285                            eval PeriodPack_FileType=${Testvar}
286                            ((i = i+4))
287                        else
288                            PeriodPack_FileType=${PeriodPack}
289                            ((i = i+3))
290                        fi
291                        if [[ ${file_out} =~ ${myType} ]] ; then
292                            break
293                        fi
294                    done
295                fi
296                IGCM_debug_Print 1 "Check coherence between PackFrequency and PeriodLength"
297                IGCM_post_CheckModuloFrequency PeriodPack_FileType config_UserChoices_PeriodLength NbPeriodPerFrequency
298                # ------------------------------------------------------------------
299                # Test if all was right before proceeding further
300                # ------------------------------------------------------------------
301                IGCM_debug_Verif_Exit
302                # Initialize date_begin_pack
303                date_begin_pack=${DateBegin}
304                # Loop over period pack
305                while [ ${date_begin_pack} -le ${date_end_simulation} ] ; do
306                    DaysTemp=$( IGCM_date_DaysInCurrentPeriod ${date_begin_pack} ${PeriodPack_FileType} )
307                    date_end_pack=$( IGCM_date_AddDaysToGregorianDate ${date_begin_pack} $(( ${DaysTemp} - 1 )) )                   
308                    #
309        grep ${myType} liste_files.${dirID}.txt > liste_files.${dirID}.${myType}.txt
310        nbfile=0
311                    # If no surpack, no need to demigrate.
312                    if [ X${surpack_mode} = Xn ] ; then
313        for file in $( gawk '{print $11}' liste_files.${dirID}.${myType}.txt ); do
314          extract_date_file=$( echo ${file}  | sed -e "s/.*${JobName}_[0-9]*_//" )
315          date_file=$( echo ${extract_date_file} | sed 's/\([0-9]\{8\}\)_.*$/\1/g' )
316          # echo pack n°${number_pack}  ${date_file} ${date_begin_pack} ${date_end_pack}
317                        # Ajouter un test sur la date
318          if [ ${date_file} -le ${date_end_pack} ] && [ ${date_file} -ge ${date_begin_pack} ] ; then
319            echo ${file} >> liste_pack_${myType}_${date_begin_pack}_${date_end_pack}.txt
320            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
321            (( nbfile = nbfile + 1 ))
322          fi
323        done
324                    else
325                        for file in $( gawk '{print $11}' liste_files.${dirID}.${myType}.txt ); do
326                            extract_date_file=$( echo ${file}  | sed -e "s/.*${JobName}_[0-9]*_//" )
327                            date_file=$( echo ${extract_date_file} | sed 's/\([0-9]\{8\}\)_.*$/\1/g' )
328                        # echo pack n°${number_pack}  ${date_file} ${date_begin_pack} ${date_end_pack}
329                        # Ajouter un test sur la date
330                            if [ ${date_file} -le ${date_end_pack} ] && [ ${date_file} -ge ${date_begin_pack} ] ; then
331                                echo ${file} >> liste_pack_${myType}_${date_begin_pack}_${date_end_pack}.txt
332                                (( nbfile = nbfile + 1 ))
333                            fi
334                        done
335                        # If surpack_mode, archive demigration is needed on TGCC
336#-Q- irene-amd ccc_hsm get $( cat liste_pack_${myType}_${date_begin_pack}_${date_end_pack}.txt )
337#-Q- irene ccc_hsm get $( cat liste_pack_${myType}_${date_begin_pack}_${date_end_pack}.txt )
338                        for file in $( gawk '{print $11}' liste_files.${dirID}.${myType}.txt ); do
339                            extract_date_file=$( echo ${file}  | sed -e "s/.*${JobName}_[0-9]*_//" )
340                            date_file=$( echo ${extract_date_file} | sed 's/\([0-9]\{8\}\)_.*$/\1/g' )
341                        # echo pack n°${number_pack}  ${date_file} ${date_begin_pack} ${date_end_pack}
342                        # Ajouter un test sur la date
343                            if [ ${date_file} -le ${date_end_pack} ] && [ ${date_file} -ge ${date_begin_pack} ] ; then
344                                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
345                            fi
346                        done
347                    fi
348
349        if [ ${nbfile} = 0 ] ; then
350          IGCM_debug_Print 1 "We found no file to process"
351          IGCM_debug_Print 1 "We should have found ${NbPeriodPerFrequency} files"
352          IGCM_debug_Print 1 "As some files can be produced only for some selected period we consider we can move to the next file type"
353                        date_begin_pack=$( IGCM_date_AddDaysToGregorianDate ${date_end_pack} 1 )
354                        continue
355                    fi
356                    if [ X${surpack_mode} = Xy ] &&  [ ${nbfile} = 1 ] ; then
357                        IGCM_debug_Print 1 "Only 1 file to pack in surpack mode, nothing to be done"
358                        date_begin_pack=$( IGCM_date_AddDaysToGregorianDate ${date_end_pack} 1 )
359          continue
360        fi
361        # Select list of variables to work with
362        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 ',' )
363        liste_file_tmp=$( for i in $( cat liste_pack_${myType}_${date_begin_pack}_${date_end_pack}.txt ) ; do basename $i ; done )
364        # Create packed files
365        IGCM_debug_Print 1 "Ncrcat ongoing for ${dir} and ${myType}"
366                    if [ X${surpack_mode} = Xn ] ; then
367        if [ ! ${nbfile} = ${NbPeriodPerFrequency} ] ; then
368          IGCM_debug_Print 1 "Number of files to process is not equal to what it should be"
369          IGCM_debug_Print 1 "We found ${nbfile} files and it should have been ${NbPeriodPerFrequency} files"
370          IGCM_debug_Exit "ERROR in number of files to process. STOP HERE INCLUDING THE COMPUTING JOB"
371          IGCM_debug_Verif_Exit
372        fi
373        fi
374        output=${JobName}_${date_begin_pack}_${date_end_pack}_${myType}
375        #cat liste_pack_${myType}_${date_begin_pack}_${date_end_pack}.txt | xargs ncrcat -v ${list_var} -o ${output}
376        if [ X${list_var} = X ] ; then
377          IGCM_sys_ncrcat -p ${dir} ${liste_file_tmp} --output ${output}
378        else
379          IGCM_sys_ncrcat -x -v ${list_var} -p ${dir} ${liste_file_tmp} --output ${output}
380        fi
381        # ------------------------------------------------------------------
382        # Test if all was right before proceeding further
383        # ------------------------------------------------------------------
384        IGCM_debug_Verif_Exit
385        # Save it
386                    if [ X${surpack_mode} = Xy ] ; then
387                        IGCM_sys_Put_Out ${output} ${R_SAVE}/$( echo $dir | sed "s:${R_SAVE}/::" )/${output}
388                    else
389        IGCM_sys_Put_Out ${output} ${R_SAVE}/$( echo $dir | sed "s:${R_BUFR}/::" )/${output}
390                    fi
391        # Clean file produced by ncrcat
392        IGCM_sys_Rm ${output}
393        # ------------------------------------------------------------------
394        # Test if all was right before proceeding further
395        # ------------------------------------------------------------------
396        IGCM_debug_Verif_Exit
397        # Clean files used by ncrcat
398        cat liste_pack_${myType}_${date_begin_pack}_${date_end_pack}.txt | xargs rm
399        # Save the list of files that has been pack (ncrcat)
400        #mv liste_pack_${myType}_${date_begin_pack}_${date_end_pack}.txt ${STORE_DEBUG}
401        IGCM_debug_Print 1 "Ncrcat and cleaning done for ${dir} and ${myType}"
402        echo
403                    # Add 1 day to date_end_pack to have the new date_begin_pack
404                    date_begin_pack=$( IGCM_date_AddDaysToGregorianDate ${date_end_pack} 1 )
405      done
406    done
407  done
408done
409
410# Execute C-ESM-EP driver (which launches jobs)
411if [ $PostCesmep = Pack ] ; then
412    ${SUBMIT_DIR}/cesmep_lite/libIGCM_post.sh $DateBegin $DateEnd
413fi
414
415# Flush post-processing submission
416if [ X${surpack_mode} = Xn ] && [ ${StandAlone} = false ] ; then
417if [ -f ${R_BUFR}/FlushPost_${DateEnd}.ksh ] ; then
418  . ${R_BUFR}/FlushPost_${DateEnd}.ksh
419  IGCM_FlushPost
420  #IGCM_sys_Rm -f ${R_BUFR}/FlushPost_${DateEnd}.ksh
421fi
422fi
423# Clean RUN_DIR_PATH (necessary for cesium and titane only)
424IGCM_sys_RmRunDir -Rf ${RUN_DIR_PATH}
425
426# ------------------------------------------------------------------
427# Finalize BigBrother to inform that the jobs end
428# ------------------------------------------------------------------
429IGCM_debug_BigBro_Finalize
430
431date
Note: See TracBrowser for help on using the repository browser.