source: trunk/libIGCM/AA_TimeSeries_Checker @ 1516

Last change on this file since 1516 was 1437, checked in by jgipsl, 6 years ago

For Irene:

  • ins_job now ask for project id. gch0316 for the grand challenge is the default.
  • headers for more post-processing jobs
  • 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.6 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
17#D- Task type DO NOT CHANGE (computing, post-processing or checking)
18TaskType=checking
19
20#D- Low level debug : to perform lib test checks, stack construction and IO functions instrumentation
21DEBUG_debug=false
22
23#D- Messaging : all activities and call stacks will be sent to ipsl servers
24BigBrother=false
25
26# Check that everything went well during time series production
27# Display a short report
28# Launch what's missing
29# For use during a run (not on the end : PeriodState=Completed), it will complete
30# all TS to last PeriodDateEnd value, give by run.card->Configuration->(PeriodDateBegin - 1).
31
32#D- Path to libIGCM
33#D- Default : value from AA_job if any
34libIGCM=${libIGCM:=::modipsl::/libIGCM}
35
36# répertoire courrant
37CURRENT_DIR=$( pwd )
38
39# Emplacement des cartes
40CARD_DIR=${CARD_DIR:=${CURRENT_DIR}}
41
42# répertoire de stockage des sorties des create_ts
43POST_DIR=${POST_DIR:=${CARD_DIR}/OutScript}
44
45if [ ! -d ${CARD_DIR} ]; then
46  echo "No ${CARD_DIR}, we stop here"
47  exit
48fi
49
50########################################################################
51
52. ${libIGCM}/libIGCM_debug/libIGCM_debug.ksh
53. ${libIGCM}/libIGCM_card/libIGCM_card.ksh
54. ${libIGCM}/libIGCM_date/libIGCM_date.ksh
55#-------
56. ${libIGCM}/libIGCM_sys/libIGCM_sys.ksh
57. ${libIGCM}/libIGCM_config/libIGCM_config.ksh
58#-------
59( ${DEBUG_debug} ) && IGCM_debug_Check
60( ${DEBUG_debug} ) && IGCM_card_Check
61( ${DEBUG_debug} ) && IGCM_date_Check
62
63########################################################################
64
65#set -vx
66
67echo "Hi I'm here to help you complete the time series production you planned according to your *.card."
68echo "This action can potentially submit numbers of jobs (up to 50)"
69echo "This action can potentially remove unnecessary files but I will ALWAYS ask permission to do so"
70echo -e "\033[1;31mDo you want me to run in dryrun mode just telling what I would submit?\033[m"
71echo -e "\033[1;31mOr do you want me to submit job for real? Answer yes in this case.\033[m"
72echo -n " Run for real (y/n) :"
73read ActionAnswer
74
75case ${ActionAnswer} in
76oui|OUI|o|y|yes|YES)
77  echo "OK. I will submit jobs but ask permissions before removing files"
78  action=true
79  ;;
80non|NON|n|no|NO)
81  echo "OK. I won't submit jobs and only print out files I could remove"
82  action=false
83  ;;
84*)
85  echo "I did not recognize your answer. I will stop here."
86  echo "Please respond: oui|OUI|o|y|yes|YES"
87  echo "Or please respond: non|NON|n|no|NO"
88  exit
89  ;;
90esac
91
92#==================================
93# First of all
94#
95# Read libIGCM compatibility version in config.card
96# Read UserChoices section
97# Read Ensemble section
98# Read Post section
99# Define all netcdf output directories
100#==================================
101IGCM_config_CommonConfiguration ${CARD_DIR}/config.card
102
103#==================================
104# Read ListOfComponents section:
105IGCM_card_DefineArrayFromSection ${CARD_DIR}/config.card ListOfComponents
106
107if [ -f ${CARD_DIR}/run.card ] ; then
108  IGCM_card_DefineVariableFromOption ${CARD_DIR}/run.card Configuration PeriodState
109  IGCM_card_DefineVariableFromOption ${CARD_DIR}/run.card Configuration PeriodDateBegin
110  IGCM_card_DefineVariableFromOption ${CARD_DIR}/run.card PostProcessing TimeSeriesCompleted
111  IGCM_debug_Print 1 "DefineVariableFromOption  : run_Configuration"
112  IGCM_debug_PrintVariables 3 run_Configuration_PeriodState
113  IGCM_debug_Print 1 "DefineVariableFromOption  : run_PostProcessing"
114  IGCM_debug_PrintVariables 3 run_PostProcessing_TimeSeriesCompleted
115  if [ X${run_Configuration_PeriodState} != X"Completed" ] ; then
116    DateEnd=$( IGCM_date_AddDaysToGregorianDate $( IGCM_date_ConvertFormatToGregorian ${run_Configuration_PeriodDateBegin} ) -1 )
117  else
118    DateEnd=$( IGCM_date_ConvertFormatToGregorian ${config_UserChoices_DateEnd} )
119  fi
120  CompletedFlag=${run_PostProcessing_TimeSeriesCompleted}
121else
122  DateEnd=$( IGCM_date_ConvertFormatToGregorian ${config_UserChoices_DateEnd} )
123  CompletedFlag=""
124fi
125SavedCompletedFlag=${CompletedFlag}
126DateBegin=$( IGCM_date_ConvertFormatToGregorian ${config_UserChoices_DateBegin} )
127
128IGCM_date_GetYearMonth ${DateBegin} YearBegin MonthBegin
129IGCM_date_GetYearMonth ${DateEnd}   YearEnd   MonthEnd
130
131echo
132IGCM_debug_Print 1 "DateBegin for TimeSeries_Checker : "${DateBegin}
133IGCM_debug_Print 1 "DateEnd   for TimeSeries_Checker : "${DateEnd}
134IGCM_debug_Print 1 "CompletedFlag = "${CompletedFlag}
135echo
136
137for comp in ${config_ListOfComponents[*]} ; do
138  # Debug Print
139  IGCM_debug_Print 1 ${comp}
140  # Define component
141  IGCM_card_DefineArrayFromOption ${CARD_DIR}/config.card ListOfComponents ${comp}
142  eval compname=\${config_ListOfComponents_${comp}[0]} > /dev/null 2>&1
143  eval comptagname=\${config_ListOfComponents_${comp}[1]} > /dev/null 2>&1
144
145  # Read libIGCM compatibility version in ${compname}.card
146  card=${CARD_DIR}/COMP/${compname}.card
147
148  # Read and Build Output File stuff
149  #IGCM_debug_Print 1 "DefineArrayFromOption  : ${compname}_OutputFiles ${card}"
150  IGCM_card_DefineArrayFromOption ${card} OutputFiles List
151  ListFilesName=${compname}_OutputFiles_List
152  eval FileName0=\${${ListFilesName}[0]} > /dev/null 2>&1
153  #
154  if [ X${FileName0} != X${NULL_STR} ] ; then
155    #
156    #IGCM_debug_Print 1 "Component      : ${compname}"
157    #
158    # INITIALISATION
159    #
160    eval NbFiles=\${#${ListFilesName}[@]} > /dev/null 2>&1
161    i=2
162    #
163    until [ $i -ge $NbFiles ]; do
164      #
165      eval flag_post=\${${ListFilesName}[$i]} > /dev/null 2>&1
166      #
167      if [ X${flag_post} != XNONE ] ; then
168        #
169        # First of all
170        #
171        IGCM_card_DefineArrayFromSection ${card} ${flag_post}
172        #
173        IGCM_card_DefineArrayFromOption ${card} ${flag_post} TimeSeriesVars
174        IGCM_card_DefineArrayFromOption ${card} ${flag_post} Patches
175        if [ X"$( eval echo \${${compname}_${flag_post}_TimeSeriesVars[*]} )" = X"Option not" ] ; then
176          # New TimeSeriesVar description, with 2D, 3D and associate ChunckJob.
177          unset ListDimension
178          ListDimension[0]=2D
179          ListDimension[1]=3D
180          TimeSeries=false
181          TimeSeries2D=false
182          TimeSeries3D=false
183          chunck=false
184          iLoop=${#ListDimension[*]}
185          j=0
186          until [ $j -ge ${iLoop} ]; do
187            Dimension=${ListDimension[${j}]}
188            IGCM_card_DefineArrayFromOption ${card} ${flag_post} TimeSeriesVars${Dimension}
189            IGCM_card_DefineVariableFromOption ${card} ${flag_post} ChunckJob${Dimension}
190            #
191            # Time series WITHOUT chunk
192            #
193            if [ ! $( eval echo \${${compname}_${flag_post}_TimeSeriesVars${Dimension}} ) = ${NULL_STR} ] ; then
194              if [ $( eval echo \${${compname}_${flag_post}_ChunckJob${Dimension}} ) = NONE ] ; then
195                IGCM_debug_Print 2 "${Dimension} time series activated for ${flag_post}"
196                eval TimeSeries${Dimension}=true
197                chunck=false
198              fi
199            fi
200            #
201            # Time series WITH chunk
202            #
203            if [ ! $( eval echo \${${compname}_${flag_post}_TimeSeriesVars${Dimension}} ) = ${NULL_STR} ] ; then
204              chunck_size=$( eval echo \${${compname}_${flag_post}_ChunckJob${Dimension}} )
205              if [ ! ${chunck_size} = NONE ] &&  [ ! ${chunck_size} = OFF ] ; then
206                IGCM_debug_Print 2 "${Dimension} time series activated with ${chunck_size} chunck for ${flag_post}"
207                eval TimeSeriesChunck${Dimension}=true
208                chunck=true
209              fi
210            fi
211            (( j=j+1 ))
212            #
213            # If TimeSeriesVars list is empty or OFF we skip
214            #
215            if ( [ $( eval echo \${${compname}_${flag_post}_TimeSeriesVars${Dimension}} ) = ${NULL_STR} ] || \
216              [ ${chunck_size} = OFF ] ) ; then
217              #IGCM_debug_Print 2 "Empty TS : ${compname}_Post_${FILE}_TimeSeriesVars${Dimension}"
218              #(( i=i+3 ))
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+3 ))
449    done
450  fi
451done # comp loop
452
453echo
454
455DateBegin=$( IGCM_date_ConvertFormatToGregorian ${config_UserChoices_DateBegin} )
456IGCM_date_GetYearMonth ${DateBegin} YearBegin MonthBegin
457CompletedFlag=${SavedCompletedFlag}
458
459unset CompToRead
460unset FlagToRead
461
462if [ X${Launch2D} = Xtrue ] ; then
463  if [ ${action} = true ] ; then
464    #IGCM_debug_Print 2 "Potentials CompletedFlag: ${PotentialCompletedFlag2D[*]}"
465    IGCM_debug_Print 2 -e "\033[1;31mSubmit 2D\033[m without chunck period ${DateBegin}-${DateEnd}"
466    listVarEnv="DEBUG_debug,BigBrother,libIGCM,SUBMIT_DIR,POST_DIR,Script_Post_Output,DateBegin,PeriodDateEnd,CompletedFlag,TsTask"
467    export DEBUG_debug=${DEBUG_debug}
468    export BigBrother=${BigBrother}
469    export libIGCM=${libIGCM}
470    export SUBMIT_DIR=${CARD_DIR}
471    export POST_DIR=${POST_DIR}
472    export DateBegin=${DateBegin}
473    export PeriodDateEnd=${DateEnd}
474    export CompletedFlag=${CompletedFlag}
475    export TsTask=2D
476    export listVarEnv=${listVarEnv}
477    export Script_Post_Output=create_ts.${PeriodDateEnd}.${TsTask}
478    IGCM_sys_MkdirWork ${POST_DIR}
479    IGCM_debug_Verif_Exit
480    IGCM_sys_QsubPost create_ts
481    echo
482  else
483    IGCM_debug_Print 2 -e "\033[1;31mI should NOW submit 2D without chunck\033[m period ${DateBegin}-${DateEnd}"
484  fi
485fi
486
487if [ X${Launch3D} = Xtrue ] ; then
488  if [ ${action} = true ] ; then
489    #IGCM_debug_Print 2 "Potentials CompletedFlag: ${PotentialCompletedFlag3D[*]}"
490    IGCM_debug_Print 2 -e "\033[1;31mSubmit 3D\033[m without chunck period ${DateBegin}-${DateEnd}"
491    listVarEnv="DEBUG_debug,BigBrother,libIGCM,SUBMIT_DIR,POST_DIR,Script_Post_Output,DateBegin,PeriodDateEnd,CompletedFlag,TsTask"
492    export DEBUG_debug=${DEBUG_debug}
493    export BigBrother=${BigBrother}
494    export libIGCM=${libIGCM}
495    export SUBMIT_DIR=${CARD_DIR}
496    export POST_DIR=${POST_DIR}
497    export DateBegin=${DateBegin}
498    export PeriodDateEnd=${DateEnd}
499    export CompletedFlag=${CompletedFlag}
500    export TsTask=3D
501    export listVarEnv=${listVarEnv}
502    export Script_Post_Output=create_ts.${PeriodDateEnd}.${TsTask}
503    IGCM_sys_MkdirWork ${POST_DIR}
504    IGCM_debug_Verif_Exit
505    IGCM_sys_QsubPost create_ts
506    echo
507  else
508    IGCM_debug_Print 2 -e "\033[1;31mI should NOW submit 3D without chunck\033[m  period ${DateBegin}-${DateEnd}"
509  fi
510fi
Note: See TracBrowser for help on using the repository browser.