Ignore:
Timestamp:
01/31/11 09:55:13 (13 years ago)
Author:
mafoipsl
Message:

Correct algorithm to delete unnecessary files when more than 2 best candidates (for CompletedFlag?=) exist.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libIGCM/AA_TimeSeries_Checker

    r409 r413  
    291291                                            #IGCM_debug_Print 3 -e "File $( basename ${candid} ) should be suppress or used as a CompletedFlag baseline" 
    292292                                            # We keep the best candidat and remove the others 
    293                                             if [ ${BestCandidat} -lt ${CandidatEnd} ] ; then 
    294                                                 BestCandidat=${CandidatEnd} 
    295                                                 FoundCandidat=true 
    296                                             else 
    297                                                 set +A RemoveList ${RemoveList[*]} ${candid} 
    298                                             fi 
     293                                            if [ ${BestCandidat} -lt ${CandidatEnd} ] ; then 
     294                                                if [ ${FoundCandidat} = true ] ; then 
     295                                                   set +A RemoveList ${RemoveList[*]} ${DIRECTORY}/${config_UserChoices_JobName}_${ChunckDebut}_${BestCandidat}_${FlagDir}_${var}.nc 
     296                                                else 
     297                                                   FoundCandidat=true 
     298                                                fi 
     299                                                BestCandidat=${CandidatEnd} 
     300                                            else 
     301                                                set +A RemoveList ${RemoveList[*]} ${candid} 
     302                                            fi 
    299303                                        fi 
    300304                                    done 
     
    336340                                IGCM_debug_Print 2 "File(s) that will be removed ${RemoveList[*]}" 
    337341                                if [ ${action} = true ] ; then 
    338                                     echo -e "\033[1;32mDo you want to remove them?" 
    339                                     echo -n " Your answer (y/n) : \033[m" 
     342                                    echo -e "\033[1;32mDo you want to remove them?\033[m" 
     343                                    echo -n " Your answer (y/n) : " 
    340344                                    read RemoveAnswer 
    341345                                    case ${RemoveAnswer} in     
Note: See TracChangeset for help on using the changeset viewer.