source: tags/libIGCM_v1_7/AA_create_ts @ 1137

Last change on this file since 1137 was 310, checked in by mafoipsl, 14 years ago

Put changeset [309] into libIGCM_v1_7. Use TMPDIR for mercure again. Correct CompletedFlag? initialisation. Delete useless echo. Correct 1st line or rebuild.ksh.

  • 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 Date Author Revision
File size: 33.3 KB
Line 
1#-Q- platine #!/usr/bin/ksh
2#-Q- platine ###################
3#-Q- platine ## PLATINE   CEA ##
4#-Q- platine ###################
5#-Q- platine #BSUB -J TS                     # Nom du job
6#-Q- platine #BSUB -N                        # message a la fin du job
7#-Q- platine #BSUB -n 1                      # reservation des processeurs pour le job
8#-Q- platine #BSUB -W 1:00                   # Limite temps
9#-Q- platine #BSUB -q post                   # Passage en queue post
10#-Q- sx8brodie #!/bin/ksh
11#-Q- sx8brodie #######################
12#-Q- sx8brodie ## SX8BRODIE   IDRIS ##
13#-Q- sx8brodie #######################
14#-Q- sx8brodie # Temps Elapsed max. d'une requete hh:mm:ss
15#-Q- sx8brodie # @ wall_clock_limit = 20:00:00
16#-Q- sx8brodie # Nom du travail LoadLeveler
17#-Q- sx8brodie # @ job_name   = TS
18#-Q- sx8brodie # Fichier de sortie standard du travail       
19#-Q- sx8brodie # @ output     = $(job_name).$(jobid)
20#-Q- sx8brodie # Fichier de sortie d'erreur du travail
21#-Q- sx8brodie # @ error      =  $(job_name).$(jobid)
22#-Q- sx8brodie # pour recevoir un mail en cas de depassement du temps Elapsed (ou autre pb.)
23#-Q- sx8brodie # @ notification = error
24#-Q- sx8brodie # @ environment  = $DEBUG_debug ; $MODIPSL ; $libIGCM ; $libIGCM_SX ; $SUBMIT_DIR ; $REBUILD_DIR ; $RebuildFromArchive ; $POST_DIR ; $MASTER ; $RebuildFrequency ; $PeriodDateBegin ; $PeriodDateEnd ; $NbRebuildDir ; $StandAlone ; $CompletedFlag ; $TsTask ; $CompToRead ; $FlagToRead ; $RESOL_ATM ; $RESOL_OCE ; $RESOL_ICE ; $RESOL_MBG ; $RESOL_SRF ; $RESOL_SBG ; $MASTER
25#-Q- aix6 #!/bin/ksh
26#-Q- aix6 #######################
27#-Q- aix6 ##   VARGAS   IDRIS  ##
28#-Q- aix6 #######################
29#-Q- aix6 # Temps Elapsed max. d'une requete hh:mm:ss
30#-Q- aix6 # @ wall_clock_limit = 20:00:00
31#-Q- aix6 # Nom du travail LoadLeveler
32#-Q- aix6 # @ job_name   = TS
33#-Q- aix6 # Fichier de sortie standard du travail
34#-Q- aix6 # @ output     = $(job_name).$(jobid)
35#-Q- aix6 # Fichier de sortie d'erreur du travail
36#-Q- aix6 # @ error      =  $(job_name).$(jobid)
37#-Q- aix6 # pour recevoir un mail en cas de depassement du temps Elapsed (ou autre pb.)
38#-Q- aix6 # @ notification = error
39#-Q- aix6 # @ environment  = $DEBUG_debug ; $MODIPSL ; $libIGCM ; $libIGCM_SX ; $SUBMIT_DIR ; $REBUILD_DIR ; $RebuildFromArchive ; $POST_DIR ; $MASTER ; $RebuildFrequency ; $DateBegin ; $PeriodDateBegin ; $PeriodDateEnd ; $NbRebuildDir ; $StandAlone ; $CompletedFlag ; $TsTask ; $CompToRead ; $FlagToRead ; $RESOL_ATM ; $RESOL_OCE ; $RESOL_ICE ; $RESOL_MBG ; $RESOL_SRF ; $RESOL_SBG ; $MASTER
40#-Q- aix6 # @ queue
41#-Q- sx8brodie # @ queue
42#-Q- sx8mercure #!/bin/ksh
43#-Q- sx8mercure ######################
44#-Q- sx8mercure ## SX8MERCURE   CEA ##
45#-Q- sx8mercure ######################
46#-Q- sx8mercure #PBS -N TS                   # Nom du job
47#-Q- sx8mercure #PBS -j o                    # regroupement des stdout et stderr
48#-Q- sx8mercure #PBS -S /usr/bin/ksh         # shell de soumission
49#-Q- sx8mercure #PBS -l memsz_job=1gb        # Limite memoire a 1 Go
50#-Q- sx8mercure #PBS -l cputim_job=24:00:00   # Limite temps a 2 heures
51#-Q- sx8mercure #PBS -q scalaire
52#-Q- sx9mercure #!/bin/ksh
53#-Q- sx9mercure ######################
54#-Q- sx9mercure ## SX9MERCURE   CEA ##
55#-Q- sx9mercure ######################
56#-Q- sx9mercure #PBS -N TS                   # Nom du job
57#-Q- sx9mercure #PBS -j o                    # regroupement des stdout et stderr
58#-Q- sx9mercure #PBS -S /usr/bin/ksh         # shell de soumission
59#-Q- sx9mercure #PBS -l memsz_job=1gb        # Limite memoire a 1 Go
60#-Q- sx9mercure #PBS -l cputim_job=24:00:00   # Limite temps a 2 heures
61#-Q- sx9mercure #PBS -q scalaire
62#-Q- titane #!/bin/ksh
63#-Q- titane ######################
64#-Q- titane ## TITANE   CEA ##
65#-Q- titane ######################
66#-Q- titane #MSUB -r TS             # Nom du job               
67#-Q- titane #MSUB -N 1              # Reservation du noeud
68#-Q- titane #MSUB -n 1              # Reservation du processus
69#-Q- titane #MSUB -T 86400          # Limite de temps elapsed du job
70#-Q- titane #MSUB -E "-j o"
71#-Q- titane #MSUB -E "-S /bin/ksh"
72#-Q- titane ##MSUB -e nco.out        # Sortie standard
73#-Q- titane ##MSUB -o nco.out        # Sortie standard
74#-Q- lxiv8 ######################
75#-Q- lxiv8 ## OBELIX      LSCE ##
76#-Q- lxiv8 ######################
77#-Q- lxiv8 #PBS -N TS
78#-Q- lxiv8 #PBS -m a
79#-Q- lxiv8 #PBS -j oe
80#-Q- lxiv8 #PBS -q medium
81#-Q- lxiv8 #PBS -o TS.$$
82#-Q- lxiv8 #PBS -S /bin/ksh
83#-Q- default #!/bin/ksh
84#-Q- default ##################
85#-Q- default ## DEFAULT HOST ##
86#-Q- default ##################
87
88# $Date$
89# $Author$
90# $Revision$
91# IPSL (2006)
92#  This software is governed by the CeCILL licence see libIGCM/libIGCM_CeCILL.LIC
93
94#set -eu
95#set -vx
96
97date
98
99#-Q- sx8brodie export OMP_NUM_THREADS=1
100#-Q- aix6 export OMP_NUM_THREADS=1
101
102########################################################################
103
104#D- Flag to determine if this job in a standalone mode
105#D- Default : value from AA_job if any
106StandAlone=${StandAlone:=true}
107
108#D- Low level debug : to bypass lib test checks and stack construction
109#D- Default : value from AA_job if any
110libIGCM=${libIGCM:=::modipsl::/libIGCM}
111# WARNING for StandAlone used : To run this script on some machine,
112# you must check MirrorlibIGCM variable in sys library.
113# If this variable is true, you must use libIGCM_POST path instead
114# of your running libIGCM directory.
115
116#D- Flag to determine allready produced time series. Empty if you start from the beginning
117#D- Default : Value from AA_job if any. Usefull in StandAlone case if you want to continue a time series
118CompletedFlag=${CompletedFlag:=}
119
120#D- Flag to determine task type this script will perform.
121#D- Possible Value : 2D, 3D, Chunck2D, Chunck3D
122#D- Default : Value from AA_job if any. Usefull in StandAlone case.
123TsTask=${TsTask:=2D}
124if [ X${TsTask} = Xempty ] ; then
125    TsTask=""
126fi
127
128#D- Flag to determine if rebuild process has been performed asynchronously
129#D- Possible value true or false.
130#D- If true raw files has allready been patched by rebuild job
131#D- If false create_ts will patch the raw files
132#D- Default : Value from AA_job if any. Usefull in StandAlone case.
133RebuildFrequency=${RebuildFrequency:=true}
134
135#D- Flag to determine job's output directory
136#D- Default : value from libIGCM_post.ksh if any
137POST_DIR=${POST_DIR:=${PBS_O_WORKDIR}}
138
139#D- Increased verbosity (1, 2, 3)
140#D- Default : value from AA_job if any
141Verbosity=${Verbosity:=3}
142
143#D- Low level debug : to bypass lib test checks and stack construction
144#D- Default : value from AA_job if any
145DEBUG_debug=${DEBUG_debug:=false}
146
147#D- TEMPORARY Flag to determine atmospheric resolution
148#D- Default : value from atmospheric driver if any
149RESOL_ATM=ALL
150
151#D- Flag to determine surface resolution
152#D- Default : value from surface driver if any
153RESOL_SRF=ALL
154
155#D- Flag to determine surface resolution
156#D- Default : value from surface driver if any
157RESOL_SBG=ALL
158
159#D- TEMPORARY Flag to determine ocean resolution
160#D- Default : value from ocean driver if any
161RESOL_OCE=${RESOL_OCE:=ORCA2}
162
163#D- TEMPORARY Flag to determine ice resolution
164#D- Default : value from ice driver if any
165RESOL_ICE=${RESOL_ICE:=ORCA2}
166
167#D- TEMPORARY Flag to determine marine biogeochemistry resolution
168#D- Default : value from ice driver if any
169RESOL_MBG=${RESOL_MBG:=ORCA2}
170
171########################################################################
172
173. ${libIGCM}/libIGCM_debug/libIGCM_debug.ksh
174      ( ${DEBUG_debug} ) && IGCM_debug_Check
175. ${libIGCM}/libIGCM_card/libIGCM_card.ksh
176     ( ${DEBUG_debug} ) && IGCM_card_Check
177. ${libIGCM}/libIGCM_date/libIGCM_date.ksh
178     ( ${DEBUG_debug} ) && IGCM_date_Check
179#-------
180. ${libIGCM}/libIGCM_sys/libIGCM_sys.ksh
181
182########################################################################
183
184#set -vx
185
186# Useful cleaning function
187MENAGE () 
188{
189    [ -f $3 ] && ( IGCM_sys_RshArchive rm -f $1/$2 ;)
190}
191
192########################################################################
193
194IGCM_sys_MkdirWork ${RUN_DIR_PATH}
195IGCM_sys_Cd ${RUN_DIR_PATH}
196
197if [ ${StandAlone} = true ] ; then
198    CARD_DIR=${SUBMIT_DIR}
199else
200    CARD_DIR=${RUN_DIR_PATH}/$( basename ${SUBMIT_DIR} )
201    IGCM_sys_Get_Master ${SUBMIT_DIR} ${RUN_DIR_PATH}
202fi
203
204#
205# First of all
206#
207IGCM_card_DefineArrayFromSection       ${CARD_DIR}/config.card UserChoices
208typeset option
209for option in ${config_UserChoices[*]} ; do
210    IGCM_card_DefineVariableFromOption ${CARD_DIR}/config.card UserChoices ${option}
211done
212#
213echo
214IGCM_debug_Print 1 "DefineArrayFromOption  : config_UserChoices"
215IGCM_debug_PrintVariables 3 config_UserChoices_JobName
216IGCM_debug_PrintVariables 3 config_UserChoices_LongName
217IGCM_debug_PrintVariables 3 config_UserChoices_TagName
218IGCM_debug_PrintVariables 3 config_UserChoices_SpaceName
219IGCM_debug_PrintVariables 3 config_UserChoices_ExperimentName
220IGCM_debug_PrintVariables 3 config_UserChoices_CalendarType
221IGCM_debug_PrintVariables 3 config_UserChoices_DateBegin
222IGCM_debug_PrintVariables 3 config_UserChoices_DateEnd
223IGCM_debug_PrintVariables 3 config_UserChoices_PeriodLength
224echo
225
226#==================================
227#R_SAVE : Job output directory
228if ( [ ! X${config_UserChoices_SpaceName} = X ] && [ ! X${config_UserChoices_ExperimentName} = X ] ) ; then
229    FreeName=$( echo ${config_UserChoices_JobName} | sed 's/.*_//' )
230    R_SAVE=${R_OUT}/${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${FreeName}
231    R_DODS=${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${FreeName}
232else
233    R_SAVE=${R_OUT}/${config_UserChoices_TagName}/${config_UserChoices_JobName}
234    R_DODS=${config_UserChoices_TagName}/${config_UserChoices_JobName}
235fi
236#
237# Determine component to take care of depending on kind of task create_ts will perform
238#
239( [ X${TsTask} = XChunck2D ] || [ X${TsTask} = XChunck3D ] ) && set -A config_ListOfComponents ${CompToRead} || IGCM_card_DefineArrayFromSection ${CARD_DIR}/config.card ListOfComponents
240#
241# Determine period for time series. Default : value from AA_job or from launch_TS if any
242#
243[ X${CompletedFlag} = X ] || CompletedFlag=$( IGCM_date_ConvertFormatToGregorian ${CompletedFlag} )
244
245DateBegin=${DateBegin:=$( IGCM_date_ConvertFormatToGregorian ${config_UserChoices_DateBegin} )}
246#
247PeriodDateEnd=${PeriodDateEnd:=$( IGCM_date_ConvertFormatToGregorian ${config_UserChoices_DateEnd} )}
248#
249# Determine Dimension of the produced time series : 2D or 3D
250if (   [ X${TsTask} = XChunck2D ] || [ X${TsTask} = X2D ] ) ; then
251    Dimension=2D
252elif ( [ X${TsTask} = XChunck3D ] || [ X${TsTask} = X3D ] ) ; then
253    Dimension=3D
254else
255    Dimension=""
256fi
257
258
259########################################################################
260#
261#      Depending on requested time series fill following variables :
262#
263#                           - LISTE_FILE_${comp}[*]
264#                           - LISTE_VARS_${file}[*]
265#                           - LISTE_AXIS_${file}[*]
266#                           - LISTE_PATCH_${file}[*]
267########################################################################
268
269#
270# For each selected component determine which files need post-processing
271#
272DoJob=false
273for comp in ${config_ListOfComponents[*]} ; do
274    #
275    ActiveComp=false
276    #
277    IGCM_card_DefineArrayFromOption ${CARD_DIR}/config.card ListOfComponents ${comp}
278    eval compname=\${config_ListOfComponents_${comp}[0]} > /dev/null 2>&1
279    #
280    card=${CARD_DIR}/COMP/${compname}.card
281
282    IGCM_card_DefineArrayFromOption ${card} OutputFiles List
283    #
284    ListFilesName=${compname}_OutputFiles_List
285    eval FileName0=\${${ListFilesName}[0]} > /dev/null 2>&1
286    #
287    if [ X${FileName0} != X${NULL_STR} ] ; then
288        #
289        #IGCM_debug_Print 1 "Component      : ${compname}"
290        #
291        # INITIALISATION
292        #
293        typeset i
294        if ( [ X${TsTask} = XChunck2D ] || [ X${TsTask} = XChunck3D ] ) ; then
295            ((NbFiles=${FlagToRead}))
296            ((i=${NbFiles}))
297        else
298            eval NbFiles=\${#${ListFilesName}[@]} > /dev/null 2>&1
299            i=2
300        fi
301        #
302        until [ $i -gt $NbFiles ]; do
303            #
304            eval flag_post=\${${ListFilesName}[$i]} > /dev/null 2>&1
305            #
306            if [ X${flag_post} != XNONE ] ; then
307                #
308                # For each comp and each file who needs post-processing
309                # determine which variables need time series.
310                #
311                FILE=$( echo ${flag_post} | awk "-FPost_" '{print $2}' )
312                IGCM_card_DefineArrayFromOption ${card}    Post_${FILE} TimeSeriesVars${Dimension}
313                IGCM_card_DefineVariableFromOption ${card} Post_${FILE} ChunckJob${Dimension}
314                #
315                # If TimeSeriesVars list is empty we skip
316                #
317                if [ $( eval echo \${${compname}_Post_${FILE}_TimeSeriesVars${Dimension}} ) = ${NULL_STR} ] ; then
318                    #
319                    IGCM_debug_Print 3 "Nothing to do for ${FILE} according to ${card}"
320                    IGCM_debug_Print 3 "TimeSeriesVars${Dimension} for ${FILE} is empty"
321                    (( i=i+3 ))
322                    continue
323                    #
324                fi
325                #
326                # If files/variables has been switch off by ChunckJob${Dimension}=0 we skip
327                #
328                if [ X$( eval echo \${${compname}_Post_${FILE}_ChunckJob${Dimension}} ) = XOFF ] ; then
329                    IGCM_debug_Print 3 "Nothing to do for ${FILE} according to ${card}"
330                    IGCM_debug_Print 3 "ChunckJob${Dimension}=OFF for ${FILE} so it has been switched off"
331                    (( i=i+3 ))
332                    continue
333                fi
334                #
335                # If we are not a Chunck type task, we skip files/variables handled by chunck task
336                #
337                if ( [ ! X${TsTask} = XChunck${Dimension} ] && [ ! X${TsTask} = X ] && [ ! XChunck${Dimension} = XChunck ] ) ; then
338                    if [ ! $( eval echo \${${compname}_Post_${FILE}_ChunckJob${Dimension}} ) = NONE ] ; then
339                        IGCM_debug_Print 3 "Nothing to do for ${FILE} TimeSeriesVars${Dimension} according to ${card}"
340                        IGCM_debug_Print 3 "Let another chunck task do the job $( eval echo \${${compname}_Post_${FILE}_ChunckJob${Dimension}} )"
341                        (( i=i+3 ))
342                        continue
343                    fi
344                fi
345                #
346                # Now on we know we have things to do
347                #
348
349                #
350                #  We need coordinates axis to properly fill produced time series
351                #
352                IGCM_card_DefineArrayFromOption ${card} Post_${FILE} GatherWithInternal
353                #
354                if [ $( eval echo \${${compname}_Post_${FILE}_GatherWithInternal} ) = ${NULL_STR} ] ; then
355                    #
356                    IGCM_debug_Print 1 "ERROR !! We miss coordinate axis for ${FILE} according to ${card}"
357                    IGCM_debug_Print 1 "So no time series will be produced for ${FILE} !!"
358                    (( i=i+3 ))
359                    continue
360                    #
361                fi
362                #
363                # We need LIST of variables not allready produced (useful for standalone mode)
364                #
365                FlagDir=$( echo ${FILE} | awk -F "_" '{print $1}' )
366                case ${FlagDir} in
367                    *Y)  TS_Dir=TS_YE  ;;
368                    *M)  TS_Dir=TS_MO  ;;
369                    *D)  TS_Dir=TS_DA  ;;
370                    HF)  TS_Dir=TS_HF  ;;
371                    3H)  TS_Dir=TS_HF  ;;
372                    INS) TS_Dir=TS_INS ;;
373                esac
374                #
375                count=0
376                for var in $( eval echo \${${compname}_Post_${FILE}_TimeSeriesVars${Dimension}[*]} ) ; do
377                    #
378                    DIRECTORY=${R_SAVE}/${comp}/Analyse/${TS_Dir}
379                    TestedFile=${config_UserChoices_JobName}_${DateBegin}_${PeriodDateEnd}_${FlagDir}_${var}.nc
380                    #
381                    IGCM_sys_TestFileArchive ${DIRECTORY}/${TestedFile}
382                    if [ ! $? = 0 ] ; then
383                        eval set +A LISTE_VARS_${FILE} \${LISTE_VARS_${FILE}[*]} ${var}
384                        ActiveComp=true
385                        (( count = count + 1 ))
386                    fi
387                done
388                #
389                if [ ${count} -gt 0 ] ; then
390                    #
391                    eval set +A LISTE_FILE_${comp} \${LISTE_FILE_${comp}[*]} ${FILE}
392                    eval set +A LISTE_AXIS_${FILE} \${${compname}_Post_${FILE}_GatherWithInternal[*]}
393                    #
394                    if [ ! X${RebuildFrequency} = Xtrue ] ; then
395                        IGCM_card_DefineArrayFromOption ${card} Post_${FILE} Patches
396                        eval set +A LISTE_PATCHES_${FILE} \${${compname}_Post_${FILE}_Patches[*]}
397                        if [ X$( eval echo \${LISTE_PATCHES_${FILE}[0]} ) !=  X${NULL_STR} ]; then
398                            for Patch in $( eval echo \${LISTE_PATCHES_${FILE}[*]} ); do
399                                if [ Xload${Patch} != X ] ; then
400                                    . ${libIGCM}/libIGCM_post/IGCM_${Patch}.ksh
401                                    eval load${Patch}=loaded
402                                fi
403                            done
404                        fi
405                    fi
406                fi
407            fi
408            (( i=i+3 ))
409        done
410    fi
411    #
412    if [ ${ActiveComp} = true ] ; then
413        set +A ActiveListOfComponents ${ActiveListOfComponents[*]} ${comp}
414    fi
415done
416
417set -A config_ListOfComponents ${ActiveListOfComponents[*]}
418[ ! -z "${ActiveListOfComponents}" ] && DoJob=true
419
420########################################################################
421#
422#                          DEFINE DATE FUNCTIONS
423#
424########################################################################
425
426# Give the end of the next $1 period from $2 date
427function create_ts_next_date {
428    IGCM_debug_PushStack "create_ts_next_date" $@
429    typeset Length
430    case ${config_UserChoices_PeriodLength} in
431        *Y|*y) 
432            PeriodLengthInYears=$( echo ${config_UserChoices_PeriodLength} | awk -F '[yY]' '{print $1}' )
433            IGCM_date_GetYearMonth ${1} year month
434            year=$( IGCM_date_SupressZeros ${year} )
435            (( Length=0 ))
436            (( i=0 ))
437            until [ $i -ge $PeriodLengthInYears ] ; do
438                (( Length = Length + $( IGCM_date_DaysInYear $(( year + i + 1 )) ) )) 
439                (( i=i+1 ))
440            done
441            ;;
442        *M|*m) 
443            PeriodLengthInMonths=$( echo ${config_UserChoices_PeriodLength} | awk -F '[mM]' '{print $1}' )
444            IGCM_date_GetYearMonth ${1} year month
445            year=$( IGCM_date_SupressZeros ${year} )
446            (( year0 = year ))
447            if [ $(( month + 1 )) -lt 13 ] ; then
448                month0=$(( month + 1 ))
449            else
450                month0=$(( month + 1 - 12 ))
451                (( year = year0 + 1 ))
452            fi
453            (( Length=0 ))
454            (( i=0 ))
455            until [ $i -ge $PeriodLengthInMonths ] ; do
456                if [ $(( month0 + i )) -lt 13 ] ; then
457                    (( Length = Length + $( IGCM_date_DaysInMonth $year $(( month0 + i )) ) ))
458                else
459                    (( year = year0 + 1 ))
460                    (( Length = Length + $( IGCM_date_DaysInMonth $year $(( month0 + i - 12 )) ) ))
461                fi
462                (( i=i+1 ))
463            done
464            ;;
465        *D|*d)
466            Length=$( echo ${config_UserChoices_PeriodLength} | sed -e "s/[dD]//" ) ;;
467        *)
468            IGCM_debug_Exit "create_ts " ${config_UserChoices_PeriodLength} " invalid PeriodLength : choose in 1Y, *M, *D."
469            IGCM_debug_Verif_Exit_Post ;;
470    esac
471    echo ${Length}
472
473    IGCM_debug_PopStack "create_ts_next_date"
474}
475
476# Give the end of the actual $1 period from $2 date
477function create_ts_begin_date {
478    IGCM_debug_PushStack "create_ts_begin_date" $@
479    typeset Length
480    case ${config_UserChoices_PeriodLength} in
481        *Y|*y) 
482            PeriodLengthInYears=$( echo ${config_UserChoices_PeriodLength} | awk -F '[yY]' '{print $1}' )
483            IGCM_date_GetYearMonth ${1} year month
484            year=$( IGCM_date_SupressZeros ${year} )
485            if [ X${2} = Xend ] ; then
486                (( year = year - PeriodLengthInYears + 1))
487            fi
488            (( Length=0 ))
489            (( i=0 ))
490            until [ $i -ge $PeriodLengthInYears ] ; do
491                (( Length = Length + $( IGCM_date_DaysInYear $(( year + i )) ) )) 
492                (( i=i+1 ))
493            done
494            ;;
495        *M|*m) 
496            PeriodLengthInMonths=$( echo ${config_UserChoices_PeriodLength} | awk -F '[mM]' '{print $1}' )
497            IGCM_date_GetYearMonth ${1} year month
498            year=$( IGCM_date_SupressZeros ${year} )
499            if [ X${2} = Xend ] ; then
500                (( month = month - PeriodLengthInMonths + 1 ))
501            fi     
502            (( year0 = year ))
503            if [ $month -le 0 ] ; then
504                (( month = month + 12 ))
505                year=$( printf "%04i\n" $(( year - 1 )) )
506            fi
507            month=$( printf "%02i\n" ${month} )
508            (( Length=0 ))
509            (( i=0 ))
510            until [ $i -ge $PeriodLengthInMonths ] ; do
511                if [ $(( month + i )) -lt 13 ] ; then
512                    (( Length = Length + $( IGCM_date_DaysInMonth $year $(( month + i )) ) ))
513                else
514                    (( year = year0 + 1 ))
515                    (( Length = Length + $( IGCM_date_DaysInMonth $year $(( month + i - 12 )) ) ))
516                fi
517                (( i=i+1 ))
518            done
519            ;;
520        *D|*d)
521            Length=$( echo ${config_UserChoices_PeriodLength} | sed -e "s/[dD]//" ) ;;
522        *)
523            IGCM_debug_Exit "create_ts " ${config_UserChoices_PeriodLength} " invalid PeriodLength : choose in 1Y, *M, *D."
524            IGCM_debug_Verif_Exit_Post ;;
525    esac
526    echo ${Length}
527
528    IGCM_debug_PopStack "create_ts_begin_date"
529}
530
531########################################################################
532#
533#               IS THERE SOME ALLREADY PRODUCED TIME SERIES ?
534#                 IF SO BRING THEM IN THE WORKING DIRECTORY
535#
536# PS : Keep in mind that IGCM_sys_Get here is a weak link :
537#      - especially for IDRiS
538#      - no special protection against "command too long" !
539#      - libIGCM_sys should handle that or modify following code part
540#
541########################################################################
542
543if [ ${StandAlone} != true ] ; then
544    Running_Flag=$( IGCM_sys_RshMaster "IGCM_card_DefineVariableFromOption \
545       ${SUBMIT_DIR}/run.card PostProcessing TimeSeriesRunning ; \
546       echo \${run_PostProcessing_TimeSeriesRunning}" )
547
548    #if [ X${Running_Flag} = Xy ] ; then
549    #    # Time Series Job allready running
550    #   IGCM_debug_Print 1 "Time Series Job allready running exit"
551    #   exit
552    #fi
553    # Now run.card know we are running
554
555
556
557
558    IGCM_sys_RshMaster IGCM_card_WriteOption ${SUBMIT_DIR}/run.card PostProcessing TimeSeriesRunning "y"
559
560
561
562
563
564    # Get information from last execution
565    #CompletedFlag=$( IGCM_sys_RshMaster \
566    #   "IGCM_card_DefineVariableFromOption ${SUBMIT_DIR}/run.card PostProcessing TimeSeriesCompleted ;\
567    #        echo \${run_PostProcessing_TimeSeriesCompleted}" )
568fi
569
570# Is it the first submission or not ?
571
572if ( [ X${CompletedFlag} = X ] || [ X${CompletedFlag} = X$( IGCM_date_AddDaysToGregorianDate ${DateBegin} -1 ) ] ) ; then
573    # First Time Series Submission
574    FIRST_PASS=TRUE
575    Length=$( create_ts_begin_date ${DateBegin} begin)
576    DATE_FIN_JOB_B=$( IGCM_date_AddDaysToGregorianDate ${DateBegin} $(( Length - 1 )) )
577else
578    # Last Completed Time Series
579    FIRST_PASS=FALSE
580    DATE_FIN_JOB_B=${CompletedFlag}
581    date=${DateBegin}_${DATE_FIN_JOB_B}
582    for comp in ${config_ListOfComponents[*]} ; do
583        #
584        IGCM_sys_Mkdir ${RUN_DIR_PATH}/${comp}
585        #
586        IGCM_sys_Cd ${RUN_DIR_PATH}/${comp}
587        #
588        #set -A liste_file
589        unset liste_file
590        #
591        file_path=${R_SAVE}/${comp}/Analyse
592        #
593        i=0
594        file=${NULL_STR}
595        #
596        for file in $( eval echo \${LISTE_FILE_${comp}[*]} ); do
597            #
598            # Determine in which output can we find file
599            # IE : Analyse/TS or Analyse/DA2TS or ...
600            #
601            FlagDir=$( echo ${file} | awk -F "_" '{print $1}' )
602            case ${FlagDir} in
603                *Y)  TS_Dir=TS_YE  ;;
604                *M)  TS_Dir=TS_MO  ;;
605                *D)  TS_Dir=TS_DA  ;;
606                HF)  TS_Dir=TS_HF  ;;
607                3H)  TS_Dir=TS_HF  ;;
608                INS) TS_Dir=TS_INS ;;
609            esac
610            for var in $( eval echo \${LISTE_VARS_${file}[*]} ) ; do
611                #
612                #set +A liste_file ${liste_file[*]} ${file_path}/${TS_Dir}/${config_UserChoices_JobName}_${date}_${FlagDir}_${var}.nc
613                liste_file[${#liste_file[*]}]=${file_path}/${TS_Dir}/${config_UserChoices_JobName}_${date}_${FlagDir}_${var}.nc
614                #
615            done
616        done
617        if [ X${file} != X${NULL_STR} ] ; then
618            IGCM_sys_Get /l liste_file[*] ${RUN_DIR_PATH}/${comp}
619            ExitFlag=false
620            IGCM_debug_Verif_Exit_Post
621        fi
622    done
623    #
624    LEVEL=0
625    #
626fi
627
628########################################################################
629#
630#                          DEFINE LOOP PARAMETERS
631#
632########################################################################
633
634DATE_COUNT=${DATE_FIN_JOB_B}
635DATE_FIN_JOB_B_LOOP=${DATE_FIN_JOB_B}
636
637( [ -n "${LEVEL}" ] && [ ${LEVEL} -eq 0 ] ) && NBRE_FILE_TOT=0 || NBRE_FILE_TOT=1
638
639if [ ${DoJob} = true ] ; then
640    while [ ${DATE_COUNT} -lt ${PeriodDateEnd} ] ; do
641        (( NBRE_FILE_TOT = NBRE_FILE_TOT + 1 ))
642        Length=$( create_ts_next_date ${DATE_COUNT} )
643        DATE_COUNT=$( IGCM_date_AddDaysToGregorianDate ${DATE_COUNT} ${Length} )
644    done
645else
646    NBRE_FILE_TOT=0
647fi
648
649if [ ${NBRE_FILE_TOT} -le ${UNIX_MAX_LIMIT} ] ; then
650    NBRE_TOUR=1
651elif [ ${NBRE_FILE_TOT}%${UNIX_MAX_LIMIT} -eq 0 ] ; then
652    let NBRE_TOUR=${NBRE_FILE_TOT}/${UNIX_MAX_LIMIT} 
653else
654    let NBRE_TOUR=${NBRE_FILE_TOT}/${UNIX_MAX_LIMIT}+1
655fi
656
657CURRENT_LOOP=1
658# THIS LOOP GIVES PARAMETERS FOR THE DATE'S LOOP ie : DATE_COURANTE, DATE_FIN.
659# WE HAVE 3 LEVELS
660#    - LEVEL 1 : JUST ONE LOOP TO COMPLETE
661#    - LEVEL 2 : WE ARE IN THE "DEEP" LOOP
662#    - LEVEL 3 : WE ARE IN THE LAST LOOP
663
664while [ ${CURRENT_LOOP} -le  ${NBRE_TOUR} ] ; do
665     
666    if [ ${NBRE_FILE_TOT} -le ${UNIX_MAX_LIMIT} ] ; then 
667        # - LEVEL 1 : JUST ONE LOOP TO COMPLETE
668        NBRE_FILE_LOOP=${NBRE_FILE_TOT}
669
670        if [ ${FIRST_PASS} = TRUE ] ; then
671            DATE_COURANTE=${DATE_FIN_JOB_B_LOOP}
672        else
673            Length=$( create_ts_next_date ${DATE_FIN_JOB_B_LOOP} )
674            DATE_COURANTE=$( IGCM_date_AddDaysToGregorianDate ${DATE_FIN_JOB_B_LOOP} ${Length} )
675        fi
676
677        DATE_FIN=${PeriodDateEnd}
678        DATE_FIN_JOB_B_LOOP_PREC=${DATE_FIN_JOB_B_LOOP}
679
680        [ -n "${DATE_LOOP}" ] && DATE_FIN_JOB_B_LOOP=${DATE_LOOP}
681        [ -n "${LEVEL}" ] && FLAG_B="TRUE" || FLAG_B="FALSE"
682
683        LEVEL=1
684        DEPOT="TRUE"     
685    elif [ ${CURRENT_LOOP} -ne  ${NBRE_TOUR} ] ; then
686        # - LEVEL 2 : WE ARE IN THE "DEEP" LOOP
687        NBRE_FILE_LOOP=${UNIX_MAX_LIMIT}
688
689        if [ ! ${FIRST_PASS} = TRUE ] && [ ${CURRENT_LOOP} -eq 1 ] ; then
690            Length=$( create_ts_next_date ${DATE_FIN_JOB_B_LOOP} )
691            DATE_COURANTE=$( IGCM_date_AddDaysToGregorianDate ${DATE_FIN_JOB_B_LOOP} ${Length} )
692        elif [ -z "${DATE_COURANTE}" ] ; then
693            DATE_COURANTE=${DATE_FIN_JOB_B}
694        else
695            Length=$( create_ts_next_date ${DATE_FIN} )
696            DATE_COURANTE=$( IGCM_date_AddDaysToGregorianDate ${DATE_FIN} ${Length} )
697        fi
698         
699        (( TotLength = 0 ))
700        COMPTEUR=1
701        DATE_LOOP=${DATE_COURANTE}
702
703        while [ ${COMPTEUR} -lt ${NBRE_FILE_LOOP} ] ; do
704            #
705            Length=$( create_ts_next_date ${DATE_LOOP} )
706            DATE_LOOP=$( IGCM_date_AddDaysToGregorianDate ${DATE_LOOP} ${Length} )
707            (( TotLength = TotLength + Length ))
708            (( COMPTEUR = COMPTEUR + 1 ))
709            #
710        done # while [ ${COMPTEUR} -le ${NBRE_FILE_LOOP} ] done
711        DATE_FIN=$( IGCM_date_AddDaysToGregorianDate ${DATE_COURANTE} ${TotLength} )
712
713        [ -n "${DATE_LOOP}" ] && DATE_FIN_JOB_B_LOOP_PREC=${DATE_FIN_JOB_B_LOOP} ; DATE_FIN_JOB_B_LOOP=${DATE_LOOP}
714        [ -n "${LEVEL}" ] && [ ${LEVEL} -eq 0 ] && FLAG_B="TRUE" || [ ${CURRENT_LOOP} -gt 1 ] && FLAG_B="TRUE" || FLAG_B="FALSE"
715        DEPOT="FALSE"
716        LEVEL=2
717    else
718        # - LEVEL 3 : WE ARE IN THE LAST LOOP
719        NBRE_FILE_LOOP=$(( ${NBRE_FILE_TOT} % ( ${UNIX_MAX_LIMIT} * ( ${CURRENT_LOOP} - 1 ) ) ))
720        [ ${NBRE_FILE_LOOP} -eq 0 ] && NBRE_FILE_LOOP=${UNIX_MAX_LIMIT}
721
722        Length=$( create_ts_next_date ${DATE_FIN} )
723        DATE_COURANTE=$(IGCM_date_AddDaysToGregorianDate ${DATE_FIN} ${Length} )
724        DATE_FIN=${PeriodDateEnd}
725        [ -n "${DATE_LOOP}" ] && DATE_FIN_JOB_B_LOOP_PREC=${DATE_FIN_JOB_B_LOOP} ; DATE_FIN_JOB_B_LOOP=${DATE_LOOP}
726
727        LEVEL=3
728        DEPOT="TRUE"
729        FLAG_B="TRUE"
730    fi
731
732    # THEN FOR EACH FILE TYPE WE LOOP BETWEEN DATE_COURANTE AND DATE_FIN.
733    for comp in ${config_ListOfComponents[*]} ; do
734        #
735        IGCM_sys_Mkdir ${RUN_DIR_PATH}/${comp}
736        #
737        IGCM_sys_Cd ${RUN_DIR_PATH}/${comp}
738        #
739        eval R_OUT_${comp}=${R_SAVE}/${comp}
740        #
741        i=0
742        #
743        for file in $( eval echo \${LISTE_FILE_${comp}[*]} ); do
744            #
745            # Determine in which output can we find file
746            # IE : Output/MO or Output/DA or ...
747            #
748            FlagDir=$( echo ${file} | awk -F "_" '{print $1}' )
749            case ${FlagDir} in
750                *Y)    TS_Dir=TS_YE  ; FreqDir=YE  ;;
751                *M)    TS_Dir=TS_MO  ; FreqDir=MO  ;;
752                *D)    TS_Dir=TS_DA  ; FreqDir=DA  ;;
753                HF)    TS_Dir=TS_HF  ; FreqDir=HF  ;;
754                3H)    TS_Dir=TS_HF  ; FreqDir=HF  ;;
755                INS)   TS_Dir=TS_INS ; FreqDir=INS ;;
756                *) 
757                       IGCM_debug_Print 1 "Error in FlagDir=${FlagDir} for file ${file}."
758                       IGCM_sys_Exit "Job create_ts" ;;
759            esac
760
761            # Initialize array
762            #set -A liste_file
763            #set -A liste_file_tmp
764            unset liste_file
765            unset liste_file_tmp
766            eval file_path=\${R_OUT_${comp}}/Output/${FreqDir}/
767
768            COMPTEUR=1
769            DATE_LOOP=${DATE_COURANTE}
770
771            while [ ${COMPTEUR} -le ${NBRE_FILE_LOOP} ] ; do
772                #
773                Length1=$( create_ts_begin_date ${DATE_LOOP} end)
774                DATE_TAB=$(  IGCM_date_AddDaysToGregorianDate ${DATE_LOOP} $(( 1 - Length1 )) )_${DATE_LOOP}
775
776                Length2=$( create_ts_next_date ${DATE_LOOP} end)
777                DATE_LOOP=$( IGCM_date_AddDaysToGregorianDate ${DATE_LOOP} ${Length2} )
778
779                #set +A liste_file ${liste_file[*]} ${file_path}${config_UserChoices_JobName}_${DATE_TAB}_${file}.nc
780                #set +A liste_file_tmp ${liste_file_tmp[*]} ${config_UserChoices_JobName}_${DATE_TAB}_${file}.nc
781                liste_file[${#liste_file[*]}]=${file_path}${config_UserChoices_JobName}_${DATE_TAB}_${file}.nc
782                liste_file_tmp[${#liste_file_tmp[*]}]=${config_UserChoices_JobName}_${DATE_TAB}_${file}.nc
783                (( COMPTEUR = COMPTEUR + 1 ))
784                #
785            done # while [ ${COMPTEUR} -le ${NBRE_FILE_LOOP} ] done
786            DATE_LOOP=$( IGCM_date_AddDaysToGregorianDate ${DATE_LOOP} -${Length2} )
787
788            # Get selected files
789            IGCM_sys_Get /l liste_file[*] ${RUN_DIR_PATH}/${comp}
790            ExitFlag=false
791            IGCM_debug_Verif_Exit_Post
792
793            # Apply IGCM_Patch if needed
794            if [ ! X${RebuildFrequency} = Xtrue ] ; then
795                if [ X$( eval echo \${LISTE_PATCHES_${file}[0]} ) !=  X${NULL_STR} ]; then
796                    for file_t in $( eval echo ${liste_file_tmp[*]} ); do               
797                        for Patch in $( eval echo \${LISTE_PATCHES_${file}[*]} ); do
798                            IGCM_${Patch} ${file_t}
799                        done
800                    done
801                fi
802            fi
803
804            # WE CAN CONCATENATE FILES AT THIS POINT
805            [ "${FLAG_B}" = "TRUE" ] && DATE_BUILD_B=${DateBegin}_${DATE_FIN_JOB_B_LOOP_PREC}
806            Length=$( create_ts_begin_date ${DATE_COURANTE} end)
807            DATE_BUILD1=$( IGCM_date_AddDaysToGregorianDate ${DATE_COURANTE} -$(( Length - 1 )) )
808            DATE_BUILD=${DATE_BUILD1}_${DATE_FIN}
809            DATE_BUILD_END=${DateBegin}_${DATE_FIN}
810
811            liste_coord=" "
812            for axis in $( eval echo \${LISTE_AXIS_${file}[*]} ); do
813              liste_coord=${liste_coord}${axis}","
814            done
815
816            # Time axis must be the last dimension
817            time_axis=${axis}
818
819            # SWITCH BETWEEN MODEL TO FIT PARTICULAR CASE
820            for var in $( eval echo \${LISTE_VARS_${file}[*]} ) ; do
821                #
822                IGCM_sys_ncrcat --hst -v ${liste_coord}${var} ${liste_file_tmp[*]} ${config_UserChoices_JobName}_${DATE_BUILD}_${FlagDir}_${var}.nc
823                #
824#                 # Change time axis name to be CF compliant
825#                 if [ ${time_axis} != time_counter ]; then
826#                   IGCM_sys_ncrename -O -v ${time_axis},time_counter ${config_UserChoices_JobName}_${DATE_BUILD}_${FlagDir}_${var}.nc
827#                 fi
828                #
829                if [ "${FLAG_B}" = "TRUE" ] ; then
830                    # WE CONCATENATE WITH EXISTING FILES
831                    file1=${config_UserChoices_JobName}_${DATE_BUILD_B}_${FlagDir}_${var}.nc
832                    file2=${config_UserChoices_JobName}_${DATE_BUILD}_${FlagDir}_${var}.nc
833                    file_out=${config_UserChoices_JobName}_${DATE_BUILD_END}_${FlagDir}_${var}.nc
834                    IGCM_sys_ncrcat --hst ${file1} ${file2} ${file_out}
835                    #
836                    IGCM_sys_Rm ${file1} ${file2}
837                fi
838
839                #
840                if [ "${DEPOT}" = "TRUE" ] ; then
841                    # WE PUT FINAL FILE ON FILE SYSTEM
842                    [ "${FLAG_B}" = "FALSE" ] && file_out=${config_UserChoices_JobName}_${DATE_BUILD}_${FlagDir}_${var}.nc
843                    #${ncatted} -a modulo,time_counter,c,c," " ${file_out}
844                    file_before=${config_UserChoices_JobName}_${DateBegin}_${DATE_FIN_JOB_B}_${FlagDir}_${var}.nc
845                    #
846                    eval IGCM_sys_Put_Out ${file_out} \${R_OUT_${comp}}/Analyse/${TS_Dir}/${file_out}
847                    [ "${FLAG_B}" = "TRUE" ] && eval MENAGE \${R_OUT_${comp}}/Analyse/${TS_Dir} ${file_before} ${file_out}
848                    #
849                    if [ ${FlagDir} = "1M" ] ; then
850                        # Compute yearly average considering calendar
851                        file_before_YE=${config_UserChoices_JobName}_${DateBegin}_${DATE_FIN_JOB_B}_1Y_${var}.nc
852                        file_out_YE=${config_UserChoices_JobName}_${DATE_BUILD_END}_1Y_${var}.nc
853                        #
854                        # Set date of the mid year to 01/07 at 00:00
855                        # better than default where the date information in the outputfile is the date of the last contributing time step in the input file
856                        IGCM_sys_cdo -settime,00:00 -setday,1 -setmon,7 -settunits,days -divdpy -yearsum -muldpm ${file_out} ${file_out_YE}
857                        #
858                        eval IGCM_sys_Put_Out ${file_out_YE} \${R_OUT_${comp}}/Analyse/TS_MO_YE/${file_out_YE}
859                        [ "${FLAG_B}" = "TRUE" ] && eval MENAGE \${R_OUT_${comp}}/Analyse/TS_MO_YE/ ${file_before_YE} ${file_out_YE}
860                    fi
861                    #
862                    IGCM_sys_Rm ${file_out}
863                    #
864                fi
865                #
866                ExitFlag=false
867                IGCM_debug_Verif_Exit_Post
868            done     # for var in ${liste_var} ; do
869            IGCM_sys_Rm ${liste_file_tmp[*]}
870        done         # for file in ${liste_file_brut} do
871    done             # for comp in ${config_ListOfComponents[*]} ; do
872    ExitFlag=false
873    IGCM_debug_Verif_Exit_Post
874    # GO AHEAD IN DEEPEST LOOP
875    (( CURRENT_LOOP = CURRENT_LOOP + 1 ))
876done                 # while [ ${CURRENT_LOOP} -le  ${NBRE_TOUR} ] do
877# FINISH
878
879# DODS copy
880for comp in ${config_ListOfComponents[*]} ; do
881    for TS_Dir in TS_YE TS_MO TS_MO_YE TS_DA TS_HF TS_INS ; do
882        IGCM_sys_TestDirArchive ${R_SAVE}/${comp}/Analyse/${TS_Dir}
883        [ $? = 0 ] && IGCM_sys_Put_Dods ${comp}/Analyse/${TS_Dir}
884    done
885done
886
887export POST_DIR; export SUBMIT_DIR; export libIGCM; export R_INIT; export R_BC; export StandAlone
888export RESOL_ATM; export RESOL_OCE ; export RESOL_ICE ; export RESOL_MBG ; export RESOL_SRF ; export RESOL_SBG
889
890listVarEnv="POST_DIR,SUBMIT_DIR,libIGCM,R_INIT,R_BC,StandAlone,RESOL_ATM,RESOL_OCE,RESOL_ICE,RESOL_MBG,RESOL_SRF,RESOL_SBG"
891export listVarEnv
892
893#D-
894# --------------------------------------------------------------------
895#D- Test if all was right
896# --------------------------------------------------------------------
897IGCM_debug_Verif_Exit_Post
898# --------------------------------------------------------------------
899#D- Submit MONITORING
900# --------------------------------------------------------------------
901( [ X${TsTask} = X2D ] || [ X${TsTask} = X ] ) && IGCM_sys_QsubPost monitoring
902
903#D-
904# --------------------------------------------------------------------
905#D- Update the run.card
906# --------------------------------------------------------------------
907if [ ${StandAlone} != true ] ; then
908    # Put in run.card end period of time series
909    [ X"${DATE_FIN}" = X ] || IGCM_sys_RshMaster IGCM_card_WriteOption ${SUBMIT_DIR}/run.card PostProcessing TimeSeriesCompleted "${DATE_FIN}"
910    # We have finish the job !
911    IGCM_sys_RshMaster IGCM_card_WriteOption ${SUBMIT_DIR}/run.card PostProcessing TimeSeriesRunning "n"
912fi
913
914# Clean RUN_DIR_PATH (necessary for cesium)
915IGCM_sys_RmRunDir -Rf ${RUN_DIR_PATH}
916
917date
Note: See TracBrowser for help on using the repository browser.