source: trunk/libIGCM/AA_TimeSeries_Checker @ 401

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