1 | #!/bin/ksh |
---|
2 | #-Q- cesium #!/bin/ksh |
---|
3 | #-Q- cesium ###################### |
---|
4 | #-Q- cesium ## CESIUM CEA ## |
---|
5 | #-Q- cesium ###################### |
---|
6 | #-Q- cesium #MSUB -r TimeSeries # Nom du job |
---|
7 | #-Q- cesium #MSUB -N 1 # Reservation du noeud |
---|
8 | #-Q- cesium #MSUB -n 1 # Reservation du processus |
---|
9 | #-Q- cesium #MSUB -T 86400 # Limite de temps elapsed du job |
---|
10 | #-Q- cesium #MSUB -E "-j o" |
---|
11 | #-Q- cesium #MSUB -E "-S /bin/ksh" |
---|
12 | #-Q- platine #!/usr/bin/ksh |
---|
13 | #-Q- platine ################### |
---|
14 | #-Q- platine ## PLATINE CEA ## |
---|
15 | #-Q- platine ################### |
---|
16 | #-Q- platine #BSUB -J TimeSeries # Nom du job |
---|
17 | #-Q- platine #BSUB -N # message a la fin du job |
---|
18 | #-Q- platine #BSUB -n 1 # reservation des processeurs pour le job |
---|
19 | #-Q- platine #BSUB -W 1:00 # Limite temps |
---|
20 | #-Q- platine #BSUB -q post # Passage en queue post |
---|
21 | #-Q- sx8brodie #!/bin/ksh |
---|
22 | #-Q- sx8brodie ####################### |
---|
23 | #-Q- sx8brodie ## SX8BRODIE IDRIS ## |
---|
24 | #-Q- sx8brodie ####################### |
---|
25 | #-Q- sx8brodie # Temps Elapsed max. d'une requete hh:mm:ss |
---|
26 | #-Q- sx8brodie # @ wall_clock_limit = 20:00:00 |
---|
27 | #-Q- sx8brodie # Nom du travail LoadLeveler |
---|
28 | #-Q- sx8brodie # @ job_name = TimeSeries |
---|
29 | #-Q- sx8brodie # Fichier de sortie standard du travail |
---|
30 | #-Q- sx8brodie # @ output = $(job_name).$(jobid) |
---|
31 | #-Q- sx8brodie # Fichier de sortie d'erreur du travail |
---|
32 | #-Q- sx8brodie # @ error = $(job_name).$(jobid) |
---|
33 | #-Q- sx8brodie # pour recevoir un mail en cas de depassement du temps Elapsed (ou autre pb.) |
---|
34 | #-Q- sx8brodie # @ notification = error |
---|
35 | #-Q- sx8brodie # @ environment = $DEBUG_debug ; $MODIPSL ; $libIGCM ; $libIGCM_SX ; $SUBMIT_DIR ; $REBUILD_DIR ; $RebuildFromArchive ; $POST_DIR ; $MASTER ; $RebuildFrequency ; $PeriodDateBegin ; $PeriodDateEnd ; $NbRebuildDir ; $StandAlone ; $CompletedFlag ; $TsTask ; $CompToRead ; $FlagToRead ; $RESOL_ATM ; $RESOL_OCE ; $RESOL_ICE ; $RESOL_MBG ; $RESOL_SRF ; $RESOL_SBG ; $MASTER |
---|
36 | #-Q- aix6 #!/bin/ksh |
---|
37 | #-Q- aix6 ####################### |
---|
38 | #-Q- aix6 ## VARGAS IDRIS ## |
---|
39 | #-Q- aix6 ####################### |
---|
40 | #-Q- aix6 # Temps Elapsed max. d'une requete hh:mm:ss |
---|
41 | #-Q- aix6 # @ wall_clock_limit = 20:00:00 |
---|
42 | #-Q- aix6 # Nom du travail LoadLeveler |
---|
43 | #-Q- aix6 # @ job_name = TimeSeries |
---|
44 | #-Q- aix6 # Fichier de sortie standard du travail |
---|
45 | #-Q- aix6 # @ output = $(job_name).$(jobid) |
---|
46 | #-Q- aix6 # Fichier de sortie d'erreur du travail |
---|
47 | #-Q- aix6 # @ error = $(job_name).$(jobid) |
---|
48 | #-Q- aix6 # pour recevoir un mail en cas de depassement du temps Elapsed (ou autre pb.) |
---|
49 | #-Q- aix6 # @ notification = error |
---|
50 | #-Q- aix6 # @ environment = $DEBUG_debug ; $MODIPSL ; $libIGCM ; $libIGCM_SX ; $SUBMIT_DIR ; $REBUILD_DIR ; $RebuildFromArchive ; $POST_DIR ; $MASTER ; $RebuildFrequency ; $DateBegin ; $PeriodDateBegin ; $PeriodDateEnd ; $NbRebuildDir ; $StandAlone ; $CompletedFlag ; $TsTask ; $CompToRead ; $FlagToRead ; $RESOL_ATM ; $RESOL_OCE ; $RESOL_ICE ; $RESOL_MBG ; $RESOL_SRF ; $RESOL_SBG ; $MASTER |
---|
51 | #-Q- aix6 # @ queue |
---|
52 | #-Q- sx8brodie # @ queue |
---|
53 | #-Q- sx8mercure #!/bin/ksh |
---|
54 | #-Q- sx8mercure ###################### |
---|
55 | #-Q- sx8mercure ## SX8MERCURE CEA ## |
---|
56 | #-Q- sx8mercure ###################### |
---|
57 | #-Q- sx8mercure #PBS -N TimeSeries # Nom du job |
---|
58 | #-Q- sx8mercure #PBS -j o # regroupement des stdout et stderr |
---|
59 | #-Q- sx8mercure #PBS -S /usr/bin/ksh # shell de soumission |
---|
60 | #-Q- sx8mercure #PBS -l memsz_job=1gb # Limite memoire a 1 Go |
---|
61 | #-Q- sx8mercure #PBS -l cputim_job=24:00:00 # Limite temps a 2 heures |
---|
62 | #-Q- sx8mercure #PBS -q scalaire |
---|
63 | #-Q- sx9mercure #!/bin/ksh |
---|
64 | #-Q- sx9mercure ######################### |
---|
65 | #-Q- sx9mercure ## CESIUM FOR SX9 CEA ## |
---|
66 | #-Q- sx9mercure ######################### |
---|
67 | #-Q- sx9mercure #MSUB -r TimeSeries # Nom du job |
---|
68 | #-Q- sx9mercure #MSUB -N 1 # Reservation du noeud |
---|
69 | #-Q- sx9mercure #MSUB -n 1 # Reservation du processus |
---|
70 | #-Q- sx9mercure #MSUB -T 86400 # Limite de temps elapsed du job |
---|
71 | #-Q- sx9mercure #MSUB -E "-j o" |
---|
72 | #-Q- sx9mercure #MSUB -E "-S /bin/ksh" |
---|
73 | #-Q- titane #!/bin/ksh |
---|
74 | #-Q- titane ###################### |
---|
75 | #-Q- titane ## TITANE CEA ## |
---|
76 | #-Q- titane ###################### |
---|
77 | #-Q- titane #MSUB -r TimeSeries # Nom du job |
---|
78 | #-Q- titane #MSUB -N 1 # Reservation du noeud |
---|
79 | #-Q- titane #MSUB -n 1 # Reservation du processus |
---|
80 | #-Q- titane #MSUB -T 86400 # Limite de temps elapsed du job |
---|
81 | #-Q- titane #MSUB -E "-j o" |
---|
82 | #-Q- titane #MSUB -E "-S /bin/ksh" |
---|
83 | #-Q- titane ##MSUB -e nco.out # Sortie standard |
---|
84 | #-Q- titane ##MSUB -o nco.out # Sortie standard |
---|
85 | #-Q- lxiv8 ###################### |
---|
86 | #-Q- lxiv8 ## OBELIX LSCE ## |
---|
87 | #-Q- lxiv8 ###################### |
---|
88 | #-Q- lxiv8 #PBS -N TimeSeries |
---|
89 | #-Q- lxiv8 #PBS -m a |
---|
90 | #-Q- lxiv8 #PBS -j oe |
---|
91 | #-Q- lxiv8 #PBS -q medium |
---|
92 | #-Q- lxiv8 #PBS -o TimeSeries.$$ |
---|
93 | #-Q- lxiv8 #PBS -S /bin/ksh |
---|
94 | #-Q- default #!/bin/ksh |
---|
95 | #-Q- default ################## |
---|
96 | #-Q- default ## DEFAULT HOST ## |
---|
97 | #-Q- default ################## |
---|
98 | |
---|
99 | #************************************************************** |
---|
100 | # Author: Sebastien Denvil |
---|
101 | # Contact: Sebastien.Denvil@ipsl.jussieu.fr |
---|
102 | # $Date: $ |
---|
103 | # $Author: $ |
---|
104 | # $Revision: $ |
---|
105 | # IPSL (2006) |
---|
106 | # This software is governed by the CeCILL licence see libIGCM/libIGCM_CeCILL.LIC |
---|
107 | # History: |
---|
108 | # Modification: |
---|
109 | # |
---|
110 | #************************************************************** |
---|
111 | |
---|
112 | # Check that everything went well during time series production |
---|
113 | # Display a short report |
---|
114 | # Launch what's missing |
---|
115 | # For use during a run (not on the end : PeriodState=Completed), it will complete |
---|
116 | # all TS to last PeriodDateEnd value, give by run.card->Configuration->OldPrefix string. |
---|
117 | |
---|
118 | |
---|
119 | # Chemin vers libIGCM |
---|
120 | libIGCM=${libIGCM:=::modipsl::/libIGCM} |
---|
121 | # Attention : Ã changer si la machine de post-traitement n'est pas la frontale du serveur de calcul ! |
---|
122 | # voir précence de la variable MirrorlibIGCM dans votre couche systÚme. |
---|
123 | |
---|
124 | # Name Space of this experience |
---|
125 | SpaceName=${SpaceName:=PROD} |
---|
126 | |
---|
127 | # Expericence class of the run |
---|
128 | ExperimentName=${ExperimentName:=historical} |
---|
129 | |
---|
130 | # Name of this job |
---|
131 | JobName=${JobName:=v2.historical1} |
---|
132 | |
---|
133 | # répertoire courrant |
---|
134 | CURRENT_DIR=$( pwd ) |
---|
135 | |
---|
136 | # Emplacement des cartes |
---|
137 | CARD_DIR=${CARD_DIR:=${CURRENT_DIR}/${ExperimentName}/${JobName}} |
---|
138 | |
---|
139 | # répertoire de stockage des sorties des create_ts |
---|
140 | POST_DIR=${POST_DIR:=${CARD_DIR}/OutScript} |
---|
141 | |
---|
142 | |
---|
143 | if [ ! -d ${CARD_DIR} ]; then |
---|
144 | echo "No ${CARD_DIR}, we stop here" |
---|
145 | exit |
---|
146 | fi |
---|
147 | |
---|
148 | ######################################################################## |
---|
149 | |
---|
150 | . ${libIGCM}/libIGCM_debug/libIGCM_debug.ksh ; |
---|
151 | . ${libIGCM}/libIGCM_sys/libIGCM_sys.ksh #; IGCM_debug_Check |
---|
152 | . ${libIGCM}/libIGCM_card/libIGCM_card.ksh #; IGCM_card_Check |
---|
153 | . ${libIGCM}/libIGCM_date/libIGCM_date.ksh #; IGCM_date_Check |
---|
154 | |
---|
155 | ######################################################################## |
---|
156 | |
---|
157 | #set -vx |
---|
158 | |
---|
159 | # First of all |
---|
160 | IGCM_card_DefineArrayFromSection ${CARD_DIR}/config.card UserChoices |
---|
161 | typeset option |
---|
162 | for option in ${config_UserChoices[*]} ; do |
---|
163 | IGCM_card_DefineVariableFromOption ${CARD_DIR}/config.card UserChoices ${option} |
---|
164 | done |
---|
165 | |
---|
166 | echo |
---|
167 | IGCM_debug_Print 1 "DefineVariableFromOption : config_UserChoices" |
---|
168 | IGCM_debug_PrintVariables 3 config_UserChoices_JobName |
---|
169 | #IGCM_debug_PrintVariables 3 config_UserChoices_SpaceName |
---|
170 | #IGCM_debug_PrintVariables 3 config_UserChoices_ExperimentName |
---|
171 | IGCM_debug_PrintVariables 3 config_UserChoices_CalendarType |
---|
172 | IGCM_debug_PrintVariables 3 config_UserChoices_DateBegin |
---|
173 | IGCM_debug_PrintVariables 3 config_UserChoices_DateEnd |
---|
174 | |
---|
175 | if [ -f ${CARD_DIR}/run.card ] ; then |
---|
176 | IGCM_card_DefineVariableFromOption ${CARD_DIR}/run.card Configuration OldPrefix |
---|
177 | IGCM_card_DefineVariableFromOption ${CARD_DIR}/run.card Configuration PeriodState |
---|
178 | IGCM_card_DefineVariableFromOption ${CARD_DIR}/run.card PostProcessing TimeSeriesCompleted |
---|
179 | IGCM_debug_Print 1 "DefineVariableFromOption : run_Configuration" |
---|
180 | IGCM_debug_PrintVariables 3 run_Configuration_OldPrefix |
---|
181 | IGCM_debug_PrintVariables 3 run_Configuration_PeriodState |
---|
182 | IGCM_debug_Print 1 "DefineVariableFromOption : run_PostProcessing" |
---|
183 | IGCM_debug_PrintVariables 3 run_PostProcessing_TimeSeriesCompleted |
---|
184 | if [ X${run_Configuration_PeriodState} != X"Completed" ] ; then |
---|
185 | DateEnd=$( IGCM_date_ConvertFormatToGregorian $( echo ${run_Configuration_OldPrefix} | awk -F'_' '{print $2}' ) ) |
---|
186 | else |
---|
187 | DateEnd=$( IGCM_date_ConvertFormatToGregorian ${config_UserChoices_DateEnd} ) |
---|
188 | fi |
---|
189 | CompletedFlag=${run_PostProcessing_TimeSeriesCompleted} |
---|
190 | else |
---|
191 | DateEnd=$( IGCM_date_ConvertFormatToGregorian ${config_UserChoices_DateEnd} ) |
---|
192 | CompletedFlag="" |
---|
193 | fi |
---|
194 | SavedCompletedFlag=${CompletedFlag} |
---|
195 | DateBegin=$( IGCM_date_ConvertFormatToGregorian ${config_UserChoices_DateBegin} ) |
---|
196 | |
---|
197 | IGCM_date_GetYearMonth ${DateBegin} YearBegin MonthBegin |
---|
198 | IGCM_date_GetYearMonth ${DateEnd} YearEnd MonthEnd |
---|
199 | |
---|
200 | echo |
---|
201 | IGCM_debug_Print 1 "DateBegin for TimeSeries_Checker : "${DateBegin} |
---|
202 | IGCM_debug_Print 1 "DateEnd for TimeSeries_Checker : "${DateEnd} |
---|
203 | IGCM_debug_Print 1 "YearBegin MonthBegin for TimeSeries_Checker : ${YearBegin} ${MonthBegin}" |
---|
204 | IGCM_debug_Print 1 "YearEnd MonthEnd for TimeSeries_Checker : ${YearEnd} ${MonthEnd}" |
---|
205 | IGCM_debug_Print 1 "CompletedFlag = "${CompletedFlag} |
---|
206 | echo |
---|
207 | |
---|
208 | #==================================================== |
---|
209 | #R_SAVE : Job output directory |
---|
210 | if ( [ ! X${config_UserChoices_SpaceName} = X ] && [ ! X${config_UserChoices_ExperimentName} = X ] ) ; then |
---|
211 | FreeName=$( echo ${config_UserChoices_JobName} | sed 's/.*_//' ) |
---|
212 | R_SAVE=${R_OUT}/${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${FreeName} |
---|
213 | R_DODS=${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${FreeName} |
---|
214 | else |
---|
215 | R_SAVE=${R_OUT}/${config_UserChoices_TagName}/${config_UserChoices_JobName} |
---|
216 | R_DODS=${config_UserChoices_TagName}/${config_UserChoices_JobName} |
---|
217 | fi |
---|
218 | |
---|
219 | IGCM_card_DefineArrayFromSection ${CARD_DIR}/config.card ListOfComponents |
---|
220 | |
---|
221 | for comp in ${config_ListOfComponents[*]} ; do |
---|
222 | # Debug Print |
---|
223 | IGCM_debug_Print 1 ${comp} |
---|
224 | # Define component |
---|
225 | IGCM_card_DefineArrayFromOption ${CARD_DIR}/config.card ListOfComponents ${comp} |
---|
226 | eval compname=\${config_ListOfComponents_${comp}[0]} > /dev/null 2>&1 |
---|
227 | eval comptagname=\${config_ListOfComponents_${comp}[1]} > /dev/null 2>&1 |
---|
228 | |
---|
229 | # Read libIGCM compatibility version in ${compname}.card |
---|
230 | card=${CARD_DIR}/COMP/${compname}.card |
---|
231 | |
---|
232 | # Read and Build Output File stuff |
---|
233 | #IGCM_debug_Print 1 "DefineArrayFromOption : ${compname}_OutputFiles ${card}" |
---|
234 | IGCM_card_DefineArrayFromOption ${card} OutputFiles List |
---|
235 | ListFilesName=${compname}_OutputFiles_List |
---|
236 | eval FileName0=\${${ListFilesName}[0]} > /dev/null 2>&1 |
---|
237 | # |
---|
238 | if [ X${FileName0} != X${NULL_STR} ] ; then |
---|
239 | # |
---|
240 | #IGCM_debug_Print 1 "Component : ${compname}" |
---|
241 | # |
---|
242 | # INITIALISATION |
---|
243 | # |
---|
244 | eval NbFiles=\${#${ListFilesName}[@]} > /dev/null 2>&1 |
---|
245 | i=2 |
---|
246 | # |
---|
247 | until [ $i -ge $NbFiles ]; do |
---|
248 | # |
---|
249 | eval flag_post=\${${ListFilesName}[$i]} > /dev/null 2>&1 |
---|
250 | # |
---|
251 | if [ X${flag_post} != XNONE ] ; then |
---|
252 | # |
---|
253 | # First of all |
---|
254 | # |
---|
255 | IGCM_card_DefineArrayFromSection ${card} ${flag_post} |
---|
256 | # |
---|
257 | IGCM_card_DefineArrayFromOption ${card} ${flag_post} TimeSeriesVars |
---|
258 | IGCM_card_DefineArrayFromOption ${card} ${flag_post} Patches |
---|
259 | if [ X"$( eval echo \${${compname}_${flag_post}_TimeSeriesVars[*]} )" = X"Option not found ${flag_post}" ] ; then |
---|
260 | # New TimeSeriesVar description, with 2D, 3D and associate ChunckJob. |
---|
261 | unset ListDimension |
---|
262 | ListDimension[0]=2D |
---|
263 | ListDimension[1]=3D |
---|
264 | TimeSeries=false |
---|
265 | TimeSeries2D=false |
---|
266 | TimeSeries3D=false |
---|
267 | chunck=false |
---|
268 | iLoop=${#ListDimension[*]} |
---|
269 | j=0 |
---|
270 | until [ $j -ge ${iLoop} ]; do |
---|
271 | Dimension=${ListDimension[${j}]} |
---|
272 | IGCM_card_DefineArrayFromOption ${card} ${flag_post} TimeSeriesVars${Dimension} |
---|
273 | IGCM_card_DefineVariableFromOption ${card} ${flag_post} ChunckJob${Dimension} |
---|
274 | # |
---|
275 | # Time series WITHOUT chunk |
---|
276 | # |
---|
277 | if [ ! $( eval echo \${${compname}_${flag_post}_TimeSeriesVars${Dimension}} ) = ${NULL_STR} ] ; then |
---|
278 | if [ $( eval echo \${${compname}_${flag_post}_ChunckJob${Dimension}} ) = NONE ] ; then |
---|
279 | IGCM_debug_Print 2 "${Dimension} time series activated for ${flag_post}" |
---|
280 | eval TimeSeries${Dimension}=true |
---|
281 | chunck=false |
---|
282 | fi |
---|
283 | fi |
---|
284 | # |
---|
285 | # Time series WITH chunk |
---|
286 | # |
---|
287 | if [ ! $( eval echo \${${compname}_${flag_post}_TimeSeriesVars${Dimension}} ) = ${NULL_STR} ] ; then |
---|
288 | chunck_size=$( eval echo \${${compname}_${flag_post}_ChunckJob${Dimension}} ) |
---|
289 | if [ ! ${chunck_size} = NONE ] && [ ! ${chunck_size} = OFF ] ; then |
---|
290 | IGCM_debug_Print 2 "${Dimension} time series activated with ${chunck_size} chunck for ${flag_post}" |
---|
291 | eval TimeSeriesChunck${Dimension}=true |
---|
292 | chunck=true |
---|
293 | fi |
---|
294 | fi |
---|
295 | (( j=j+1 )) |
---|
296 | # |
---|
297 | # If TimeSeriesVars list is empty or OFF we skip |
---|
298 | # |
---|
299 | if ( [ $( eval echo \${${compname}_${flag_post}_TimeSeriesVars${Dimension}} ) = ${NULL_STR} ] || \ |
---|
300 | [ ${chunck_size} = OFF ] ) ; then |
---|
301 | #IGCM_debug_Print 2 "Empty TS : ${compname}_Post_${FILE}_TimeSeriesVars${Dimension}" |
---|
302 | #(( i=i+3 )) |
---|
303 | continue |
---|
304 | fi |
---|
305 | # |
---|
306 | # ICI ON TESTE QUE LES FICHIERS TS SONT LA! |
---|
307 | # |
---|
308 | # |
---|
309 | FILE=$( echo ${flag_post} | awk "-FPost_" '{print $2}' ) |
---|
310 | IGCM_card_DefineArrayFromOption ${card} Post_${FILE} TimeSeriesVars${Dimension} |
---|
311 | IGCM_card_DefineVariableFromOption ${card} Post_${FILE} ChunckJob${Dimension} |
---|
312 | # |
---|
313 | FlagDir=$( echo ${FILE} | awk -F "_" '{print $1}' ) |
---|
314 | case ${FlagDir} in |
---|
315 | *Y) TS_Dir=TS_YE ;; |
---|
316 | *M) TS_Dir=TS_MO ;; |
---|
317 | *D) TS_Dir=TS_DA ;; |
---|
318 | 3H|HF) TS_Dir=TS_HF ;; |
---|
319 | INS) TS_Dir=TS_INS ;; |
---|
320 | esac |
---|
321 | # |
---|
322 | # We need LIST of variables not allready produced (useful for standalone mode) |
---|
323 | # |
---|
324 | DateBegin=$( IGCM_date_ConvertFormatToGregorian ${config_UserChoices_DateBegin} ) |
---|
325 | IGCM_date_GetYearMonth ${DateBegin} YearBegin MonthBegin |
---|
326 | |
---|
327 | # Si on n'a pas de chunck, dans ce cas chunck_size=la durée de la simulation en années |
---|
328 | YearsChunckLength=$( echo ${chunck_size} | sed -e "s/[yY]//" ) |
---|
329 | [ ${chunck} = false ] && YearsChunckLength=$(( YearEnd - YearBegin + 1 )) |
---|
330 | |
---|
331 | NbYearsChunckLoop=$(( ( YearEnd - YearBegin + 1 ) / YearsChunckLength )) |
---|
332 | Reste=$(( ( YearEnd - YearBegin + 1 ) % YearsChunckLength )) |
---|
333 | |
---|
334 | if [ ${Reste} -ne 0 ] ; then |
---|
335 | NbYearsChunckLoop=$(( NbYearsChunckLoop + 1 )) |
---|
336 | fi |
---|
337 | |
---|
338 | if [ ${NbYearsChunckLoop} -eq 1 ] ; then |
---|
339 | PeriodDateEnd=${DateEnd} |
---|
340 | else |
---|
341 | DaysInYear=$( IGCM_date_DaysInYear ${YearBegin} ) |
---|
342 | PeriodDateEnd=$( IGCM_date_AddDaysToGregorianDate ${DateBegin} $(( YearsChunckLength * DaysInYear - 1 )) ) |
---|
343 | fi |
---|
344 | # |
---|
345 | DIRECTORY=${R_SAVE}/${comp}/Analyse/${TS_Dir} |
---|
346 | YearsChunckLoop=1 |
---|
347 | ChunckDebut=${DateBegin} |
---|
348 | ChunckFin=${PeriodDateEnd} |
---|
349 | while [ ${YearsChunckLoop} -le ${NbYearsChunckLoop} ] ; do |
---|
350 | countTotal=0 |
---|
351 | countGood=0 |
---|
352 | countBad=0 |
---|
353 | for var in $( eval echo \${${compname}_Post_${FILE}_TimeSeriesVars${Dimension}[*]} ) ; do |
---|
354 | TestedFile=${config_UserChoices_JobName}_${ChunckDebut}_${ChunckFin}_${FlagDir}_${var}.nc |
---|
355 | # |
---|
356 | if [ ! -f ${DIRECTORY}/${TestedFile} ] ; then |
---|
357 | (( countBad = countBad + 1 )) |
---|
358 | [ ${countBad} = 1 ] && IGCM_debug_Print 3 "Missing time series from ${FILE} :" |
---|
359 | IGCM_debug_Print 3 ${DIRECTORY}/${TestedFile} |
---|
360 | else |
---|
361 | (( countGood = countGood + 1 )) |
---|
362 | fi |
---|
363 | (( countTotal = countTotal + 1 )) |
---|
364 | done |
---|
365 | |
---|
366 | SuccessRate=$(( countGood * 100 / countTotal )) |
---|
367 | if [ ${SuccessRate} -ne 100 ] ; then |
---|
368 | IGCM_debug_Print 2 -e "\033[1;31m${SuccessRate}% files OK.\033[m for period ${ChunckDebut}-${ChunckFin}" |
---|
369 | else |
---|
370 | IGCM_debug_Print 2 -e "\033[1;32m${SuccessRate}% files OK.\033[m for period ${ChunckDebut}-${ChunckFin}" |
---|
371 | fi |
---|
372 | |
---|
373 | echo |
---|
374 | if ( [ ${chunck} = true ] && [ ${SuccessRate} -ne 100 ] ) ; then |
---|
375 | ChunckCompletedFlag="" |
---|
376 | CompletedFlag=${SavedCompletedFlag} |
---|
377 | if [ X${CompletedFlag} != X ] ; then |
---|
378 | ( [ ${CompletedFlag} -gt ${ChunckDebut} ] && [ ${CompletedFlag} -le ${ChunckFin} ] ) && ChunckCompletedFlag=${CompletedFlag} |
---|
379 | fi |
---|
380 | IGCM_debug_Print 2 -e "\033[1;31mSubmit ${FILE} chunck ${Dimension}\033[m period ${ChunckDebut}-${ChunckFin}" |
---|
381 | listVarEnv="libIGCM,SUBMIT_DIR,POST_DIR,DateBegin,PeriodDateEnd,CompletedFlag,TsTask,CompToRead,FlagToRead" |
---|
382 | export libIGCM=${libIGCM} |
---|
383 | export SUBMIT_DIR=${CARD_DIR} |
---|
384 | export POST_DIR=${POST_DIR} |
---|
385 | export DateBegin=${ChunckDebut} |
---|
386 | export PeriodDateEnd=${ChunckFin} |
---|
387 | export CompletedFlag=${ChunckCompletedFlag} |
---|
388 | export TsTask=Chunck${Dimension} |
---|
389 | export CompToRead=${comp} |
---|
390 | export FlagToRead=${i} |
---|
391 | export listVarEnv=${listVarEnv} |
---|
392 | IGCM_sys_MkdirWork ${POST_DIR} |
---|
393 | IGCM_debug_Verif_Exit |
---|
394 | IGCM_sys_QsubPost create_ts |
---|
395 | echo |
---|
396 | fi |
---|
397 | |
---|
398 | if ( [ ${chunck} = false ] && [ ${SuccessRate} -ne 100 ] ) ; then |
---|
399 | eval Launch${Dimension}=true |
---|
400 | fi |
---|
401 | |
---|
402 | # Date update |
---|
403 | ChunckDebut=$( IGCM_date_AddDaysToGregorianDate ${ChunckFin} 1 ) |
---|
404 | |
---|
405 | (( YearsChunckLoop = YearsChunckLoop + 1 )) |
---|
406 | |
---|
407 | if [ ${YearsChunckLoop} -eq ${NbYearsChunckLoop} ] ; then |
---|
408 | ChunckFin=${DateEnd} |
---|
409 | else |
---|
410 | #PeriodDateEnd=$(( YearBegin + YearsChunckLength - 1 )) |
---|
411 | ChunckFin=$( IGCM_date_AddDaysToGregorianDate ${ChunckDebut} $(( YearsChunckLength * DaysInYear - 1 )) ) |
---|
412 | fi |
---|
413 | done |
---|
414 | done |
---|
415 | else |
---|
416 | ListDimension[0]="" |
---|
417 | TimeSeries=true |
---|
418 | TimeSeries2D=false |
---|
419 | TimeSeries3D=false |
---|
420 | TimeSeriesChunck2D=false |
---|
421 | TimeSeriesChunck3D=false |
---|
422 | fi |
---|
423 | fi |
---|
424 | (( i=i+3 )) |
---|
425 | done |
---|
426 | fi |
---|
427 | done # comp loop |
---|
428 | |
---|
429 | echo |
---|
430 | |
---|
431 | DateBegin=$( IGCM_date_ConvertFormatToGregorian ${config_UserChoices_DateBegin} ) |
---|
432 | IGCM_date_GetYearMonth ${DateBegin} YearBegin MonthBegin |
---|
433 | CompletedFlag=${SavedCompletedFlag} |
---|
434 | |
---|
435 | if [ X${Launch2D} = Xtrue ] ; then |
---|
436 | IGCM_debug_Print 2 -e "\033[1;31mSubmit 2D\033[m without chunck period ${DateBegin}-${DateEnd}" |
---|
437 | listVarEnv="libIGCM,SUBMIT_DIR,POST_DIR,DateBegin,PeriodDateEnd,CompletedFlag,TsTask" |
---|
438 | export libIGCM=${libIGCM} |
---|
439 | export SUBMIT_DIR=${CARD_DIR} |
---|
440 | export POST_DIR=${POST_DIR} |
---|
441 | export DateBegin=${DateBegin} |
---|
442 | export PeriodDateEnd=${DateEnd} |
---|
443 | export CompletedFlag=${CompletedFlag} |
---|
444 | export TsTask=2D |
---|
445 | export listVarEnv=${listVarEnv} |
---|
446 | IGCM_sys_MkdirWork ${POST_DIR} |
---|
447 | IGCM_debug_Verif_Exit |
---|
448 | IGCM_sys_QsubPost create_ts |
---|
449 | echo |
---|
450 | fi |
---|
451 | |
---|
452 | if [ X${Launch3D} = Xtrue ] ; then |
---|
453 | IGCM_debug_Print 2 -e "\033[1;31mSubmit 3D\033[m without chunck period ${DateBegin}-${DateEnd}" |
---|
454 | listVarEnv="libIGCM,SUBMIT_DIR,POST_DIR,DateBegin,PeriodDateEnd,CompletedFlag,TsTask" |
---|
455 | export libIGCM=${libIGCM} |
---|
456 | export SUBMIT_DIR=${CARD_DIR} |
---|
457 | export POST_DIR=${POST_DIR} |
---|
458 | export DateBegin=${DateBegin} |
---|
459 | export PeriodDateEnd=${DateEnd} |
---|
460 | export CompletedFlag=${CompletedFlag} |
---|
461 | export TsTask=3D |
---|
462 | export listVarEnv=${listVarEnv} |
---|
463 | IGCM_sys_MkdirWork ${POST_DIR} |
---|
464 | IGCM_debug_Verif_Exit |
---|
465 | IGCM_sys_QsubPost create_ts |
---|
466 | echo |
---|
467 | fi |
---|