source: trunk/libIGCM/AA_TimeSeries_Checker @ 1143

Last change on this file since 1143 was 1143, checked in by sdipsl, 9 years ago

This trick is not any more mandatory. Rsh/rcp have been modified to reduce latency between 2 successive rcp/rsh command.

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