Changeset 390 for trunk/libIGCM
- Timestamp:
- 11/24/10 18:07:12 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libIGCM/AA_TimeSeries_Checker
r387 r390 251 251 countGood=0 252 252 countBad=0 253 unset RemoveList 254 unset PotentialCompletedFlag 253 255 for var in $( eval echo \${${compname}_Post_${FILE}_TimeSeriesVars${Dimension}[*]} ) ; do 254 256 TestedFile=${config_UserChoices_JobName}_${ChunckDebut}_${ChunckFin}_${FlagDir}_${var}.nc 255 257 # 258 Candidat=$( find ${DIRECTORY} -name "${config_UserChoices_JobName}_${ChunckDebut}_*_${FlagDir}_${var}.nc" ) 259 # 260 BestCandidat=${ChunckDebut} 261 # 262 FoundCandidat=false 263 if [ ! "X${Candidat}" = "X" ] ; then 264 FoundCandidat=true 265 for i in ${Candidat} ; do 266 IGCM_debug_Print 1 -e "\033[1;32m[CompletedFlag CANDIDAT MATCH FOUND]\033[m $( basename ${i} )" 267 CandidatEnd=$( echo ${i} | awk -F${config_UserChoices_JobName} '{print $3}' | awk -F_ '{print $3}' ) 268 if [ ${CandidatEnd} -gt ${ChunckFin} ] ; then 269 IGCM_debug_Print 2 -e "File $( basename ${i} ) should be suppress" 270 set +A RemoveList ${RemoveList[*]} ${i} 271 elif [ ${CandidatEnd} -lt ${ChunckFin} ] ; then 272 IGCM_debug_Print 2 -e "File $( basename ${i} ) should be suppress or used as a CompletedFlag baseline" 273 # We keep the best candidat and remove the others 274 if [ ${BestCandidat} -lt ${CandidatEnd} ] ; then 275 BestCandidat=${CandidatEnd} 276 else 277 set +A RemoveList ${RemoveList[*]} ${i} 278 fi 279 fi 280 done 281 else 282 # No CompletedFlag candidat found 283 CandidatCompletedFlag="" 284 fi 285 # 256 286 if [ ! -f ${DIRECTORY}/${TestedFile} ] ; then 257 287 (( countBad = countBad + 1 )) 258 288 [ ${countBad} = 1 ] && IGCM_debug_Print 3 "Missing time series from ${FILE} :" 259 289 IGCM_debug_Print 3 ${DIRECTORY}/${TestedFile} 290 # Then we keep a track of the Best Candidat 291 [ ${FoundCandidat} = true ] && set +A PotentialCompletedFlag ${PotentialCompletedFlag[*]} ${BestCandidat} 260 292 else 261 293 (( countGood = countGood + 1 )) 294 # Then we do not need the best candidat 295 [ ${FoundCandidat} = true ] && set +A RemoveList ${RemoveList[*]} ${config_UserChoices_JobName}_${ChunckDebut}_${BestCandidat}_${FlagDir}_${var}.nc 262 296 fi 263 297 (( countTotal = countTotal + 1 )) … … 270 304 IGCM_debug_Print 2 -e "\033[1;32m${SuccessRate}% files OK.\033[m for period ${ChunckDebut}-${ChunckFin}" 271 305 fi 272 273 306 echo 307 308 # Remove what's in the RemoveList 309 if [ ${RemoveList} ] ; then 310 IGCM_debug_Print 2 "File(s) that will be removed ${RemoveList[*]}" 311 #IGCM_sys_Rm ${RemoveList[*]} 312 fi 313 274 314 if ( [ ${chunck} = true ] && [ ${SuccessRate} -ne 100 ] ) ; then 315 316 # 317 # TO REWRITE BEGIN 318 # 275 319 ChunckCompletedFlag="" 276 320 CompletedFlag=${SavedCompletedFlag} … … 278 322 ( [ ${CompletedFlag} -gt ${ChunckDebut} ] && [ ${CompletedFlag} -le ${ChunckFin} ] ) && ChunckCompletedFlag=${CompletedFlag} 279 323 fi 324 # 325 # TO REWRITE END 326 # 327 328 280 329 IGCM_debug_Print 2 -e "\033[1;31mSubmit ${FILE} chunck ${Dimension}\033[m period ${ChunckDebut}-${ChunckFin}" 281 330 listVarEnv="libIGCM,SUBMIT_DIR,POST_DIR,DateBegin,PeriodDateEnd,CompletedFlag,TsTask,CompToRead,FlagToRead"
Note: See TracChangeset
for help on using the changeset viewer.