source: trunk/libIGCM/AA_TimeSeries_Checker @ 1073

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