Changeset 2130


Ignore:
Timestamp:
07/26/13 11:54:27 (9 years ago)
Author:
acosce
Message:

Fix two bug in find_size_pack

1- the calcul for the PackFrequency? was wrong for pack bigger than 70G
2- there was a bug when we try to fix the PackFrequency? to 1, 2, 5, 10 ... year

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TOOLS/PACK_IPSL/find_size_pack.sh

    r2027 r2130  
    210210            do  
    211211                [[ ${taille} -lt ${size_pack_min} ]] && period_tmp=$(( ${size_pack_min} * ${periodpackinyear} / ${taille} )) 
    212                 [[ ${taille} -gt ${size_pack_max} ]] && period_tmp=$(( ${size_pack_min} * ${periodpackinyear} / ${taille} )) 
     212                [[ ${taille} -gt ${size_pack_max} ]] && period_tmp=$(( ${size_pack_max} * ${periodpackinyear} / ${taille} )) 
    213213                [[ ${taille} -ge ${size_pack_min} && ${taille} -le ${size_pack_max} ]] && period_tmp=${periodpackinyear} 
    214214                [[ ${period_tmp} -lt ${new_period} ]] && new_period=${period_tmp} 
     
    223223            do  
    224224                [[ ${taille} -lt ${size_pack_min} ]] && period_tmp=${newpackinyear} 
    225                 [[ ${taille} -gt ${size_pack_max} ]] && period_tmp=$(( ${size_pack_min} * ${newpackinyear} / ${taille} )) 
     225                [[ ${taille} -gt ${size_pack_max} ]] && period_tmp=$(( ${size_pack_max} * ${newpackinyear} / ${taille} )) 
    226226                [[ ${taille} -ge ${size_pack_min} && ${taille} -le ${size_pack_max} ]] && period_tmp=${newpackinyear} 
    227227                [[ ${period_tmp} -lt ${new_period} ]] && new_period=${period_tmp} 
     
    239239change=0 
    240240for i in 1 2 3 4 5 6 ; do 
    241     if [[ ${new_period} -lt ${liste_period[i]} && ${change} -eq 0 && ${newpackinyear} -eq 0 ]] 
     241    if [[ ${new_period} -lt ${liste_period[i]} && ${change} -eq 0 && ${newpackinyear} -ne 0 ]] 
    242242    then  
    243243        new_period=${liste_period[i-1]} 
Note: See TracChangeset for help on using the changeset viewer.