Changeset 1920 for TOOLS


Ignore:
Timestamp:
11/13/12 19:24:54 (10 years ago)
Author:
aclsce
Message:
  • Fixed some bugs
Location:
TOOLS/PACK_IPSL
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • TOOLS/PACK_IPSL/DEM_utilities.sh

    r1911 r1920  
    8181# Calcul du minimum d'un nombre quelconque d'entiers 
    8282    local l_min=${1} l_xx 
    83    
     83 
    8484    for l_xx in ${*:2:${#}} 
    8585    do 
    86         [[ ${l_xx} -lt ${l_min} ]] && l_min=${l_xx} 
     86        l_xx_tmp=`echo $l_xx|sed 's/^0*//'` 
     87        l_min_tmp=`echo $l_min|sed 's/^0*//'` 
     88        [[ ${l_xx_tmp} -lt ${l_min_tmp} ]] && l_min=${l_xx} 
    8789    done 
    8890    echo ${l_min} 
     
    9597    for l_xx in ${*:2:${#}} 
    9698    do 
    97         [[ ${l_xx} -gt ${l_max} ]] && l_max=${l_xx} 
     99        l_xx_tmp=`echo $l_xx|sed 's/^0*//'` 
     100        l_max_tmp=`echo $l_max|sed 's/^0*//'` 
     101        [[ ${l_xx_tmp} -gt ${l_max_tmp} ]] && l_max=${l_xx} 
    98102    done 
    99103    echo ${l_max} 
  • TOOLS/PACK_IPSL/find_size_pack.sh

    r1900 r1920  
    147147 
    148148    DEM_log -2 "Entree boucle : year_begin_pack month_begin_pack year_end_pack month_end_pack : ${year_begin_pack} ${month_begin_pack} ${year_end_pack} ${month_end_pack}" 
    149  
    150149    # on travaille pour chaque type de fichiers  
    151150    for type_file in `awk '{print $0}' ${IGCM_DEM_SIMU}/info_name_file.txt` 
     
    178177        done 
    179178       # on fait la somme par periodpack et par type de fichier de la taille qu'aurait le pack 
    180         awk 'BEGIN {y = 0} {x = $1 ; y = y + x } END{print y}'  ${IGCM_TMP}/${$}.info_${type_file}_${number_pack}.txt >> ${IGCM_TMP}/${$}.size_pack_${type_file}.txt 
    181         [[ "${clean_tmp}" = "yes" ]] && rm -f  ${IGCM_TMP}/${$}.info_${type_file}_${number_pack}.txt 
     179        if [ -f ${IGCM_TMP}/${$}.info_${type_file}_${number_pack}.txt ]  
     180        then 
     181            awk 'BEGIN {y = 0} {x = $1 ; y = y + x } END{print y}'  ${IGCM_TMP}/${$}.info_${type_file}_${number_pack}.txt >> ${IGCM_TMP}/${$}.size_pack_${type_file}.txt 
     182            [[ "${clean_tmp}" = "yes" ]] && rm -f  ${IGCM_TMP}/${$}.info_${type_file}_${number_pack}.txt 
     183        fi 
    182184    done 
    183185     
Note: See TracChangeset for help on using the changeset viewer.