Ignore:
Timestamp:
08/10/12 16:53:21 (12 years ago)
Author:
acosce
Message:

New management of Packsize for particular case :
Now if size of simu= size of pack, we don't adjust size of pack to 1 2 5 etc...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TOOLS/PACK_IPSL/find_size_pack.sh

    r1822 r1851  
    199199 
    200200new_period=999999 
     201newpackinyear=0 
    201202 
    202203for type_file in `awk '{print $0}' ${IGCM_DEM_SIMU}/info_name_file.txt` 
     
    216217        # il faut donc commencer par calculer la taille du pack que l'on a fait # 
    217218        newpackinyear=$((    ${year_end}  - ${year_begin}        )) 
     219        newpackinyear=$(( $newpackinyear + 1 )) 
    218220        [[ ${newpackinyear} -lt 1 ]] && newpackinyear=1 
    219221         
     
    234236 
    235237# on veut que la taille de pack soit de 1 2 5 10 20 50 ou 100 ans 
     238# sauf si newperiod = nb annee de simul auquel cas on ne tronque pas 
    236239declare -a liste_period=( 1 2 5 10 20 50 100 ) 
    237240 
    238241change=0 
    239242for i in 1 2 3 4 5 6 ; do 
    240     if [[ ${new_period} -lt ${liste_period[i]} && ${change} -eq 0 ]] 
     243    if [[ ${new_period} -lt ${liste_period[i]} && ${change} -eq 0 && ${newpackinyear} -eq 0 ]] 
    241244    then  
    242245        new_period=${liste_period[i-1]} 
Note: See TracChangeset for help on using the changeset viewer.