Changeset 392 for trunk/libIGCM
- Timestamp:
- 12/03/10 15:10:18 (14 years ago)
- Location:
- trunk/libIGCM
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libIGCM/AA_TimeSeries_Checker
r390 r392 101 101 IGCM_debug_Print 1 "DateBegin for TimeSeries_Checker : "${DateBegin} 102 102 IGCM_debug_Print 1 "DateEnd for TimeSeries_Checker : "${DateEnd} 103 IGCM_debug_Print 1 "YearBegin MonthBegin for TimeSeries_Checker : ${YearBegin} ${MonthBegin}"104 IGCM_debug_Print 1 "YearEnd MonthEnd for TimeSeries_Checker : ${YearEnd} ${MonthEnd}"105 103 IGCM_debug_Print 1 "CompletedFlag = "${CompletedFlag} 106 104 echo … … 262 260 FoundCandidat=false 263 261 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}' ) 262 for candid in ${Candidat} ; do 263 #IGCM_debug_Print 1 -e "\033[1;32m[CompletedFlag CANDIDAT MATCH FOUND]\033[m $( basename ${candid} )" 264 CandidatEnd=$( echo ${candid} | awk -F${config_UserChoices_JobName} '{print $3}' | awk -F_ '{print $3}' ) 268 265 if [ ${CandidatEnd} -gt ${ChunckFin} ] ; then 269 IGCM_debug_Print 2 -e "File $( basename ${i} ) should be suppress"270 set +A RemoveList ${RemoveList[*]} ${ i}266 #IGCM_debug_Print 3 -e "File $( basename ${candid} ) should be suppress" 267 set +A RemoveList ${RemoveList[*]} ${candid} 271 268 elif [ ${CandidatEnd} -lt ${ChunckFin} ] ; then 272 IGCM_debug_Print 2 -e "File $( basename ${i} ) should be suppress or used as a CompletedFlag baseline"269 #IGCM_debug_Print 3 -e "File $( basename ${candid} ) should be suppress or used as a CompletedFlag baseline" 273 270 # We keep the best candidat and remove the others 274 if [ ${BestCandidat} -lt ${CandidatEnd} ] ; then 271 if [ ${BestCandidat} -lt ${CandidatEnd} ] ; then 275 272 BestCandidat=${CandidatEnd} 273 FoundCandidat=true 276 274 else 277 set +A RemoveList ${RemoveList[*]} ${ i}275 set +A RemoveList ${RemoveList[*]} ${candid} 278 276 fi 279 277 fi … … 289 287 IGCM_debug_Print 3 ${DIRECTORY}/${TestedFile} 290 288 # Then we keep a track of the Best Candidat 291 [ ${FoundCandidat} = true ] && set +A PotentialCompletedFlag ${PotentialCompletedFlag[*]} ${BestCandidat} 289 if [ ${FoundCandidat} = true ] ; then 290 if [ ${chunck} = true ] ; then 291 set +A PotentialCompletedFlag ${PotentialCompletedFlag[*]} ${BestCandidat} 292 else 293 eval set +A PotentialCompletedFlag${Dimension} \${PotentialCompletedFlag${Dimension}[*]} \${BestCandidat} 294 fi 295 fi 292 296 else 293 297 (( countGood = countGood + 1 )) 294 # Then we do not need the best candidat 298 # Then we do not need the best candidat if any 295 299 [ ${FoundCandidat} = true ] && set +A RemoveList ${RemoveList[*]} ${config_UserChoices_JobName}_${ChunckDebut}_${BestCandidat}_${FlagDir}_${var}.nc 296 300 fi … … 311 315 #IGCM_sys_Rm ${RemoveList[*]} 312 316 fi 313 317 #[ ${FoundCandidat} = true ] && IGCM_debug_Print 2 "Potentials CompletedFlag: ${PotentialCompletedFlag[*]}" 314 318 if ( [ ${chunck} = true ] && [ ${SuccessRate} -ne 100 ] ) ; then 315 316 319 # 317 320 # TO REWRITE BEGIN 318 321 # 319 ChunckCompletedFlag="" 320 CompletedFlag=${SavedCompletedFlag} 321 if [ X${CompletedFlag} != X ] ; then 322 ( [ ${CompletedFlag} -gt ${ChunckDebut} ] && [ ${CompletedFlag} -le ${ChunckFin} ] ) && ChunckCompletedFlag=${CompletedFlag} 322 NbCandidats=${#PotentialCompletedFlag[@]} 323 countCandid=1 324 if [ ${NbCandidats} -eq 0 ] ; then 325 ChunckCompletedFlag="" 326 IGCM_debug_Print 2 -e "\033[1;31mNO CompletedFlag\033[m" 327 elif [ ${NbCandidats} -eq 1 ] ; then 328 ChunckCompletedFlag=${PotentialCompletedFlag[0]} 329 IGCM_debug_Print 2 -e "\033[1;32mCompletedFlag=${ChunckCompletedFlag}\033[m" 330 elif [ ${NbCandidats} -gt 1 ] ; then 331 k=1 332 until [ $k -ge ${NbCandidats} ]; do 333 ((k_m1=k-1)) 334 if [ ${PotentialCompletedFlag[${k_m1}]} = ${PotentialCompletedFlag[${k}]} ] ; then 335 ((countCandid=countCandid+1)) 336 fi 337 ((k=k+1)) 338 done 339 if [ ${NbCandidats} -eq ${countCandid} ] ; then 340 ChunckCompletedFlag=${PotentialCompletedFlag[0]} 341 IGCM_debug_Print 2 -e "\033[1;32mCompletedFlag=${ChunckCompletedFlag}\033[m" 342 else 343 IGCM_debug_Print 2 -e "\033[1;31mToo Many Potential CompletedFlag\033[m CASE NOT HANDLE YET" 344 fi 323 345 fi 324 346 # 325 347 # TO REWRITE END 326 348 # 327 328 329 IGCM_debug_Print 2 -e "\033[1;31mSubmit ${FILE} chunck ${Dimension}\033[m period ${ChunckDebut}-${ChunckFin}" 349 IGCM_debug_Print 2 -e "\033[1;31mSubmit ${FILE} chunck ${Dimension}\033[m period ${ChunckDebut}-${ChunckFin} and CompletedFlag=${ChunckCompletedFlag}" 330 350 listVarEnv="libIGCM,SUBMIT_DIR,POST_DIR,DateBegin,PeriodDateEnd,CompletedFlag,TsTask,CompToRead,FlagToRead" 331 351 export libIGCM=${libIGCM} … … 359 379 ChunckFin=${DateEnd} 360 380 else 361 #PeriodDateEnd=$(( YearBegin + YearsChunckLength - 1 ))362 381 ChunckFin=$( IGCM_date_AddDaysToGregorianDate ${ChunckDebut} $(( YearsChunckLength * DaysInYear - 1 )) ) 363 382 fi … … 385 404 386 405 if [ X${Launch2D} = Xtrue ] ; then 406 #IGCM_debug_Print 2 "Potentials CompletedFlag: ${PotentialCompletedFlag2D[*]}" 387 407 IGCM_debug_Print 2 -e "\033[1;31mSubmit 2D\033[m without chunck period ${DateBegin}-${DateEnd}" 388 408 listVarEnv="libIGCM,SUBMIT_DIR,POST_DIR,DateBegin,PeriodDateEnd,CompletedFlag,TsTask" … … 403 423 404 424 if [ X${Launch3D} = Xtrue ] ; then 425 #IGCM_debug_Print 2 "Potentials CompletedFlag: ${PotentialCompletedFlag3D[*]}" 405 426 IGCM_debug_Print 2 -e "\033[1;31mSubmit 3D\033[m without chunck period ${DateBegin}-${DateEnd}" 406 427 listVarEnv="libIGCM,SUBMIT_DIR,POST_DIR,DateBegin,PeriodDateEnd,CompletedFlag,TsTask" -
trunk/libIGCM/AA_create_ts
r389 r392 269 269 # Determine component to take care of depending on kind of task create_ts will perform 270 270 # 271 ( [ X${TsTask} = XChunck2D ] || [ X${TsTask} = XChunck3D ] )&& set -A config_ListOfComponents ${CompToRead} || IGCM_card_DefineArrayFromSection ${CARD_DIR}/config.card ListOfComponents271 [ ${CompToRead} ] && set -A config_ListOfComponents ${CompToRead} || IGCM_card_DefineArrayFromSection ${CARD_DIR}/config.card ListOfComponents 272 272 # 273 273 # Determine period for time series. Default : value from AA_job or from launch_TS if any … … 324 324 # 325 325 typeset i 326 if ( [ X${TsTask} = XChunck2D ] || [ X${TsTask} = XChunck3D ] ); then326 if [ ${FlagToRead} ] ; then 327 327 ((NbFiles=${FlagToRead})) 328 328 ((i=${NbFiles}))
Note: See TracChangeset
for help on using the changeset viewer.