source: trunk/libIGCM/AA_TimeSeries_Checker @ 1604

Last change on this file since 1604 was 1603, checked in by aclsce, 8 months ago
  • Changed libIGCM behaviour in case of pb in pack_output.job : now, we exit from the job if there is any problem, whatever we are in PROD, DEVT, TEST mode.
  • Specification of pack frequency per file :

In order to reduce the number of inodes, it is possible to specify by file the frequency of packing. The syntax to do that is in the 4th column of OutputFiles? section of the component.card, for example as follows in lmdz.card :
[OutputFiles?]
List= (histmth.nc, ${R_OUT_ATM_O_M}/${PREFIX}_1M_histmth.nc, Post_1M_histmth, 100Y), \

(histday.nc, ${R_OUT_ATM_O_D}/${PREFIX}_1D_histday.nc, Post_1D_histday, 10Y), \

...

In this example, histmth files will be packed every 100 years and histday files will be packed every 10 years.
The pack frequency you defined in config.card is the frequency of pack by default, that means if a specific frequency of pack is specified for a file in a component.card, this file will be packed at the specific frequency whereas all other files will be packed at global pack frequency (specified in config.card) and in this case, the frequency pack (from the config.card) is the frequency the pack_output job will be launched at.
There is a constraint to use this fonctionality : the Packfrequency you defined in config.card must be greater or equal to the pack frequencies you specified for each type of file in component.card, otherwise the computing job will be stopped (with an explicit error message).
Surpack mode :
A surpack mode functionality is available through the use of pack_output.job. To enable this functionality, you have to put "surpack_mode=y" (default value is n). The way to use is similar to restart post-processing pack_output jobs, as indicated here : http://forge.ipsl.jussieu.fr/igcmg_doc/wiki/Doc/CheckDebug#RestartPack_output. You can either use a global pack frequency in config.card or specific pack frequency per file, as explained above.

  • 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: 22.1 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}_Post_${FILE}_TimeSeriesVars${Dimension}"
