source: trunk/libIGCM/AA_create_ts @ 555

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