source: trunk/libIGCM/AA_TimeSeries_Checker

Last change on this file was 1626, checked in by jgipsl, 3 months ago

Correction of the case when ChunkJob2D or ChunkJob3D is set to OFF. This also avoids error when the list is empty. Bug found by Lucas Bastien.

  • 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: 21.9 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# ID of your genci project. Curie only : post-processing jobs need it to run properly
14#-Q- curie export BRIDGE_MSUB_PROJECT=::default_project::
15#-Q- irene export BRIDGE_MSUB_PROJECT=::default_project::
16#-Q- irene-amd export BRIDGE_MSUB_PROJECT=::default_project::
17
18#D- Task type DO NOT CHANGE (computing, post-processing or checking)
19TaskType=checking
20
21#D- Low level debug : to perform lib test checks, stack construction and IO functions instrumentation
22DEBUG_debug=false
23
24#D- Messaging : all activities and call stacks will be sent to ipsl servers
25BigBrother=false
26
27# Check that everything went well during time series production
28# Display a short report
29# Launch what's missing
30# For use during a run (not on the end : PeriodState=Completed), it will complete
31# all TS to last PeriodDateEnd value, give by run.card->Configuration->(PeriodDateBegin - 1).
32
33#D- Path to libIGCM
34#D- Default : value from AA_job if any
35libIGCM=${libIGCM:=::modipsl::/libIGCM}
36
37# répertoire courrant
38CURRENT_DIR=$( pwd )
39
40# Emplacement des cartes
41CARD_DIR=${CARD_DIR:=${CURRENT_DIR}}
42
43# répertoire de stockage des sorties des create_ts
44POST_DIR=${POST_DIR:=${CARD_DIR}/OutScript}
45
46if [ ! -d ${CARD_DIR} ]; then
47  echo "No ${CARD_DIR}, we stop here"
48  exit
49fi
50
51########################################################################
52
53. ${libIGCM}/libIGCM_debug/libIGCM_debug.ksh
54. ${libIGCM}/libIGCM_card/libIGCM_card.ksh
55. ${libIGCM}/libIGCM_date/libIGCM_date.ksh
56#-------
57. ${libIGCM}/libIGCM_sys/libIGCM_sys.ksh
58. ${libIGCM}/libIGCM_config/libIGCM_config.ksh
59#-------
60( ${DEBUG_debug} ) && IGCM_debug_Check
61( ${DEBUG_debug} ) && IGCM_card_Check
62( ${DEBUG_debug} ) && IGCM_date_Check
63
64########################################################################
65
66#set -vx
67
68echo "Hi I'm here to help you complete the time series production you planned according to your *.card."
69echo "This action can potentially submit numbers of jobs (up to 50)"
70echo "This action can potentially remove unnecessary files but I will ALWAYS ask permission to do so"
71echo -e "\033[1;31mDo you want me to run in dryrun mode just telling what I would submit?\033[m"
72echo -e "\033[1;31mOr do you want me to submit job for real? Answer yes in this case.\033[m"
73echo -n " Run for real (y/n) :"
74read ActionAnswer
75
76case ${ActionAnswer} in
77oui|OUI|o|y|yes|YES)
78  echo "OK. I will submit jobs but ask permissions before removing files"
79  action=true
80  ;;
81non|NON|n|no|NO)
82  echo "OK. I won't submit jobs and only print out files I could remove"
83  action=false
84  ;;
85*)
86  echo "I did not recognize your answer. I will stop here."
87  echo "Please respond: oui|OUI|o|y|yes|YES"
88  echo "Or please respond: non|NON|n|no|NO"
89  exit
90  ;;
91esac
92
93#==================================
94# First of all
95#
96# Read libIGCM compatibility version in config.card
97# Read UserChoices section
98# Read Ensemble section
99# Read Post section
100# Define all netcdf output directories
101#==================================
102IGCM_config_CommonConfiguration ${CARD_DIR}/config.card
103
104#==================================
105# Read ListOfComponents section:
106IGCM_card_DefineArrayFromSection ${CARD_DIR}/config.card ListOfComponents
107
108if [ -f ${CARD_DIR}/run.card ] ; then
109  IGCM_card_DefineVariableFromOption ${CARD_DIR}/run.card Configuration PeriodState
110  IGCM_card_DefineVariableFromOption ${CARD_DIR}/run.card Configuration PeriodDateBegin
111  IGCM_card_DefineVariableFromOption ${CARD_DIR}/run.card PostProcessing TimeSeriesCompleted
112  IGCM_debug_Print 1 "DefineVariableFromOption  : run_Configuration"
113  IGCM_debug_PrintVariables 3 run_Configuration_PeriodState
114  IGCM_debug_Print 1 "DefineVariableFromOption  : run_PostProcessing"
115  IGCM_debug_PrintVariables 3 run_PostProcessing_TimeSeriesCompleted
116  if [ X${run_Configuration_PeriodState} != X"Completed" ] ; then
117    DateEnd=$( IGCM_date_AddDaysToGregorianDate $( IGCM_date_ConvertFormatToGregorian ${run_Configuration_PeriodDateBegin} ) -1 )
118  else
119    DateEnd=$( IGCM_date_ConvertFormatToGregorian ${config_UserChoices_DateEnd} )
120  fi
121  CompletedFlag=${run_PostProcessing_TimeSeriesCompleted}
122else
123  DateEnd=$( IGCM_date_ConvertFormatToGregorian ${config_UserChoices_DateEnd} )
124  CompletedFlag=""
125fi
126SavedCompletedFlag=${CompletedFlag}
127DateBegin=$( IGCM_date_ConvertFormatToGregorian ${config_UserChoices_DateBegin} )
128
129IGCM_date_GetYearMonth ${DateBegin} YearBegin MonthBegin
130IGCM_date_GetYearMonth ${DateEnd}   YearEnd   MonthEnd
131
132echo
133IGCM_debug_Print 1 "DateBegin for TimeSeries_Checker : "${DateBegin}
134IGCM_debug_Print 1 "DateEnd   for TimeSeries_Checker : "${DateEnd}
135IGCM_debug_Print 1 "CompletedFlag = "${CompletedFlag}
136echo
137
138for comp in ${config_ListOfComponents[*]} ; do
139  # Debug Print
140  IGCM_debug_Print 1 ${comp}
141  # Define component
142  IGCM_card_DefineArrayFromOption ${CARD_DIR}/config.card ListOfComponents ${comp}
143  eval compname=\${config_ListOfComponents_${comp}[0]} > /dev/null 2>&1
144  eval comptagname=\${config_ListOfComponents_${comp}[1]} > /dev/null 2>&1
145
146  # Read libIGCM compatibility version in ${compname}.card
147  card=${CARD_DIR}/COMP/${compname}.card
148
149  # Read and Build Output File stuff
150  #IGCM_debug_Print 1 "DefineArrayFromOption  : ${compname}_OutputFiles ${card}"
151  IGCM_card_DefineArrayFromOption ${card} OutputFiles List
152  ListFilesName=${compname}_OutputFiles_List
153  eval FileName0=\${${ListFilesName}[0]} > /dev/null 2>&1
154  #
155  if [ X${FileName0} != X${NULL_STR} ] ; then
156    #
157    #IGCM_debug_Print 1 "Component      : ${compname}"
158    #
159    # INITIALISATION
160    #
161    eval NbFiles=\${#${ListFilesName}[@]} > /dev/null 2>&1
162    i=2
163    #
164    until [ $i -ge $NbFiles ]; do
165      #
166      eval flag_post=\${${ListFilesName}[$i]} > /dev/null 2>&1
167      #
168      if [ X${flag_post} != XNONE ] ; then
169        #
170        # First of all
171        #
172        IGCM_card_DefineArrayFromSection ${card} ${flag_post}
173        #
174        IGCM_card_DefineArrayFromOption ${card} ${flag_post} TimeSeriesVars
175        IGCM_card_DefineArrayFromOption ${card} ${flag_post} Patches
176        if [ X"$( eval echo \${${compname}_${flag_post}_TimeSeriesVars[*]} )" = X"Option not" ] ; then
177          # New TimeSeriesVar description, with 2D, 3D and associate ChunckJob.
178          unset ListDimension
179          ListDimension[0]=2D
180          ListDimension[1]=3D
181          TimeSeries=false
182          TimeSeries2D=false
183          TimeSeries3D=false
184          chunck=false
185          iLoop=${#ListDimension[*]}
186          j=0
187          until [ $j -ge ${iLoop} ]; do
188            Dimension=${ListDimension[${j}]}
189            IGCM_card_DefineArrayFromOption ${card} ${flag_post} TimeSeriesVars${Dimension}
190            IGCM_card_DefineVariableFromOption ${card} ${flag_post} ChunckJob${Dimension}
191            #
192            # Time series WITHOUT chunk
193            #
194            if [ ! $( eval echo \${${compname}_${flag_post}_TimeSeriesVars${Dimension}} ) = ${NULL_STR} ] ; then
195              if [ $( eval echo \${${compname}_${flag_post}_ChunckJob${Dimension}} ) = NONE ] ; then
196                IGCM_debug_Print 2 "${Dimension} time series activated for ${flag_post}"
197                eval TimeSeries${Dimension}=true
198                chunck=false
199              fi
200            fi
201            #
202            # Time series WITH chunk
203            #
204            if [ ! $( eval echo \${${compname}_${flag_post}_TimeSeriesVars${Dimension}} ) = ${NULL_STR} ] ; then
205              chunck_size=$( eval echo \${${compname}_${flag_post}_ChunckJob${Dimension}} )
206              if [ ! ${chunck_size} = NONE ] &&  [ ! ${chunck_size} = OFF ] ; then
207                IGCM_debug_Print 2 "${Dimension} time series activated with ${chunck_size} chunck for ${flag_post}"
208                eval TimeSeriesChunck${Dimension}=true
209                chunck=true
210              fi
211            fi
212            (( j=j+1 ))
213            #
214            # If TimeSeriesVars list is empty or OFF we skip
215            #
216            if ( [ $( eval echo \${${compname}_${flag_post}_TimeSeriesVars${Dimension}} ) = ${NULL_STR} ] || \
217              [ ${chunck_size} = OFF ] ) ; then
218              IGCM_debug_Print 2 "Empty TS : ${compname}_${flag_post}_TimeSeriesVars${Dimension}"
219              continue
220            fi
221            #
222            #  ICI ON TESTE QUE LES FICHIERS TS SONT LA!
223            #
224            FILE=$( echo ${flag_post} | awk "-FPost_" '{print $2}' )
225            IGCM_card_DefineArrayFromOption ${card}    Post_${FILE} TimeSeriesVars${Dimension}
226            IGCM_card_DefineVariableFromOption ${card} Post_${FILE} ChunckJob${Dimension}
227            #
228            FlagDir=$( echo ${FILE} | awk -F "_" '{print $1}' )
229            case ${FlagDir} in
230            *Y)  TS_Dir=TS_YE  ;;
231            *M)  TS_Dir=TS_MO  ;;
232            *D)  TS_Dir=TS_DA  ;;
233            3H|HF)  TS_Dir=TS_HF  ;;
234            INS) TS_Dir=TS_INS ;;
235            esac
236            #
237            # We need LIST of variables not allready produced (useful for standalone mode)
238            #
239            DateBegin=$( IGCM_date_ConvertFormatToGregorian ${config_UserChoices_DateBegin} )
240            IGCM_date_GetYearMonth ${DateBegin} YearBegin MonthBegin
241
242            # Si on n'a pas de chunck, dans ce cas chunck_size=la durée de la simulation en années
243            YearsChunckLength=$( echo ${chunck_size} | sed -e "s/[yY]//" )
244            [ ${chunck} = false ] && YearsChunckLength=$(( YearEnd - YearBegin + 1 ))
245
246            NbYearsChunckLoop=$(( ( YearEnd - YearBegin + 1 ) / YearsChunckLength ))
247            Reste=$(( ( YearEnd - YearBegin + 1 ) % YearsChunckLength ))
248
249            if [ ${Reste} -ne 0 ] ; then
250              NbYearsChunckLoop=$(( NbYearsChunckLoop + 1 ))
251            fi
252
253            if [ ${NbYearsChunckLoop} -eq 1 ] ; then
254              PeriodDateEnd=${DateEnd}
255            else
256              Length=$( IGCM_date_DaysInCurrentPeriod ${DateBegin} ${YearsChunckLength}Y )
257              PeriodDateEnd=$( IGCM_date_AddDaysToGregorianDate ${DateBegin} ${Length}-1 )
258            fi
259            #
260            DIRECTORY=${R_SAVE}/${comp}/Analyse/${TS_Dir}
261            YearsChunckLoop=1
262            ChunckDebut=${DateBegin}
263            ChunckFin=${PeriodDateEnd}
264            while [ ${YearsChunckLoop} -le ${NbYearsChunckLoop} ] ; do
265              countTotal=0
266              countGood=0
267              countBad=0
268              unset RemoveList
269              unset PotentialCompletedFlag
270              for var in $( eval echo \${${compname}_Post_${FILE}_TimeSeriesVars${Dimension}[*]} ) ; do
271                TestedFile=${config_UserChoices_JobName}_${ChunckDebut}_${ChunckFin}_${FlagDir}_${var}.nc
272                #
273                DEBUG_sys=false IGCM_sys_TestDirArchive ${DIRECTORY}
274                if [ $? = 0 ] ; then
275                  Candidat=$( find ${DIRECTORY} -name "${config_UserChoices_JobName}_${ChunckDebut}_*_${FlagDir}_${var}.nc" )
276                else
277                  Candidat=""
278                fi
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} in ${DIRECTORY} :"
313                  IGCM_debug_Print 3 ${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              #
364              # TO REWRITE BEGIN
365              #
366              if ( [ ${chunck} = true ] && [ ${SuccessRate} -ne 100 ] ) ; then
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                    ChunckCompletedFlag=${PotentialCompletedFlag[0]}
389                    IGCM_debug_Print 2 -e "\033[1;31mToo Many Potential CompletedFlag\033[m Let start with first CompletedPeriod"
390                    IGCM_debug_Print 2 -e "\033[1;31mYou will have to redo TimeSeries_Checker\033[m for other period."
391                  fi
392                fi
393                #
394                # TO REWRITE END
395                #
396                if [ ${action} = true ] ; then
397                  IGCM_debug_Print 2 -e "\033[1;31mSubmit ${FILE} chunck ${Dimension}\033[m period ${ChunckDebut}-${ChunckFin} and CompletedFlag=${ChunckCompletedFlag}"
398                  listVarEnv="DEBUG_debug,BigBrother,libIGCM,SUBMIT_DIR,POST_DIR,Script_Post_Output,DateBegin,PeriodDateEnd,CompletedFlag,TsTask,CompToRead,FlagToRead"
399                  export DEBUG_debug=${DEBUG_debug}
400                  export BigBrother=${BigBrother}
401                  export libIGCM=${libIGCM}
402                  export SUBMIT_DIR=${CARD_DIR}
403                  export POST_DIR=${POST_DIR}
404                  export DateBegin=${ChunckDebut}
405                  export PeriodDateEnd=${ChunckFin}
406                  export CompletedFlag=${ChunckCompletedFlag}
407                  export TsTask=Chunck${Dimension}
408                  export CompToRead=${comp}
409                  export FlagToRead=${i}
410                  export NameToRead=${flag_post}
411                  export listVarEnv=${listVarEnv}
412                  export Script_Post_Output=create_ts.${PeriodDateEnd}.${TsTask}.${CompToRead}.${NameToRead}
413                  IGCM_sys_MkdirWork ${POST_DIR}
414                  IGCM_debug_Verif_Exit
415                  IGCM_sys_QsubPost create_ts
416                  echo
417                else
418                  IGCM_debug_Print 2 -e "\033[1;31mI should NOW submit ${FILE} chunck ${Dimension}\033[m period ${ChunckDebut}-${ChunckFin} and CompletedFlag=${ChunckCompletedFlag}"
419                fi
420              fi
421
422              if ( [ ${chunck} = false ] && [ ${SuccessRate} -ne 100 ] ) ; then
423                eval Launch${Dimension}=true
424              fi
425
426              # Date update
427              ChunckDebut=$( IGCM_date_AddDaysToGregorianDate ${ChunckFin} 1 )
428
429              (( YearsChunckLoop = YearsChunckLoop + 1 ))
430
431              if [ ${YearsChunckLoop} -eq ${NbYearsChunckLoop} ] ; then
432                ChunckFin=${DateEnd}
433              else
434                Length=$( IGCM_date_DaysInCurrentPeriod ${ChunckDebut} ${YearsChunckLength}Y )
435                ChunckFin=$( IGCM_date_AddDaysToGregorianDate ${ChunckDebut} ${Length}-1 )
436              fi
437            done
438          done
439        else
440          ListDimension[0]=""
441          TimeSeries=true
442          TimeSeries2D=false
443          TimeSeries3D=false
444          TimeSeriesChunck2D=false
445          TimeSeriesChunck3D=false
446        fi
447      fi
448      (( i_ = i+1 ))
449      eval Testvar_=\${${ListFilesName}[$i_]} > /dev/null 2>&1
450      eval Testvar=${Testvar_}
451      if [[ ${Testvar} =~ [0-9][DMY]$ ]] ; then
452          (( i = i+4 ))
453      else
454      (( i=i+3 ))
455      fi
456    done
457  fi
458done # comp loop
459
460echo
461
462DateBegin=$( IGCM_date_ConvertFormatToGregorian ${config_UserChoices_DateBegin} )
463IGCM_date_GetYearMonth ${DateBegin} YearBegin MonthBegin
464CompletedFlag=${SavedCompletedFlag}
465
466unset CompToRead
467unset FlagToRead
468
469if [ X${Launch2D} = Xtrue ] ; then
470  if [ ${action} = true ] ; then
471    #IGCM_debug_Print 2 "Potentials CompletedFlag: ${PotentialCompletedFlag2D[*]}"
472    IGCM_debug_Print 2 -e "\033[1;31mSubmit 2D\033[m without chunck period ${DateBegin}-${DateEnd}"
473    listVarEnv="DEBUG_debug,BigBrother,libIGCM,SUBMIT_DIR,POST_DIR,Script_Post_Output,DateBegin,PeriodDateEnd,CompletedFlag,TsTask"
474    export DEBUG_debug=${DEBUG_debug}
475    export BigBrother=${BigBrother}
476    export libIGCM=${libIGCM}
477    export SUBMIT_DIR=${CARD_DIR}
478    export POST_DIR=${POST_DIR}
479    export DateBegin=${DateBegin}
480    export PeriodDateEnd=${DateEnd}
481    export CompletedFlag=${CompletedFlag}
482    export TsTask=2D
483    export listVarEnv=${listVarEnv}
484    export Script_Post_Output=create_ts.${PeriodDateEnd}.${TsTask}
485    IGCM_sys_MkdirWork ${POST_DIR}
486    IGCM_debug_Verif_Exit
487    IGCM_sys_QsubPost create_ts
488    echo
489  else
490    IGCM_debug_Print 2 -e "\033[1;31mI should NOW submit 2D without chunck\033[m period ${DateBegin}-${DateEnd}"
491  fi
492fi
493
494if [ X${Launch3D} = Xtrue ] ; then
495  if [ ${action} = true ] ; then
496    #IGCM_debug_Print 2 "Potentials CompletedFlag: ${PotentialCompletedFlag3D[*]}"
497    IGCM_debug_Print 2 -e "\033[1;31mSubmit 3D\033[m without chunck period ${DateBegin}-${DateEnd}"
498    listVarEnv="DEBUG_debug,BigBrother,libIGCM,SUBMIT_DIR,POST_DIR,Script_Post_Output,DateBegin,PeriodDateEnd,CompletedFlag,TsTask"
499    export DEBUG_debug=${DEBUG_debug}
500    export BigBrother=${BigBrother}
501    export libIGCM=${libIGCM}
502    export SUBMIT_DIR=${CARD_DIR}
503    export POST_DIR=${POST_DIR}
504    export DateBegin=${DateBegin}
505    export PeriodDateEnd=${DateEnd}
506    export CompletedFlag=${CompletedFlag}
507    export TsTask=3D
508    export listVarEnv=${listVarEnv}
509    export Script_Post_Output=create_ts.${PeriodDateEnd}.${TsTask}
510    IGCM_sys_MkdirWork ${POST_DIR}
511    IGCM_debug_Verif_Exit
512    IGCM_sys_QsubPost create_ts
513    echo
514  else
515    IGCM_debug_Print 2 -e "\033[1;31mI should NOW submit 3D without chunck\033[m  period ${DateBegin}-${DateEnd}"
516  fi
517fi
Note: See TracBrowser for help on using the repository browser.