source: branches/libIGCM_MPI_OpenMP/AA_TimeSeries_Checker @ 494

Last change on this file since 494 was 475, checked in by sdipsl, 13 years ago
  • Better error handling within libGCM
  • Pre requisite to have more robust post-processing workflow
  • Improve verbosity to help users identify problem
  • Cosmetic
  • backward compatible
  • Property svn:keywords set to Revision Author Date
File size: 19.7 KB
Line 
1#!/bin/ksh
2
3#**************************************************************
4# Author: Sebastien Denvil
5# Contact: Sebastien.Denvil__at__ipsl.jussieu.fr
6# $Revision::                                          $ Revision of last commit
7# $Author::                                            $ Author of last commit
8# $Date::                                              $ Date of last commit
9# IPSL (2006)
10#  This software is governed by the CeCILL licence see libIGCM/libIGCM_CeCILL.LIC
11#
12#**************************************************************
13
14# Check that everything went well during time series production
15# Display a short report
16# Launch what's missing
17# For use during a run (not on the end : PeriodState=Completed), it will complete
18# all TS to last PeriodDateEnd value, give by run.card->Configuration->OldPrefix string.
19
20# Chemin vers libIGCM
21libIGCM=${libIGCM:=::modipsl::/libIGCM}
22# Attention : à changer si la machine de post-traitement n'est pas la frontale du serveur de calcul !
23#             voir précence de la variable MirrorlibIGCM dans votre couche systÚme.
24
25# Expericence class of the run
26ExperimentName=${ExperimentName:=historical}
27
28# Name of this job
29JobName=${JobName:=v2.historical1}
30
31# répertoire courrant
32CURRENT_DIR=$( pwd )
33
34# Emplacement des cartes
35CARD_DIR=${CARD_DIR:=${CURRENT_DIR}/${ExperimentName}/${JobName}}
36
37# répertoire de stockage des sorties des create_ts
38POST_DIR=${POST_DIR:=${CARD_DIR}/OutScript}
39
40if [ ! -d ${CARD_DIR} ]; then
41    echo "No ${CARD_DIR}, we stop here"
42    exit
43fi
44
45########################################################################
46
47. ${libIGCM}/libIGCM_debug/libIGCM_debug.ksh ;
48. ${libIGCM}/libIGCM_sys/libIGCM_sys.ksh     #; IGCM_debug_Check
49. ${libIGCM}/libIGCM_card/libIGCM_card.ksh   #; IGCM_card_Check
50. ${libIGCM}/libIGCM_date/libIGCM_date.ksh   #; IGCM_date_Check
51
52########################################################################
53
54#set -vx
55
56echo "Hi I'm here to help you complete the time series production you planned according to your *.card."
57echo "This action can potentially submit numbers of jobs (up to 50)"
58echo "This action can potentially remove unnecessary files but I will ALWAYS ask permission to do so"
59echo -e "\033[1;31mDo you want me to run in dryrun mode just telling what I would submit?\033[m"
60echo -e "\033[1;31mOr do you want me to submit job for real? Answer yes in this case.\033[m"
61echo -n " Run for real (y/n) :"
62read ActionAnswer
63
64case ${ActionAnswer} in   
65    oui|OUI|o|y|yes|YES)
66        echo "OK. I will submit jobs but ask permissions before removing files"
67        action=true
68        ;;
69    non|NON|n|no|NO)
70        echo "OK. I won't submit jobs and only print out files I could remove"
71        action=false
72        ;;
73    *)
74        echo "I did not recognize your answer. I will stop here."
75        echo "Please respond: oui|OUI|o|y|yes|YES"
76        echo "Or please respond: non|NON|n|no|NO"
77        exit
78        ;;
79esac
80
81# First of all
82IGCM_card_DefineArrayFromSection       ${CARD_DIR}/config.card UserChoices
83typeset option
84for option in ${config_UserChoices[*]} ; do
85    IGCM_card_DefineVariableFromOption ${CARD_DIR}/config.card UserChoices ${option}
86done
87
88echo
89IGCM_debug_Print 1 "DefineVariableFromOption  : config_UserChoices"
90IGCM_debug_PrintVariables 3 config_UserChoices_JobName
91#IGCM_debug_PrintVariables 3 config_UserChoices_SpaceName
92#IGCM_debug_PrintVariables 3 config_UserChoices_ExperimentName
93IGCM_debug_PrintVariables 3 config_UserChoices_CalendarType
94IGCM_debug_PrintVariables 3 config_UserChoices_DateBegin
95IGCM_debug_PrintVariables 3 config_UserChoices_DateEnd
96
97if [ -f ${CARD_DIR}/run.card ] ; then
98    IGCM_card_DefineVariableFromOption ${CARD_DIR}/run.card Configuration OldPrefix
99    IGCM_card_DefineVariableFromOption ${CARD_DIR}/run.card Configuration PeriodState
100    IGCM_card_DefineVariableFromOption ${CARD_DIR}/run.card PostProcessing TimeSeriesCompleted
101    IGCM_debug_Print 1 "DefineVariableFromOption  : run_Configuration"
102    IGCM_debug_PrintVariables 3 run_Configuration_OldPrefix
103    IGCM_debug_PrintVariables 3 run_Configuration_PeriodState
104    IGCM_debug_Print 1 "DefineVariableFromOption  : run_PostProcessing"
105    IGCM_debug_PrintVariables 3 run_PostProcessing_TimeSeriesCompleted
106    if [ X${run_Configuration_PeriodState} != X"Completed" ] ; then
107        DateEnd=$( IGCM_date_ConvertFormatToGregorian $( echo ${run_Configuration_OldPrefix} | awk -F'_' '{print $2}' ) )
108    else
109        DateEnd=$( IGCM_date_ConvertFormatToGregorian ${config_UserChoices_DateEnd} )
110    fi
111    CompletedFlag=${run_PostProcessing_TimeSeriesCompleted}
112else
113    DateEnd=$( IGCM_date_ConvertFormatToGregorian ${config_UserChoices_DateEnd} )
114    CompletedFlag=""
115fi
116SavedCompletedFlag=${CompletedFlag}
117DateBegin=$( IGCM_date_ConvertFormatToGregorian ${config_UserChoices_DateBegin} )
118
119IGCM_date_GetYearMonth ${DateBegin} YearBegin MonthBegin
120IGCM_date_GetYearMonth ${DateEnd}   YearEnd   MonthEnd
121
122echo
123IGCM_debug_Print 1 "DateBegin for TimeSeries_Checker : "${DateBegin}
124IGCM_debug_Print 1 "DateEnd   for TimeSeries_Checker : "${DateEnd}
125IGCM_debug_Print 1 "CompletedFlag = "${CompletedFlag}
126echo
127
128#====================================================
129#R_SAVE : Job output directory
130if ( [ ! X${config_UserChoices_SpaceName} = X ] && [ ! X${config_UserChoices_ExperimentName} = X ] ) ; then
131    FreeName=$( echo ${config_UserChoices_JobName} | sed 's/.*_//' )
132    R_SAVE=${R_OUT}/${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${FreeName}
133    R_DODS=${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${FreeName}
134else
135    R_SAVE=${R_OUT}/${config_UserChoices_TagName}/${config_UserChoices_JobName}
136    R_DODS=${config_UserChoices_TagName}/${config_UserChoices_JobName}
137fi
138
139IGCM_card_DefineArrayFromSection ${CARD_DIR}/config.card ListOfComponents
140
141for comp in ${config_ListOfComponents[*]} ; do
142    # Debug Print
143    IGCM_debug_Print 1 ${comp}
144    # Define component
145    IGCM_card_DefineArrayFromOption ${CARD_DIR}/config.card ListOfComponents ${comp}
146    eval compname=\${config_ListOfComponents_${comp}[0]} > /dev/null 2>&1
147    eval comptagname=\${config_ListOfComponents_${comp}[1]} > /dev/null 2>&1
148
149    # Read libIGCM compatibility version in ${compname}.card
150    card=${CARD_DIR}/COMP/${compname}.card
151
152    # Read and Build Output File stuff
153    #IGCM_debug_Print 1 "DefineArrayFromOption  : ${compname}_OutputFiles ${card}"
154    IGCM_card_DefineArrayFromOption ${card} OutputFiles List
155    ListFilesName=${compname}_OutputFiles_List
156    eval FileName0=\${${ListFilesName}[0]} > /dev/null 2>&1
157    #
158    if [ X${FileName0} != X${NULL_STR} ] ; then
159        #
160        #IGCM_debug_Print 1 "Component      : ${compname}"
161        #
162        # INITIALISATION
163        #
164        eval NbFiles=\${#${ListFilesName}[@]} > /dev/null 2>&1
165        i=2
166        #
167        until [ $i -ge $NbFiles ]; do
168            #
169            eval flag_post=\${${ListFilesName}[$i]} > /dev/null 2>&1
170            #
171            if [ X${flag_post} != XNONE ] ; then
172                #
173                # First of all
174                #
175                IGCM_card_DefineArrayFromSection ${card} ${flag_post}
176                #
177                IGCM_card_DefineArrayFromOption ${card} ${flag_post} TimeSeriesVars
178                IGCM_card_DefineArrayFromOption ${card} ${flag_post} Patches
179                if [ X"$( eval echo \${${compname}_${flag_post}_TimeSeriesVars[*]} )" = X"Option not" ] ; then
180                    # New TimeSeriesVar description, with 2D, 3D and associate ChunckJob.
181                    unset ListDimension
182                    ListDimension[0]=2D
183                    ListDimension[1]=3D
184                    TimeSeries=false
185                    TimeSeries2D=false
186                    TimeSeries3D=false
187                    chunck=false
188                    iLoop=${#ListDimension[*]}
189                    j=0
190                    until [ $j -ge ${iLoop} ]; do
191                        Dimension=${ListDimension[${j}]}
192                        IGCM_card_DefineArrayFromOption ${card} ${flag_post} TimeSeriesVars${Dimension}
193                        IGCM_card_DefineVariableFromOption ${card} ${flag_post} ChunckJob${Dimension}
194                        #
195                        # Time series WITHOUT chunk
196                        #
197                        if [ ! $( eval echo \${${compname}_${flag_post}_TimeSeriesVars${Dimension}} ) = ${NULL_STR} ] ; then
198                            if [ $( eval echo \${${compname}_${flag_post}_ChunckJob${Dimension}} ) = NONE ] ; then
199                                IGCM_debug_Print 2 "${Dimension} time series activated for ${flag_post}"
200                                eval TimeSeries${Dimension}=true
201                                chunck=false
202                            fi
203                        fi
204                        #
205                        # Time series WITH chunk
206                        #
207                        if [ ! $( eval echo \${${compname}_${flag_post}_TimeSeriesVars${Dimension}} ) = ${NULL_STR} ] ; then
208                            chunck_size=$( eval echo \${${compname}_${flag_post}_ChunckJob${Dimension}} )
209                            if [ ! ${chunck_size} = NONE ] &&  [ ! ${chunck_size} = OFF ] ; then
210                                IGCM_debug_Print 2 "${Dimension} time series activated with ${chunck_size} chunck for ${flag_post}"
211                                eval TimeSeriesChunck${Dimension}=true
212                                chunck=true
213                            fi
214                        fi
215                        (( j=j+1 ))
216                        #
217                        # If TimeSeriesVars list is empty or OFF we skip
218                        #
219                        if ( [ $( eval echo \${${compname}_${flag_post}_TimeSeriesVars${Dimension}} ) = ${NULL_STR} ] || \
220                            [ ${chunck_size} = OFF ] ) ; then
221                            #IGCM_debug_Print 2 "Empty TS : ${compname}_Post_${FILE}_TimeSeriesVars${Dimension}"
222                            #(( i=i+3 ))
223                            continue
224                        fi
225                        #
226                        #  ICI ON TESTE QUE LES FICHIERS TS SONT LA!
227                        #
228                        #
229                        FILE=$( echo ${flag_post} | awk "-FPost_" '{print $2}' )
230                        IGCM_card_DefineArrayFromOption ${card}    Post_${FILE} TimeSeriesVars${Dimension}
231                        IGCM_card_DefineVariableFromOption ${card} Post_${FILE} ChunckJob${Dimension}
232                        #
233                        FlagDir=$( echo ${FILE} | awk -F "_" '{print $1}' )
234                        case ${FlagDir} in
235                            *Y)  TS_Dir=TS_YE  ;;
236                            *M)  TS_Dir=TS_MO  ;;
237                            *D)  TS_Dir=TS_DA  ;;
238                         3H|HF)  TS_Dir=TS_HF  ;;
239                           INS) TS_Dir=TS_INS ;;
240                        esac
241                        #
242                        # We need LIST of variables not allready produced (useful for standalone mode)
243                        #
244                        DateBegin=$( IGCM_date_ConvertFormatToGregorian ${config_UserChoices_DateBegin} )
245                        IGCM_date_GetYearMonth ${DateBegin} YearBegin MonthBegin
246
247                        # Si on n'a pas de chunck, dans ce cas chunck_size=la durée de la simulation en années
248                        YearsChunckLength=$( echo ${chunck_size} | sed -e "s/[yY]//" )
249                        [ ${chunck} = false ] && YearsChunckLength=$(( YearEnd - YearBegin + 1 ))
250
251                        NbYearsChunckLoop=$(( ( YearEnd - YearBegin + 1 ) / YearsChunckLength ))
252                        Reste=$(( ( YearEnd - YearBegin + 1 ) % YearsChunckLength ))
253
254                        if [ ${Reste} -ne 0 ] ; then
255                            NbYearsChunckLoop=$(( NbYearsChunckLoop + 1 ))
256                        fi
257
258                        if [ ${NbYearsChunckLoop} -eq 1 ] ; then
259                            PeriodDateEnd=${DateEnd}
260                        else
261                            DaysInYear=$( IGCM_date_DaysInYear ${YearBegin} )
262                            PeriodDateEnd=$( IGCM_date_AddDaysToGregorianDate ${DateBegin} $(( YearsChunckLength * DaysInYear - 1 )) )
263                        fi
264                        #
265                        DIRECTORY=${R_SAVE}/${comp}/Analyse/${TS_Dir}
266                        YearsChunckLoop=1
267                        ChunckDebut=${DateBegin}
268                        ChunckFin=${PeriodDateEnd}
269                        while [ ${YearsChunckLoop} -le ${NbYearsChunckLoop} ] ; do
270                            countTotal=0
271                            countGood=0
272                            countBad=0
273                            unset RemoveList
274                            unset PotentialCompletedFlag
275                            for var in $( eval echo \${${compname}_Post_${FILE}_TimeSeriesVars${Dimension}[*]} ) ; do
276                                TestedFile=${config_UserChoices_JobName}_${ChunckDebut}_${ChunckFin}_${FlagDir}_${var}.nc
277                                #
278                                Candidat=$( find ${DIRECTORY} -name "${config_UserChoices_JobName}_${ChunckDebut}_*_${FlagDir}_${var}.nc" )
279                                #
280                                BestCandidat=${ChunckDebut}
281                                #
282                                FoundCandidat=false
283                                if [ ! "X${Candidat}" = "X" ] ; then
284                                    for candid in ${Candidat} ; do
285                                        #IGCM_debug_Print 1 -e "\033[1;32m[CompletedFlag CANDIDAT MATCH FOUND]\033[m $( basename ${candid} )"
286                                        CandidatEnd=$( echo ${candid}   | awk -F${config_UserChoices_JobName} '{print $3}' | awk -F_ '{print $3}' )
287                                        if [ ${CandidatEnd} -gt ${ChunckFin} ] ; then
288                                            #IGCM_debug_Print 3 -e "File $( basename ${candid} ) should be suppress"
289                                            set +A RemoveList ${RemoveList[*]} ${candid}
290                                        elif [ ${CandidatEnd} -lt ${ChunckFin} ] ; then
291                                            #IGCM_debug_Print 3 -e "File $( basename ${candid} ) should be suppress or used as a CompletedFlag baseline"
292                                            # We keep the best candidat and remove the others
293                                            if [ ${BestCandidat} -lt ${CandidatEnd} ] ; then
294                                                if [ ${FoundCandidat} = true ] ; then
295                                                   set +A RemoveList ${RemoveList[*]} ${DIRECTORY}/${config_UserChoices_JobName}_${ChunckDebut}_${BestCandidat}_${FlagDir}_${var}.nc
296                                                else
297                                                   FoundCandidat=true
298                                                fi
299                                                BestCandidat=${CandidatEnd}
300                                            else
301                                                set +A RemoveList ${RemoveList[*]} ${candid}
302                                            fi
303                                        fi
304                                    done
305                                else
306                                    # No CompletedFlag candidat found
307                                    CandidatCompletedFlag=""
308                                fi
309                                #
310                                if [ ! -f ${DIRECTORY}/${TestedFile} ] ; then
311                                    (( countBad = countBad + 1 ))
312                                    [ ${countBad} = 1 ] && IGCM_debug_Print 3 "Missing time series from ${FILE} :"
313                                    IGCM_debug_Print 3 ${DIRECTORY}/${TestedFile}
314                                    # Then we keep a track of the Best Candidat
315                                    if [ ${FoundCandidat} = true ] ; then
316                                        if [ ${chunck} = true ] ; then
317                                            set +A PotentialCompletedFlag ${PotentialCompletedFlag[*]} ${BestCandidat}
318                                        else
319                                            eval set +A PotentialCompletedFlag${Dimension} \${PotentialCompletedFlag${Dimension}[*]} \${BestCandidat}
320                                        fi
321                                    fi
322                                else
323                                    (( countGood = countGood + 1 ))
324                                    # Then we do not need the best candidat if any
325                                    [ ${FoundCandidat} = true ] && set +A RemoveList ${RemoveList[*]} ${DIRECTORY}/${config_UserChoices_JobName}_${ChunckDebut}_${BestCandidat}_${FlagDir}_${var}.nc
326                                fi
327                                (( countTotal = countTotal + 1 ))
328                            done
329
330                            SuccessRate=$(( countGood * 100 / countTotal ))
331                            if [ ${SuccessRate} -ne 100 ] ; then
332                                IGCM_debug_Print 2 -e "\033[1;31m${SuccessRate}% files OK.\033[m for period ${ChunckDebut}-${ChunckFin}"
333                            else
334                                IGCM_debug_Print 2 -e "\033[1;32m${SuccessRate}% files OK.\033[m for period ${ChunckDebut}-${ChunckFin}"
335                            fi
336                            echo
337
338                            # Remove what's in the RemoveList
339                            if [ ${RemoveList} ] ; then
340                                IGCM_debug_Print 2 "File(s) that will be removed ${RemoveList[*]}"
341                                if [ ${action} = true ] ; then
342                                    echo -e "\033[1;32mDo you want to remove them?\033[m"
343                                    echo -n " Your answer (y/n) : "
344                                    read RemoveAnswer
345                                    case ${RemoveAnswer} in   
346                                        oui|OUI|o|y|yes|YES)
347                                            echo "OK. I will erase them"
348                                            IGCM_sys_Rm -f ${RemoveList[*]}
349                                            ;;
350                                        non|NON|n|no|NO)
351                                            echo "OK. I won't erase them"
352                                            ;;
353                                        *)
354                                            echo "I did not recognize your answer."
355                                            echo "Please respond: oui|OUI|o|y|yes|YES"
356                                            echo "Or please respond: non|NON|n|no|NO"
357                                            exit
358                                            ;;
359                                    esac
360                                fi
361                            fi
362                            #[ ${FoundCandidat} = true ] && IGCM_debug_Print 2 "Potentials CompletedFlag: ${PotentialCompletedFlag[*]}"
363                            if ( [ ${chunck} = true ] && [ ${SuccessRate} -ne 100 ] ) ; then
364                                #
365                                # TO REWRITE BEGIN
366                                #
367                                NbCandidats=${#PotentialCompletedFlag[@]}
368                                countCandid=1
369                                if [ ${NbCandidats} -eq 0 ] ; then
370                                    ChunckCompletedFlag=""
371                                    IGCM_debug_Print 2 -e "\033[1;31mNO CompletedFlag\033[m"
372                                elif [ ${NbCandidats} -eq 1 ] ; then
373                                    ChunckCompletedFlag=${PotentialCompletedFlag[0]}
374                                    IGCM_debug_Print 2 -e "\033[1;32mCompletedFlag=${ChunckCompletedFlag}\033[m"
375                                elif [ ${NbCandidats} -gt 1 ] ; then
376                                    k=1
377                                    until [ $k -ge ${NbCandidats} ]; do
378                                        ((k_m1=k-1))
379                                        if [ ${PotentialCompletedFlag[${k_m1}]} = ${PotentialCompletedFlag[${k}]} ] ; then
380                                            ((countCandid=countCandid+1))
381                                        fi
382                                        ((k=k+1))
383                                    done
384                                    if [ ${NbCandidats} -eq ${countCandid} ] ; then
385                                        ChunckCompletedFlag=${PotentialCompletedFlag[0]}
386                                        IGCM_debug_Print 2 -e "\033[1;32mCompletedFlag=${ChunckCompletedFlag}\033[m"
387                                    else
388                                        IGCM_debug_Print 2 -e "\033[1;31mToo Many Potential CompletedFlag\033[m CASE NOT HANDLE YET"
389                                    fi
390                                fi
391                                #
392                                # TO REWRITE END
393                                #
394                                if [ ${action} = true ] ; then
395                                    IGCM_debug_Print 2 -e "\033[1;31mSubmit ${FILE} chunck ${Dimension}\033[m period ${ChunckDebut}-${ChunckFin} and CompletedFlag=${ChunckCompletedFlag}"
396                                    listVarEnv="libIGCM,SUBMIT_DIR,POST_DIR,DateBegin,PeriodDateEnd,CompletedFlag,TsTask,CompToRead,FlagToRead"
397                                    export libIGCM=${libIGCM}
398                                    export SUBMIT_DIR=${CARD_DIR}
399                                    export POST_DIR=${POST_DIR}
400                                    export DateBegin=${ChunckDebut}
401                                    export PeriodDateEnd=${ChunckFin}
402                                    export CompletedFlag=${ChunckCompletedFlag}
403                                    export TsTask=Chunck${Dimension}
404                                    export CompToRead=${comp}
405                                    export FlagToRead=${i}
406                                    export NameToRead=${flag_post}
407                                    export listVarEnv=${listVarEnv}
408                                    IGCM_sys_MkdirWork ${POST_DIR}
409                                    IGCM_debug_Verif_Exit_Post
410                                    Script_Post_Output=create_ts.${PeriodDateEnd}.${TsTask}.${CompToRead}.${NameToRead}
411                                    IGCM_sys_QsubPost create_ts
412                                    echo
413                                else
414                                    IGCM_debug_Print 2 -e "\033[1;31mI should NOW submit ${FILE} chunck ${Dimension}\033[m period ${ChunckDebut}-${ChunckFin} and CompletedFlag=${ChunckCompletedFlag}"
415                                fi
416                            fi
417
418                            if ( [ ${chunck} = false ] && [ ${SuccessRate} -ne 100 ] ) ; then
419                                eval Launch${Dimension}=true
420                            fi
421
422                            # Date update
423                            ChunckDebut=$( IGCM_date_AddDaysToGregorianDate ${ChunckFin} 1 )
424
425                            (( YearsChunckLoop = YearsChunckLoop + 1 ))
426
427                            if [ ${YearsChunckLoop} -eq ${NbYearsChunckLoop} ] ; then
428                                ChunckFin=${DateEnd}
429                            else
430                                ChunckFin=$( IGCM_date_AddDaysToGregorianDate ${ChunckDebut} $(( YearsChunckLength * DaysInYear - 1 )) )
431                            fi
432                        done
433                    done
434                else
435                    ListDimension[0]=""
436                    TimeSeries=true
437                    TimeSeries2D=false
438                    TimeSeries3D=false
439                    TimeSeriesChunck2D=false
440                    TimeSeriesChunck3D=false
441                fi
442            fi
443            (( i=i+3 ))
444        done
445    fi
446done # comp loop
447
448echo
449
450DateBegin=$( IGCM_date_ConvertFormatToGregorian ${config_UserChoices_DateBegin} )
451IGCM_date_GetYearMonth ${DateBegin} YearBegin MonthBegin
452CompletedFlag=${SavedCompletedFlag}
453
454unset CompToRead
455unset FlagToRead
456
457if [ X${Launch2D} = Xtrue ] ; then
458    if [ ${action} = true ] ; then
459        #IGCM_debug_Print 2 "Potentials CompletedFlag: ${PotentialCompletedFlag2D[*]}"
460        IGCM_debug_Print 2 -e "\033[1;31mSubmit 2D\033[m without chunck period ${DateBegin}-${DateEnd}"
461        listVarEnv="libIGCM,SUBMIT_DIR,POST_DIR,DateBegin,PeriodDateEnd,CompletedFlag,TsTask"
462        export libIGCM=${libIGCM}
463        export SUBMIT_DIR=${CARD_DIR}
464        export POST_DIR=${POST_DIR}
465        export DateBegin=${DateBegin}
466        export PeriodDateEnd=${DateEnd}
467        export CompletedFlag=${CompletedFlag}
468        export TsTask=2D
469        export listVarEnv=${listVarEnv}
470        IGCM_sys_MkdirWork ${POST_DIR}
471        IGCM_debug_Verif_Exit_Post
472        Script_Post_Output=create_ts.${PeriodDateEnd}.${TsTask}
473        IGCM_sys_QsubPost create_ts
474        echo
475    else
476        IGCM_debug_Print 2 -e "\033[1;31mI should NOW submit 2D without chunck\033[m period ${DateBegin}-${DateEnd}"
477    fi
478fi
479
480if [ X${Launch3D} = Xtrue ] ; then
481    if [ ${action} = true ] ; then
482        #IGCM_debug_Print 2 "Potentials CompletedFlag: ${PotentialCompletedFlag3D[*]}"
483        IGCM_debug_Print 2 -e "\033[1;31mSubmit 3D\033[m without chunck period ${DateBegin}-${DateEnd}"
484        listVarEnv="libIGCM,SUBMIT_DIR,POST_DIR,DateBegin,PeriodDateEnd,CompletedFlag,TsTask"
485        export libIGCM=${libIGCM}
486        export SUBMIT_DIR=${CARD_DIR}
487        export POST_DIR=${POST_DIR}
488        export DateBegin=${DateBegin}
489        export PeriodDateEnd=${DateEnd}
490        export CompletedFlag=${CompletedFlag}
491        export TsTask=3D
492        export listVarEnv=${listVarEnv}
493        IGCM_sys_MkdirWork ${POST_DIR}
494        IGCM_debug_Verif_Exit_Post
495        Script_Post_Output=create_ts.${PeriodDateEnd}.${TsTask}
496        IGCM_sys_QsubPost create_ts
497        echo
498    else
499        IGCM_debug_Print 2 -e "\033[1;31mI should NOW submit 3D without chunck\033[m  period ${DateBegin}-${DateEnd}"
500    fi
501fi
Note: See TracBrowser for help on using the repository browser.