source: trunk/libIGCM/AA_TimeSeries_Checker @ 1281

Last change on this file since 1281 was 1281, checked in by acosce, 8 years ago

Add on comment line on genci project number to launch on Curie computer

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