219              #(( i=i+3 ))
220                (( i_ = i+1 ))
221                eval Testvar_=\${${ListFilesName}[$i_]} > /dev/null 2>&1
222                eval Testvar=${Testvar_}
223                if [[ ${Testvar} =~ [0-9][DMY]$ ]] ; then
224                    (( i = i+4 ))
225                else
226                    (( i = i+3 ))
227                fi         
228              continue
229            fi
230            #
231            #  ICI ON TESTE QUE LES FICHIERS TS SONT LA!
232            #
233            FILE=$( echo ${flag_post} | awk "-FPost_" '{print $2}' )
234            IGCM_card_DefineArrayFromOption ${card}    Post_${FILE} TimeSeriesVars${Dimension}
235            IGCM_card_DefineVariableFromOption ${card} Post_${FILE} ChunckJob${Dimension}
236            #
237            FlagDir=$( echo ${FILE} | awk -F "_" '{print $1}' )
238            case ${FlagDir} in
239            *Y)  TS_Dir=TS_YE  ;;
240            *M)  TS_Dir=TS_MO  ;;
241            *D)  TS_Dir=TS_DA  ;;
242            3H|HF)  TS_Dir=TS_HF  ;;
243            INS) TS_Dir=TS_INS ;;
244            esac
245            #
246            # We need LIST of variables not allready produced (useful for standalone mode)
247            #
248            DateBegin=$( IGCM_date_ConvertFormatToGregorian ${config_UserChoices_DateBegin} )
249            IGCM_date_GetYearMonth ${DateBegin} YearBegin MonthBegin
250
251            # Si on n'a pas de chunck, dans ce cas chunck_size=la durée de la simulation en années
252            YearsChunckLength=$( echo ${chunck_size} | sed -e "s/[yY]//" )
253            [ ${chunck} = false ] && YearsChunckLength=$(( YearEnd - YearBegin + 1 ))
254
255            NbYearsChunckLoop=$(( ( YearEnd - YearBegin + 1 ) / YearsChunckLength ))
256            Reste=$(( ( YearEnd - YearBegin + 1 ) % YearsChunckLength ))
257
258            if [ ${Reste} -ne 0 ] ; then
259              NbYearsChunckLoop=$(( NbYearsChunckLoop + 1 ))
260            fi
261
262            if [ ${NbYearsChunckLoop} -eq 1 ] ; then
263              PeriodDateEnd=${DateEnd}
264            else
265              Length=$( IGCM_date_DaysInCurrentPeriod ${DateBegin} ${YearsChunckLength}Y )
266              PeriodDateEnd=$( IGCM_date_AddDaysToGregorianDate ${DateBegin} ${Length}-1 )
267            fi
268            #
269            DIRECTORY=${R_SAVE}/${comp}/Analyse/${TS_Dir}
270            YearsChunckLoop=1
271            ChunckDebut=${DateBegin}
272            ChunckFin=${PeriodDateEnd}
273            while [ ${YearsChunckLoop} -le ${NbYearsChunckLoop} ] ; do
274              countTotal=0
275              countGood=0
276              countBad=0
277              unset RemoveList
278              unset PotentialCompletedFlag
279              for var in $( eval echo \${${compname}_Post_${FILE}_TimeSeriesVars${Dimension}[*]} ) ; do
280                TestedFile=${config_UserChoices_JobName}_${ChunckDebut}_${ChunckFin}_${FlagDir}_${var}.nc
281                #
282                DEBUG_sys=false IGCM_sys_TestDirArchive ${DIRECTORY}
283                if [ $? = 0 ] ; then
284                  Candidat=$( find ${DIRECTORY} -name "${config_UserChoices_JobName}_${ChunckDebut}_*_${FlagDir}_${var}.nc" )
285                else
286                  Candidat=""
287                fi
288                #
289                BestCandidat=${ChunckDebut}
290                #
291                FoundCandidat=false
292                if [ ! "X${Candidat}" = "X" ] ; then
293                  for candid in ${Candidat} ; do
294                    #IGCM_debug_Print 1 -e "\033[1;32m[CompletedFlag CANDIDAT MATCH FOUND]\033[m $( basename ${candid} )"
295                    CandidatEnd=$( echo ${candid}   | awk -F${config_UserChoices_JobName} '{print $3}' | awk -F_ '{print $3}' )
296                    if [ ${CandidatEnd} -gt ${ChunckFin} ] ; then
297                      #IGCM_debug_Print 3 -e "File $( basename ${candid} ) should be suppress"
298                      set +A RemoveList ${RemoveList[*]} ${candid}
299                    elif [ ${CandidatEnd} -lt ${ChunckFin} ] ; then
300                      #IGCM_debug_Print 3 -e "File $( basename ${candid} ) should be suppress or used as a CompletedFlag baseline"
301                      # We keep the best candidat and remove the others
302                      if [ ${BestCandidat} -lt ${CandidatEnd} ] ; then
303                        if [ ${FoundCandidat} = true ] ; then
304                          set +A RemoveList ${RemoveList[*]} ${DIRECTORY}/${config_UserChoices_JobName}_${ChunckDebut}_${BestCandidat}_${FlagDir}_${var}.nc
305                        else
306                          FoundCandidat=true
307                        fi
308                        BestCandidat=${CandidatEnd}
309                      else
310                        set +A RemoveList ${RemoveList[*]} ${candid}
311                      fi
312                    fi
313                  done
314                else
315                  # No CompletedFlag candidat found
316                  CandidatCompletedFlag=""
317                fi
318                #
319                if [ ! -f ${DIRECTORY}/${TestedFile} ] ; then
320                  (( countBad = countBad + 1 ))
321                  [ ${countBad} = 1 ] && IGCM_debug_Print 3 "Missing time series from ${FILE} in ${DIRECTORY} :"
322                  IGCM_debug_Print 3 ${TestedFile}
323                  # Then we keep a track of the Best Candidat
324                  if [ ${FoundCandidat} = true ] ; then
325                    if [ ${chunck} = true ] ; then
326                      set +A PotentialCompletedFlag ${PotentialCompletedFlag[*]} ${BestCandidat}
327                    else
328                      eval set +A PotentialCompletedFlag${Dimension} \${PotentialCompletedFlag${Dimension}[*]} \${BestCandidat}
329                    fi
330                  fi
331                else
332                  (( countGood = countGood + 1 ))
333                  # Then we do not need the best candidat if any
334                  [ ${FoundCandidat} = true ] && set +A RemoveList ${RemoveList[*]} ${DIRECTORY}/${config_UserChoices_JobName}_${ChunckDebut}_${BestCandidat}_${FlagDir}_${var}.nc
335                fi
336                (( countTotal = countTotal + 1 ))
337              done
338
339              SuccessRate=$(( countGood * 100 / countTotal ))
340              if [ ${SuccessRate} -ne 100 ] ; then
341                IGCM_debug_Print 2 -e "\033[1;31m${SuccessRate}% files OK.\033[m for period ${ChunckDebut}-${ChunckFin}"
342              else
343                IGCM_debug_Print 2 -e "\033[1;32m${SuccessRate}% files OK.\033[m for period ${ChunckDebut}-${ChunckFin}"
344              fi
345              echo
346
347              # Remove what's in the RemoveList
348              if [ ${RemoveList} ] ; then
349                IGCM_debug_Print 2 "File(s) that will be removed ${RemoveList[*]}"
350                if [ ${action} = true ] ; then
351                  echo -e "\033[1;32mDo you want to remove them?\033[m"
352                  echo -n " Your answer (y/n) : "
353                  read RemoveAnswer
354                  case ${RemoveAnswer} in
355                  oui|OUI|o|y|yes|YES)
356                    echo "OK. I will erase them"
357                    IGCM_sys_Rm -f ${RemoveList[*]}
358                    ;;
359                  non|NON|n|no|NO)
360                    echo "OK. I won't erase them"
361                    ;;
362                  *)
363                    echo "I did not recognize your answer."
364                    echo "Please respond: oui|OUI|o|y|yes|YES"
365                    echo "Or please respond: non|NON|n|no|NO"
366                    exit
367                    ;;
368                  esac
369                fi
370              fi
371              #[ ${FoundCandidat} = true ] && IGCM_debug_Print 2 "Potentials CompletedFlag: ${PotentialCompletedFlag[*]}"
372              #
373              # TO REWRITE BEGIN
374              #
375              if ( [ ${chunck} = true ] && [ ${SuccessRate} -ne 100 ] ) ; then
376                NbCandidats=${#PotentialCompletedFlag[@]}
377                countCandid=1
378                if [ ${NbCandidats} -eq 0 ] ; then
379                  ChunckCompletedFlag=""
380                  IGCM_debug_Print 2 -e "\033[1;31mNO CompletedFlag\033[m"
381                elif [ ${NbCandidats} -eq 1 ] ; then
382                  ChunckCompletedFlag=${PotentialCompletedFlag[0]}
383                  IGCM_debug_Print 2 -e "\033[1;32mCompletedFlag=${ChunckCompletedFlag}\033[m"
384                elif [ ${NbCandidats} -gt 1 ] ; then
385                  k=1
386                  until [ $k -ge ${NbCandidats} ]; do
387                    ((k_m1=k-1))
388                    if [ ${PotentialCompletedFlag[${k_m1}]} = ${PotentialCompletedFlag[${k}]} ] ; then
389                      ((countCandid=countCandid+1))
390                    fi
391                    ((k=k+1))
392                  done
393                  if [ ${NbCandidats} -eq ${countCandid} ] ; then
394                    ChunckCompletedFlag=${PotentialCompletedFlag[0]}
395                    IGCM_debug_Print 2 -e "\033[1;32mCompletedFlag=${ChunckCompletedFlag}\033[m"
396                  else
397                    ChunckCompletedFlag=${PotentialCompletedFlag[0]}
398                    IGCM_debug_Print 2 -e "\033[1;31mToo Many Potential CompletedFlag\033[m Let start with first CompletedPeriod"
399                    IGCM_debug_Print 2 -e "\033[1;31mYou will have to redo TimeSeries_Checker\033[m for other period."
400                  fi
401                fi
402                #
403                # TO REWRITE END
404                #
405                if [ ${action} = true ] ; then
406                  IGCM_debug_Print 2 -e "\033[1;31mSubmit ${FILE} chunck ${Dimension}\033[m period ${ChunckDebut}-${ChunckFin} and CompletedFlag=${ChunckCompletedFlag}"
407                  listVarEnv="DEBUG_debug,BigBrother,libIGCM,SUBMIT_DIR,POST_DIR,Script_Post_Output,DateBegin,PeriodDateEnd,CompletedFlag,TsTask,CompToRead,FlagToRead"
408                  export DEBUG_debug=${DEBUG_debug}
409                  export BigBrother=${BigBrother}
410                  export libIGCM=${libIGCM}
411                  export SUBMIT_DIR=${CARD_DIR}
412                  export POST_DIR=${POST_DIR}
413                  export DateBegin=${ChunckDebut}
414                  export PeriodDateEnd=${ChunckFin}
415                  export CompletedFlag=${ChunckCompletedFlag}
416                  export TsTask=Chunck${Dimension}
417                  export CompToRead=${comp}
418                  export FlagToRead=${i}
419                  export NameToRead=${flag_post}
420                  export listVarEnv=${listVarEnv}
421                  export Script_Post_Output=create_ts.${PeriodDateEnd}.${TsTask}.${CompToRead}.${NameToRead}
422                  IGCM_sys_MkdirWork ${POST_DIR}
423                  IGCM_debug_Verif_Exit
424                  IGCM_sys_QsubPost create_ts
425                  echo
426                else
427                  IGCM_debug_Print 2 -e "\033[1;31mI should NOW submit ${FILE} chunck ${Dimension}\033[m period ${ChunckDebut}-${ChunckFin} and CompletedFlag=${ChunckCompletedFlag}"
428                fi
429              fi
430
431              if ( [ ${chunck} = false ] && [ ${SuccessRate} -ne 100 ] ) ; then
432                eval Launch${Dimension}=true
433              fi
434
435              # Date update
436              ChunckDebut=$( IGCM_date_AddDaysToGregorianDate ${ChunckFin} 1 )
437
438              (( YearsChunckLoop = YearsChunckLoop + 1 ))
439
440              if [ ${YearsChunckLoop} -eq ${NbYearsChunckLoop} ] ; then
441                ChunckFin=${DateEnd}
442              else
443                Length=$( IGCM_date_DaysInCurrentPeriod ${ChunckDebut} ${YearsChunckLength}Y )
444                ChunckFin=$( IGCM_date_AddDaysToGregorianDate ${ChunckDebut} ${Length}-1 )
445              fi
446            done
447          done
448        else
449          ListDimension[0]=""
450          TimeSeries=true
451          TimeSeries2D=false
452          TimeSeries3D=false
453          TimeSeriesChunck2D=false
454          TimeSeriesChunck3D=false
455        fi
456      fi
457      (( i_ = i+1 ))
458      eval Testvar_=\${${ListFilesName}[$i_]} > /dev/null 2>&1
459      eval Testvar=${Testvar_}
460      if [[ ${Testvar} =~ [0-9][DMY]$ ]] ; then
461          (( i = i+4 ))
462      else
463      (( i=i+3 ))
464      fi
465    done
466  fi
467done # comp loop
468
469echo
470
471DateBegin=$( IGCM_date_ConvertFormatToGregorian ${config_UserChoices_DateBegin} )
472IGCM_date_GetYearMonth ${DateBegin} YearBegin MonthBegin
473CompletedFlag=${SavedCompletedFlag}
474
475unset CompToRead
476unset FlagToRead
477
478if [ X${Launch2D} = Xtrue ] ; then
479  if [ ${action} = true ] ; then
480    #IGCM_debug_Print 2 "Potentials CompletedFlag: ${PotentialCompletedFlag2D[*]}"
481    IGCM_debug_Print 2 -e "\033[1;31mSubmit 2D\033[m without chunck period ${DateBegin}-${DateEnd}"
482    listVarEnv="DEBUG_debug,BigBrother,libIGCM,SUBMIT_DIR,POST_DIR,Script_Post_Output,DateBegin,PeriodDateEnd,CompletedFlag,TsTask"
483    export DEBUG_debug=${DEBUG_debug}
484    export BigBrother=${BigBrother}
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=2D
492    export listVarEnv=${listVarEnv}
493    export Script_Post_Output=create_ts.${PeriodDateEnd}.${TsTask}
494    IGCM_sys_MkdirWork ${POST_DIR}
495    IGCM_debug_Verif_Exit
496    IGCM_sys_QsubPost create_ts
497    echo
498  else
499    IGCM_debug_Print 2 -e "\033[1;31mI should NOW submit 2D without chunck\033[m period ${DateBegin}-${DateEnd}"
500  fi
501fi
502
503if [ X${Launch3D} = Xtrue ] ; then
504  if [ ${action} = true ] ; then
505    #IGCM_debug_Print 2 "Potentials CompletedFlag: ${PotentialCompletedFlag3D[*]}"
506    IGCM_debug_Print 2 -e "\033[1;31mSubmit 3D\033[m without chunck period ${DateBegin}-${DateEnd}"
507    listVarEnv="DEBUG_debug,BigBrother,libIGCM,SUBMIT_DIR,POST_DIR,Script_Post_Output,DateBegin,PeriodDateEnd,CompletedFlag,TsTask"
508    export DEBUG_debug=${DEBUG_debug}
509    export BigBrother=${BigBrother}
510    export libIGCM=${libIGCM}
511    export SUBMIT_DIR=${CARD_DIR}
512    export POST_DIR=${POST_DIR}
513    export DateBegin=${DateBegin}
514    export PeriodDateEnd=${DateEnd}
515    export CompletedFlag=${CompletedFlag}
516    export TsTask=3D
517    export listVarEnv=${listVarEnv}
518    export Script_Post_Output=create_ts.${PeriodDateEnd}.${TsTask}
519    IGCM_sys_MkdirWork ${POST_DIR}
520    IGCM_debug_Verif_Exit
521    IGCM_sys_QsubPost create_ts
522    echo
523  else
524    IGCM_debug_Print 2 -e "\033[1;31mI should NOW submit 3D without chunck\033[m  period ${DateBegin}-${DateEnd}"
525  fi
526fi
Note: See TracBrowser for help on using the repository browser.