source: branches/libIGCM_MPI_OpenMP/AA_create_ts @ 571

Last change on this file since 571 was 571, checked in by mafoipsl, 12 years ago

First try to merge libIGCM_MPI_OpenMP branch with libIGCM trunk revision 569. Tested on vargas with PackFrequency?=NONE included into config.card.

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