Ignore:
Timestamp:
02/07/12 14:43:43 (12 years ago)
Author:
sdipsl
Message:
  • clean_month.job adapted to R_BUFR
  • R_IN points to CCCWORKDIR /ccc/work/cont003/dsm/p86ipsl/IGCM
  • bugfixes, simplification, refactoring, cosmetics
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libIGCM/AA_clean_month

    r428 r545  
    7777#==================================================== 
    7878#R_SAVE : Job output directory 
     79#R_BUFR : Job output buffered directory 
    7980if ( [ ! X${config_UserChoices_SpaceName} = X ] && [ ! X${config_UserChoices_ExperimentName} = X ] ) ; then 
    8081    FreeName=$( echo ${config_UserChoices_JobName} | sed 's/.*_//' ) 
    8182    R_SAVE=${R_OUT}/${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${FreeName} 
     83    R_BUFR=${R_BUF}/${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${FreeName} 
    8284else 
    8385    R_SAVE=${R_OUT}/${config_UserChoices_TagName}/${config_UserChoices_JobName} 
     86    R_BUFR=${R_BUF}/${config_UserChoices_TagName}/${config_UserChoices_JobName} 
    8487fi 
    8588IGCM_sys_TestDirArchive ${R_SAVE} 
     
    8891if [ ! -f ${SUBMIT_DIR}/run.card ]; then  
    8992    echo "You seem NOT to have a run.card in this directory !!" 
    90     echo "This script will fail because it doesn't know what to do without run.card avaible." 
     93    echo "This script will fail because it doesn't know what to do without run.card available." 
    9194    exit 1 
    9295else 
     
    104107    set +A ListFiles -- $( IGCM_sys_RshArchive "find ${R_SAVE} -name \"*${PeriodDateEnd}*\" " ) 
    105108    CountListFiles=${#ListFiles[@]} 
     109 
     110    echo "Search files with ${PeriodDateEnd} in ${R_BUFR}" 
     111    set +A ListFilesBuf -- $( IGCM_sys_RshMaster "find ${R_BUFR} -name \"*${PeriodDateEnd}*\" " ) 
     112    CountListFilesBuf=${#ListFilesBuf[@]} 
    106113 
    107114    # If exist, erase REBUILD DIR 
     
    124131            IGCM_debug_Print 2 -e "\033[1;31m ${file}\033[m" 
    125132        done 
     133        for file in ${ListFilesBuf[@]} ; do 
     134            IGCM_debug_Print 2 -e "\033[1;31m ${file}\033[m" 
     135        done 
    126136 
    127         echo "\033[1;32mDo you REALLY want to erase all those files ?" 
    128         echo -n " Your answer (y/n) : \033[m" 
     137        echo -e "\033[1;32mDo you REALLY want to erase all those files ?" 
     138        echo -n -e " Your answer (y/n) : \033[m" 
    129139        read reponse 
    130140        case ${reponse} in 
     
    133143                echo "OK. It will be erased." 
    134144                IGCM_sys_RshArchive "find ${R_SAVE} -name \"*${PeriodDateEnd}*\" -exec rm -f '{}' \;" 
     145                IGCM_sys_RshMaster  "find ${R_BUFR} -name \"*${PeriodDateEnd}*\" -exec rm -f '{}' \;" 
    135146                echo "done." 
    136147                ;; 
     
    147158        done 
    148159 
    149         echo "\033[1;32mDo you REALLY want to erase all those Directories ?" 
    150         echo -n " Your answer (y/n) : \033[m" 
     160        echo -e "\033[1;32mDo you REALLY want to erase all those Directories ?" 
     161        echo -n -e " Your answer (y/n) : \033[m" 
    151162        read reponse 
    152163        case ${reponse} in 
Note: See TracChangeset for help on using the changeset viewer.