source: trunk/libIGCM/AA_TimeSeries_Checker @ 386

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

Add ulam header to facilitate post-processing on ulam directly.

  • Property svn:keywords set to Revision Author Date
File size: 20.0 KB
Line 
1#-Q- cesium #!/bin/ksh
2#-Q- cesium ######################
3#-Q- cesium ## CESIUM   CEA ##
4#-Q- cesium ######################
5#-Q- cesium #MSUB -r TimeSeries             # 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 TimeSeries                     # 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- sx8brodie #!/bin/ksh
21#-Q- sx8brodie #######################
22#-Q- sx8brodie ## SX8BRODIE   IDRIS ##
23#-Q- sx8brodie #######################
24#-Q- sx8brodie # Temps Elapsed max. d'une requete hh:mm:ss
25#-Q- sx8brodie # @ wall_clock_limit = 20:00:00
26#-Q- sx8brodie # Nom du travail LoadLeveler
27#-Q- sx8brodie # @ job_name   = TimeSeries
28#-Q- sx8brodie # Fichier de sortie standard du travail       
29#-Q- sx8brodie # @ output     = $(job_name).$(jobid)
30#-Q- sx8brodie # Fichier de sortie d'erreur du travail
31#-Q- sx8brodie # @ error      =  $(job_name).$(jobid)
32#-Q- sx8brodie # pour recevoir un mail en cas de depassement du temps Elapsed (ou autre pb.)
33#-Q- sx8brodie # @ notification = error
34#-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
35#-Q- sx8brodie # @ queue
36#-Q- aix6 #!/bin/ksh
37#-Q- aix6 #######################
38#-Q- aix6 ##   VARGAS   IDRIS  ##
39#-Q- aix6 #######################
40#-Q- aix6 # Temps Elapsed max. d'une requete hh:mm:ss
41#-Q- aix6 # @ wall_clock_limit = 20:00:00
42#-Q- aix6 # Nom du travail LoadLeveler
43#-Q- aix6 # @ job_name   = TimeSeries
44#-Q- aix6 # Fichier de sortie standard du travail
45#-Q- aix6 # @ output     = $(job_name).$(jobid)
46#-Q- aix6 # Fichier de sortie d'erreur du travail
47#-Q- aix6 # @ error      =  $(job_name).$(jobid)
48#-Q- aix6 # pour recevoir un mail en cas de depassement du temps Elapsed (ou autre pb.)
49#-Q- aix6 # @ notification = error
50#-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
51#-Q- aix6 # @ queue
52#-Q- ulam #!/bin/ksh
53#-Q- ulam #######################
54#-Q- ulam ##   ULAM   IDRIS  ##
55#-Q- ulam #######################
56#-Q- ulam # Temps Elapsed max. d'une requete hh:mm:ss
57#-Q- ulam # @ wall_clock_limit = 20:00:00
58#-Q- ulam # Nom du travail LoadLeveler
59#-Q- ulam # @ job_name   = TimeSeries
60#-Q- ulam # Fichier de sortie standard du travail
61#-Q- ulam # @ output     = $(job_name).$(jobid)
62#-Q- ulam # Fichier de sortie d'erreur du travail
63#-Q- ulam # @ error      =  $(job_name).$(jobid)
64#-Q- ulam # pour recevoir un mail en cas de depassement du temps Elapsed (ou autre pb.)
65#-Q- ulam # @ notification = error
66#-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
67#-Q- ulam # @ queue
68#-Q- sx8mercure #!/bin/ksh
69#-Q- sx8mercure ######################
70#-Q- sx8mercure ## SX8MERCURE   CEA ##
71#-Q- sx8mercure ######################
72#-Q- sx8mercure #PBS -N TimeSeries                   # Nom du job
73#-Q- sx8mercure #PBS -j o                    # regroupement des stdout et stderr
74#-Q- sx8mercure #PBS -S /usr/bin/ksh         # shell de soumission
75#-Q- sx8mercure #PBS -l memsz_job=1gb        # Limite memoire a 1 Go
76#-Q- sx8mercure #PBS -l cputim_job=24:00:00   # Limite temps a 2 heures
77#-Q- sx8mercure #PBS -q scalaire
78#-Q- sx9mercure #!/bin/ksh
79#-Q- sx9mercure #########################
80#-Q- sx9mercure ## CESIUM FOR SX9  CEA ##
81#-Q- sx9mercure #########################
82#-Q- sx9mercure #MSUB -r TimeSeries             # Nom du job               
83#-Q- sx9mercure #MSUB -N 1              # Reservation du noeud
84#-Q- sx9mercure #MSUB -n 1              # Reservation du processus
85#-Q- sx9mercure #MSUB -T 86400          # Limite de temps elapsed du job
86#-Q- sx9mercure #MSUB -E "-j o"
87#-Q- sx9mercure #MSUB -E "-S /bin/ksh"
88#-Q- titane #!/bin/ksh
89#-Q- titane ######################
90#-Q- titane ## TITANE   CEA ##
91#-Q- titane ######################
92#-Q- titane #MSUB -r TimeSeries             # Nom du job               
93#-Q- titane #MSUB -N 1              # Reservation du noeud
94#-Q- titane #MSUB -n 1              # Reservation du processus
95#-Q- titane #MSUB -T 86400          # Limite de temps elapsed du job
96#-Q- titane #MSUB -E "-j o"
97#-Q- titane #MSUB -E "-S /bin/ksh"
98#-Q- titane ##MSUB -e nco.out        # Sortie standard
99#-Q- titane ##MSUB -o nco.out        # Sortie standard
100#-Q- lxiv8 ######################
101#-Q- lxiv8 ## OBELIX      LSCE ##
102#-Q- lxiv8 ######################
103#-Q- lxiv8 #PBS -N TimeSeries
104#-Q- lxiv8 #PBS -m a
105#-Q- lxiv8 #PBS -j oe
106#-Q- lxiv8 #PBS -q medium
107#-Q- lxiv8 #PBS -o TimeSeries.$$
108#-Q- lxiv8 #PBS -S /bin/ksh
109#-Q- default #!/bin/ksh
110#-Q- default ##################
111#-Q- default ## DEFAULT HOST ##
112#-Q- default ##################
113
114#**************************************************************
115# Author: Sebastien Denvil
116# Contact: Sebastien.Denvil__at__ipsl.jussieu.fr
117# $Revision::                                          $ Revision of last commit
118# $Author::                                            $ Author of last commit
119# $Date::                                              $ Date of last commit
120# IPSL (2006)
121#  This software is governed by the CeCILL licence see libIGCM/libIGCM_CeCILL.LIC
122#
123#**************************************************************
124
125# Check that everything went well during time series production
126# Display a short report
127# Launch what's missing
128# For use during a run (not on the end : PeriodState=Completed), it will complete
129# all TS to last PeriodDateEnd value, give by run.card->Configuration->OldPrefix string.
130
131
132# Chemin vers libIGCM
133libIGCM=${libIGCM:=::modipsl::/libIGCM}
134# Attention : à changer si la machine de post-traitement n'est pas la frontale du serveur de calcul !
135#             voir précence de la variable MirrorlibIGCM dans votre couche systÚme.
136
137# Name Space of this experience
138SpaceName=${SpaceName:=PROD}
139
140# Expericence class of the run
141ExperimentName=${ExperimentName:=historical}
142
143# Name of this job
144JobName=${JobName:=v2.historical1}
145
146# répertoire courrant
147CURRENT_DIR=$( pwd )
148
149# Emplacement des cartes
150CARD_DIR=${CARD_DIR:=${CURRENT_DIR}/${ExperimentName}/${JobName}}
151
152# répertoire de stockage des sorties des create_ts
153POST_DIR=${POST_DIR:=${CARD_DIR}/OutScript}
154
155
156if [ ! -d ${CARD_DIR} ]; then
157    echo "No ${CARD_DIR}, we stop here"
158    exit
159fi
160
161########################################################################
162
163. ${libIGCM}/libIGCM_debug/libIGCM_debug.ksh ;
164. ${libIGCM}/libIGCM_sys/libIGCM_sys.ksh     #; IGCM_debug_Check
165. ${libIGCM}/libIGCM_card/libIGCM_card.ksh   #; IGCM_card_Check
166. ${libIGCM}/libIGCM_date/libIGCM_date.ksh   #; IGCM_date_Check
167
168########################################################################
169
170#set -vx
171
172# First of all
173IGCM_card_DefineArrayFromSection       ${CARD_DIR}/config.card UserChoices
174typeset option
175for option in ${config_UserChoices[*]} ; do
176    IGCM_card_DefineVariableFromOption ${CARD_DIR}/config.card UserChoices ${option}
177done
178
179echo
180IGCM_debug_Print 1 "DefineVariableFromOption  : config_UserChoices"
181IGCM_debug_PrintVariables 3 config_UserChoices_JobName
182#IGCM_debug_PrintVariables 3 config_UserChoices_SpaceName
183#IGCM_debug_PrintVariables 3 config_UserChoices_ExperimentName
184IGCM_debug_PrintVariables 3 config_UserChoices_CalendarType
185IGCM_debug_PrintVariables 3 config_UserChoices_DateBegin
186IGCM_debug_PrintVariables 3 config_UserChoices_DateEnd
187
188if [ -f ${CARD_DIR}/run.card ] ; then
189    IGCM_card_DefineVariableFromOption ${CARD_DIR}/run.card Configuration OldPrefix
190    IGCM_card_DefineVariableFromOption ${CARD_DIR}/run.card Configuration PeriodState
191    IGCM_card_DefineVariableFromOption ${CARD_DIR}/run.card PostProcessing TimeSeriesCompleted
192    IGCM_debug_Print 1 "DefineVariableFromOption  : run_Configuration"
193    IGCM_debug_PrintVariables 3 run_Configuration_OldPrefix
194    IGCM_debug_PrintVariables 3 run_Configuration_PeriodState
195    IGCM_debug_Print 1 "DefineVariableFromOption  : run_PostProcessing"
196    IGCM_debug_PrintVariables 3 run_PostProcessing_TimeSeriesCompleted
197    if [ X${run_Configuration_PeriodState} != X"Completed" ] ; then
198        DateEnd=$( IGCM_date_ConvertFormatToGregorian $( echo ${run_Configuration_OldPrefix} | awk -F'_' '{print $2}' ) )
199    else
200        DateEnd=$( IGCM_date_ConvertFormatToGregorian ${config_UserChoices_DateEnd} )
201    fi
202    CompletedFlag=${run_PostProcessing_TimeSeriesCompleted}
203else
204    DateEnd=$( IGCM_date_ConvertFormatToGregorian ${config_UserChoices_DateEnd} )
205    CompletedFlag=""
206fi
207SavedCompletedFlag=${CompletedFlag}
208DateBegin=$( IGCM_date_ConvertFormatToGregorian ${config_UserChoices_DateBegin} )
209
210IGCM_date_GetYearMonth ${DateBegin} YearBegin MonthBegin
211IGCM_date_GetYearMonth ${DateEnd}   YearEnd   MonthEnd
212
213echo
214IGCM_debug_Print 1 "DateBegin for TimeSeries_Checker : "${DateBegin}
215IGCM_debug_Print 1 "DateEnd   for TimeSeries_Checker : "${DateEnd}
216IGCM_debug_Print 1 "YearBegin MonthBegin for TimeSeries_Checker : ${YearBegin} ${MonthBegin}"
217IGCM_debug_Print 1 "YearEnd   MonthEnd   for TimeSeries_Checker : ${YearEnd} ${MonthEnd}"
218IGCM_debug_Print 1 "CompletedFlag = "${CompletedFlag}
219echo
220
221#====================================================
222#R_SAVE : Job output directory
223if ( [ ! X${config_UserChoices_SpaceName} = X ] && [ ! X${config_UserChoices_ExperimentName} = X ] ) ; then
224    FreeName=$( echo ${config_UserChoices_JobName} | sed 's/.*_//' )
225    R_SAVE=${R_OUT}/${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${FreeName}
226    R_DODS=${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${FreeName}
227else
228    R_SAVE=${R_OUT}/${config_UserChoices_TagName}/${config_UserChoices_JobName}
229    R_DODS=${config_UserChoices_TagName}/${config_UserChoices_JobName}
230fi
231
232IGCM_card_DefineArrayFromSection ${CARD_DIR}/config.card ListOfComponents
233
234for comp in ${config_ListOfComponents[*]} ; do
235    # Debug Print
236    IGCM_debug_Print 1 ${comp}
237    # Define component
238    IGCM_card_DefineArrayFromOption ${CARD_DIR}/config.card ListOfComponents ${comp}
239    eval compname=\${config_ListOfComponents_${comp}[0]} > /dev/null 2>&1
240    eval comptagname=\${config_ListOfComponents_${comp}[1]} > /dev/null 2>&1
241
242    # Read libIGCM compatibility version in ${compname}.card
243    card=${CARD_DIR}/COMP/${compname}.card
244
245    # Read and Build Output File stuff
246    #IGCM_debug_Print 1 "DefineArrayFromOption  : ${compname}_OutputFiles ${card}"
247    IGCM_card_DefineArrayFromOption ${card} OutputFiles List
248    ListFilesName=${compname}_OutputFiles_List
249    eval FileName0=\${${ListFilesName}[0]} > /dev/null 2>&1
250    #
251    if [ X${FileName0} != X${NULL_STR} ] ; then
252        #
253        #IGCM_debug_Print 1 "Component      : ${compname}"
254        #
255        # INITIALISATION
256        #
257        eval NbFiles=\${#${ListFilesName}[@]} > /dev/null 2>&1
258        i=2
259        #
260        until [ $i -ge $NbFiles ]; do
261            #
262            eval flag_post=\${${ListFilesName}[$i]} > /dev/null 2>&1
263            #
264            if [ X${flag_post} != XNONE ] ; then
265                #
266                # First of all
267                #
268                IGCM_card_DefineArrayFromSection ${card} ${flag_post}
269                #
270                IGCM_card_DefineArrayFromOption ${card} ${flag_post} TimeSeriesVars
271                IGCM_card_DefineArrayFromOption ${card} ${flag_post} Patches
272                if [ X"$( eval echo \${${compname}_${flag_post}_TimeSeriesVars[*]} )" = X"Option not found ${flag_post}" ] ; then
273                    # New TimeSeriesVar description, with 2D, 3D and associate ChunckJob.
274                    unset ListDimension
275                    ListDimension[0]=2D
276                    ListDimension[1]=3D
277                    TimeSeries=false
278                    TimeSeries2D=false
279                    TimeSeries3D=false
280                    chunck=false
281                    iLoop=${#ListDimension[*]}
282                    j=0
283                    until [ $j -ge ${iLoop} ]; do
284                        Dimension=${ListDimension[${j}]}
285                        IGCM_card_DefineArrayFromOption ${card} ${flag_post} TimeSeriesVars${Dimension}
286                        IGCM_card_DefineVariableFromOption ${card} ${flag_post} ChunckJob${Dimension}
287                        #
288                        # Time series WITHOUT chunk
289                        #
290                        if [ ! $( eval echo \${${compname}_${flag_post}_TimeSeriesVars${Dimension}} ) = ${NULL_STR} ] ; then
291                            if [ $( eval echo \${${compname}_${flag_post}_ChunckJob${Dimension}} ) = NONE ] ; then
292                                IGCM_debug_Print 2 "${Dimension} time series activated for ${flag_post}"
293                                eval TimeSeries${Dimension}=true
294                                chunck=false
295                            fi
296                        fi
297                        #
298                        # Time series WITH chunk
299                        #
300                        if [ ! $( eval echo \${${compname}_${flag_post}_TimeSeriesVars${Dimension}} ) = ${NULL_STR} ] ; then
301                            chunck_size=$( eval echo \${${compname}_${flag_post}_ChunckJob${Dimension}} )
302                            if [ ! ${chunck_size} = NONE ] &&  [ ! ${chunck_size} = OFF ] ; then
303                                IGCM_debug_Print 2 "${Dimension} time series activated with ${chunck_size} chunck for ${flag_post}"
304                                eval TimeSeriesChunck${Dimension}=true
305                                chunck=true
306                            fi
307                        fi
308                        (( j=j+1 ))
309                        #
310                        # If TimeSeriesVars list is empty or OFF we skip
311                        #
312                        if ( [ $( eval echo \${${compname}_${flag_post}_TimeSeriesVars${Dimension}} ) = ${NULL_STR} ] || \
313                            [ ${chunck_size} = OFF ] ) ; then
314                            #IGCM_debug_Print 2 "Empty TS : ${compname}_Post_${FILE}_TimeSeriesVars${Dimension}"
315                            #(( i=i+3 ))
316                            continue
317                        fi
318                        #
319                        #  ICI ON TESTE QUE LES FICHIERS TS SONT LA!
320                        #
321                        #
322                        FILE=$( echo ${flag_post} | awk "-FPost_" '{print $2}' )
323                        IGCM_card_DefineArrayFromOption ${card}    Post_${FILE} TimeSeriesVars${Dimension}
324                        IGCM_card_DefineVariableFromOption ${card} Post_${FILE} ChunckJob${Dimension}
325                        #
326                        FlagDir=$( echo ${FILE} | awk -F "_" '{print $1}' )
327                        case ${FlagDir} in
328                            *Y)  TS_Dir=TS_YE  ;;
329                            *M)  TS_Dir=TS_MO  ;;
330                            *D)  TS_Dir=TS_DA  ;;
331                         3H|HF)  TS_Dir=TS_HF  ;;
332                           INS) TS_Dir=TS_INS ;;
333                        esac
334                        #
335                        # We need LIST of variables not allready produced (useful for standalone mode)
336                        #
337                        DateBegin=$( IGCM_date_ConvertFormatToGregorian ${config_UserChoices_DateBegin} )
338                        IGCM_date_GetYearMonth ${DateBegin} YearBegin MonthBegin
339
340                        # Si on n'a pas de chunck, dans ce cas chunck_size=la durée de la simulation en années
341                        YearsChunckLength=$( echo ${chunck_size} | sed -e "s/[yY]//" )
342                        [ ${chunck} = false ] && YearsChunckLength=$(( YearEnd - YearBegin + 1 ))
343
344                        NbYearsChunckLoop=$(( ( YearEnd - YearBegin + 1 ) / YearsChunckLength ))
345                        Reste=$(( ( YearEnd - YearBegin + 1 ) % YearsChunckLength ))
346
347                        if [ ${Reste} -ne 0 ] ; then
348                            NbYearsChunckLoop=$(( NbYearsChunckLoop + 1 ))
349                        fi
350
351                        if [ ${NbYearsChunckLoop} -eq 1 ] ; then
352                            PeriodDateEnd=${DateEnd}
353                        else
354                            DaysInYear=$( IGCM_date_DaysInYear ${YearBegin} )
355                            PeriodDateEnd=$( IGCM_date_AddDaysToGregorianDate ${DateBegin} $(( YearsChunckLength * DaysInYear - 1 )) )
356                        fi
357                        #
358                        DIRECTORY=${R_SAVE}/${comp}/Analyse/${TS_Dir}
359                        YearsChunckLoop=1
360                        ChunckDebut=${DateBegin}
361                        ChunckFin=${PeriodDateEnd}
362                        while [ ${YearsChunckLoop} -le ${NbYearsChunckLoop} ] ; do
363                            countTotal=0
364                            countGood=0
365                            countBad=0
366                            for var in $( eval echo \${${compname}_Post_${FILE}_TimeSeriesVars${Dimension}[*]} ) ; do
367                                TestedFile=${config_UserChoices_JobName}_${ChunckDebut}_${ChunckFin}_${FlagDir}_${var}.nc
368                                #
369                                if [ ! -f ${DIRECTORY}/${TestedFile} ] ; then
370                                    (( countBad = countBad + 1 ))
371                                    [ ${countBad} = 1 ] && IGCM_debug_Print 3 "Missing time series from ${FILE} :"
372                                    IGCM_debug_Print 3 ${DIRECTORY}/${TestedFile}
373                                else
374                                    (( countGood = countGood + 1 ))
375                                fi
376                                (( countTotal = countTotal + 1 ))
377                            done
378
379                            SuccessRate=$(( countGood * 100 / countTotal ))
380                            if [ ${SuccessRate} -ne 100 ] ; then
381                                IGCM_debug_Print 2 -e "\033[1;31m${SuccessRate}% files OK.\033[m for period ${ChunckDebut}-${ChunckFin}"
382                            else
383                                IGCM_debug_Print 2 -e "\033[1;32m${SuccessRate}% files OK.\033[m for period ${ChunckDebut}-${ChunckFin}"
384                            fi
385
386                            echo
387                            if ( [ ${chunck} = true ] && [ ${SuccessRate} -ne 100 ] ) ; then
388                                ChunckCompletedFlag=""
389                                CompletedFlag=${SavedCompletedFlag}
390                                if [ X${CompletedFlag} != X ] ; then
391                                        ( [ ${CompletedFlag} -gt ${ChunckDebut} ] && [ ${CompletedFlag} -le ${ChunckFin} ] ) && ChunckCompletedFlag=${CompletedFlag}
392                                fi
393                                IGCM_debug_Print 2 -e "\033[1;31mSubmit ${FILE} chunck ${Dimension}\033[m period ${ChunckDebut}-${ChunckFin}"
394                                listVarEnv="libIGCM,SUBMIT_DIR,POST_DIR,DateBegin,PeriodDateEnd,CompletedFlag,TsTask,CompToRead,FlagToRead"
395                                export libIGCM=${libIGCM}
396                                export SUBMIT_DIR=${CARD_DIR}
397                                export POST_DIR=${POST_DIR}
398                                export DateBegin=${ChunckDebut}
399                                export PeriodDateEnd=${ChunckFin}
400                                export CompletedFlag=${ChunckCompletedFlag}
401                                export TsTask=Chunck${Dimension}
402                                export CompToRead=${comp}
403                                export FlagToRead=${i}
404                                export listVarEnv=${listVarEnv}
405                                IGCM_sys_MkdirWork ${POST_DIR}
406                                IGCM_debug_Verif_Exit
407                                IGCM_sys_QsubPost create_ts
408                                echo
409                            fi
410
411                            if ( [ ${chunck} = false ] && [ ${SuccessRate} -ne 100 ] ) ; then
412                                eval Launch${Dimension}=true
413                            fi
414
415                            # Date update
416                            ChunckDebut=$( IGCM_date_AddDaysToGregorianDate ${ChunckFin} 1 )
417
418                            (( YearsChunckLoop = YearsChunckLoop + 1 ))
419
420                            if [ ${YearsChunckLoop} -eq ${NbYearsChunckLoop} ] ; then
421                                ChunckFin=${DateEnd}
422                            else
423                                #PeriodDateEnd=$(( YearBegin + YearsChunckLength - 1 ))
424                                ChunckFin=$( IGCM_date_AddDaysToGregorianDate ${ChunckDebut} $(( YearsChunckLength * DaysInYear - 1 )) )
425                            fi
426                        done
427                    done
428                else
429                    ListDimension[0]=""
430                    TimeSeries=true
431                    TimeSeries2D=false
432                    TimeSeries3D=false
433                    TimeSeriesChunck2D=false
434                    TimeSeriesChunck3D=false
435                fi
436            fi
437            (( i=i+3 ))
438        done
439    fi
440done # comp loop
441
442echo
443
444DateBegin=$( IGCM_date_ConvertFormatToGregorian ${config_UserChoices_DateBegin} )
445IGCM_date_GetYearMonth ${DateBegin} YearBegin MonthBegin
446CompletedFlag=${SavedCompletedFlag}
447
448if [ X${Launch2D} = Xtrue ] ; then
449    IGCM_debug_Print 2 -e "\033[1;31mSubmit 2D\033[m without chunck period ${DateBegin}-${DateEnd}"
450    listVarEnv="libIGCM,SUBMIT_DIR,POST_DIR,DateBegin,PeriodDateEnd,CompletedFlag,TsTask"
451    export libIGCM=${libIGCM}
452    export SUBMIT_DIR=${CARD_DIR}
453    export POST_DIR=${POST_DIR}
454    export DateBegin=${DateBegin}
455    export PeriodDateEnd=${DateEnd}
456    export CompletedFlag=${CompletedFlag}
457    export TsTask=2D
458    export listVarEnv=${listVarEnv}
459    IGCM_sys_MkdirWork ${POST_DIR}
460    IGCM_debug_Verif_Exit
461    IGCM_sys_QsubPost create_ts
462    echo
463fi
464
465if [ X${Launch3D} = Xtrue ] ; then
466    IGCM_debug_Print 2 -e "\033[1;31mSubmit 3D\033[m without chunck period ${DateBegin}-${DateEnd}"
467    listVarEnv="libIGCM,SUBMIT_DIR,POST_DIR,DateBegin,PeriodDateEnd,CompletedFlag,TsTask"
468    export libIGCM=${libIGCM}
469    export SUBMIT_DIR=${CARD_DIR}
470    export POST_DIR=${POST_DIR}
471    export DateBegin=${DateBegin}
472    export PeriodDateEnd=${DateEnd}
473    export CompletedFlag=${CompletedFlag}
474    export TsTask=3D
475    export listVarEnv=${listVarEnv}
476    IGCM_sys_MkdirWork ${POST_DIR}
477    IGCM_debug_Verif_Exit
478    IGCM_sys_QsubPost create_ts
479    echo
480fi
Note: See TracBrowser for help on using the repository browser.