Changeset 2027


Ignore:
Timestamp:
03/11/13 15:13:11 (11 years ago)
Author:
aclsce
Message:

Fixed some bugs (very small bugs).

Location:
TOOLS/PACK_IPSL
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • TOOLS/PACK_IPSL/archive_debug.sh

    r2022 r2027  
    120120 
    121121        DEM_log -1 "On calcule la date de fin du pack " 
    122  
    123122        month_end_pack=${month_begin_pack} 
    124123        year_end_pack=`expr ${year_begin_pack} + ${period_pack}` 
     
    130129                extract_date_file=`echo ${file}  | sed -e "s/.*\${JobName}_//"` 
    131130                date_file=`echo ${extract_date_file}| sed 's/\([0-9]\{8\}\)_.*$/\1/g'` 
    132                 if [[ ! -n ${date_file//[0-9]/} ]]; then 
     131                if [[  "x${date_file}" != "x" && ! -n ${date_file//[0-9]/} ]]; then 
    133132                    if [  ${date_file} -lt ${date_end_pack} ] 
    134133                    then  
     
    144143                extract_date_file=`echo ${file}  | sed -e "s/.*\${JobName}_//"` 
    145144                date_file=`echo ${extract_date_file}| sed 's/\([0-9]\{8\}\)_.*$/\1/g'` 
    146                 if [[ ! -n ${date_file//[0-9]/} ]]; then  
     145        if [[  "x${date_file}" != "x" && ! -n ${date_file//[0-9]/} ]]; then 
    147146                    if [ ${date_file} -lt ${date_end_pack} ] 
    148147                    then  
  • TOOLS/PACK_IPSL/find_size_pack.sh

    r1962 r2027  
    5454 
    5555DEM_write_state ${IGCM_DEM}/config_card.liste ${config_card} FindSizePackRunning 
    56  
    5756# Periodicite du pack (20 ans par defaut)  
    5857period_pack=20Y 
     
    119118# taille qu'aurait le pack de {periodpackinyear}ans 
    120119DEM_log -1 "Debut recherche taille de pack" 
    121  
    122120# Recherche des dates du premier pack 
    123121 
     
    136134 
    137135# on ne fait le calcul que pour les dix premiers pack (donc 20 * 10 =  200 ans)  
    138 # cela doit donner un echantillon suffisant  
     136# cela doit donner un echantillon suffisant 
     137date_begin_pack=`echo $date_begin_pack|sed 's/^0*//'`  
     138date_end_simulation=`echo $date_end_simulation|sed 's/^0*//'`  
    139139while [[ ${date_begin_pack} -le ${date_end_simulation}  && ${number_pack} -le 10 ]] 
    140140do  
    141141     
    142142    month_end_pack=${month_begin_pack} 
    143     year_end_pack=$(( ${year_begin_pack} + ${periodpackinyear} )) 
    144      
     143    year_end_pack=$(( 10#${year_begin_pack} + ${periodpackinyear} )) 
    145144    date_end_pack=${year_end_pack}${month_end_pack}01  
    146145 
     
    202201new_period=999999 
    203202newpackinyear=0 
    204  
    205 for type_file in `awk '{print $0}' ${IGCM_DEM_SIMU}/info_name_file.txt` 
    206 do  
    207     nb_line=$(cat ${IGCM_TMP}/${$}.size_pack_${type_file}.txt | wc -l ) 
    208     if [ ${nb_line} -gt 1 ]  
    209     then  
    210         for taille in `head -n -1  ${IGCM_TMP}/${$}.size_pack_${type_file}.txt` 
    211         do  
    212             [[ ${taille} -lt ${size_pack_min} ]] && period_tmp=$(( ${size_pack_min} * ${periodpackinyear} / ${taille} )) 
    213             [[ ${taille} -gt ${size_pack_max} ]] && period_tmp=$(( ${size_pack_min} * ${periodpackinyear} / ${taille} )) 
    214             [[ ${taille} -ge ${size_pack_min} && ${taille} -le ${size_pack_max} ]] && period_tmp=${periodpackinyear} 
    215             [[ ${period_tmp} -lt ${new_period} ]] && new_period=${period_tmp} 
    216         done 
    217     else 
     203if [[ -f ${IGCM_TMP}/${$}.size_pack_${type_file}.txt ]]; then  
     204    for type_file in `awk '{print $0}' ${IGCM_DEM_SIMU}/info_name_file.txt` 
     205    do 
     206        nb_line=$(cat ${IGCM_TMP}/${$}.size_pack_${type_file}.txt | wc -l ) 
     207        if [ ${nb_line} -gt 1 ]  
     208        then  
     209            for taille in `head -n -1  ${IGCM_TMP}/${$}.size_pack_${type_file}.txt` 
     210            do  
     211                [[ ${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} )) 
     213                [[ ${taille} -ge ${size_pack_min} && ${taille} -le ${size_pack_max} ]] && period_tmp=${periodpackinyear} 
     214                [[ ${period_tmp} -lt ${new_period} ]] && new_period=${period_tmp} 
     215            done 
     216        else 
    218217        # Dans ce cas la il n'y avait pas assez de fichiers pour remplir une periode complete # 
    219218        # il faut donc commencer par calculer la taille du pack que l'on a fait # 
    220         newpackinyear=$((    ${year_end}  - ${year_begin}        )) 
    221         newpackinyear=$(( $newpackinyear + 1 )) 
    222         [[ ${newpackinyear} -lt 1 ]] && newpackinyear=1 
    223          
    224         for taille in `head  ${IGCM_TMP}/${$}.size_pack_${type_file}.txt` 
    225         do  
    226             [[ ${taille} -lt ${size_pack_min} ]] && period_tmp=${newpackinyear} 
    227             [[ ${taille} -gt ${size_pack_max} ]] && period_tmp=$(( ${size_pack_min} * ${newpackinyear} / ${taille} )) 
    228             [[ ${taille} -ge ${size_pack_min} && ${taille} -le ${size_pack_max} ]] && period_tmp=${newpackinyear} 
    229             [[ ${period_tmp} -lt ${new_period} ]] && new_period=${period_tmp} 
    230         done 
    231          
    232     fi  
    233 done 
    234  
     219            newpackinyear=$((    ${year_end}  - ${year_begin}        )) 
     220            newpackinyear=$(( $newpackinyear + 1 )) 
     221            [[ ${newpackinyear} -lt 1 ]] && newpackinyear=1 
     222            for taille in `head  ${IGCM_TMP}/${$}.size_pack_${type_file}.txt` 
     223            do  
     224                [[ ${taille} -lt ${size_pack_min} ]] && period_tmp=${newpackinyear} 
     225                [[ ${taille} -gt ${size_pack_max} ]] && period_tmp=$(( ${size_pack_min} * ${newpackinyear} / ${taille} )) 
     226                [[ ${taille} -ge ${size_pack_min} && ${taille} -le ${size_pack_max} ]] && period_tmp=${newpackinyear} 
     227                [[ ${period_tmp} -lt ${new_period} ]] && new_period=${period_tmp} 
     228            done 
     229        fi  
     230    done 
     231fi 
    235232DEM_log -1 "taille=${taille}" 
    236233DEM_log -1 "new_period=${new_period}" 
  • TOOLS/PACK_IPSL/load_ipslPack_env.sh

    r1882 r2027  
    11#!/bin/bash 
    22 
     3export TMP_MIGR_DATA="/ccc/dmfbuf/ipsl_logs/dsm/bacasable/ARNAUD_ter"  
     4export INPUT_DMF_DATA="/ccc/dmfbuf/import_data.3/ccrt/dmnfs10/cont003/p25alka" 
     5export OUTPUT_STORE="/ccc/dmfbuf/import_data.2/ccrt/dmnfs12/cont003/bacasable/ARNAUD_ter/PSEUDO_DMNFS_STORE" 
     6export OUTPUT_WORK="/ccc/dmfbuf/import_data.2/ccrt/dmnfs12/cont003/bacasable/ARNAUD_ter/PSEUDO_DMNFS_WORK" 
     7 
     8export IGCM_DEM=${TMP_MIGR_DATA}"/IGCM_DEM_ter" 
     9export OUTPUT_CHECK=${TMP_MIGR_DATA}"/PSEUDO_DMNFS_CHECK_ter" 
     10export OUTPUT_PROGRESS=${TMP_MIGR_DATA}"/PSEUDO_DMNFS_PROGRESS_ter" 
     11 
    312# Variables d'environnement 
    4 export TMP_MIGR_DATA="/ccc/dmfbuf/ipsl_logs/dsm/bacasable/ARNAUD"  
    5 export INPUT_DMF_DATA="/ccc/dmfbuf/import_data.2/ccrt/dmnfs12/cont003/bacasable" 
    6 export OUTPUT_STORE="/ccc/dmfbuf/import_data.2/ccrt/dmnfs12/cont003/bacasable/ARNAUD/PSEUDO_DMNFS_STORE" 
    7 export OUTPUT_WORK="/ccc/dmfbuf/import_data.2/ccrt/dmnfs12/cont003/bacasable/ARNAUD/PSEUDO_DMNFS_WORK" 
    8  
    9 export IGCM_DEM=${TMP_MIGR_DATA}"/IGCM_DEM" 
    10 export OUTPUT_CHECK=${TMP_MIGR_DATA}"/PSEUDO_DMNFS_CHECK" 
    11 export OUTPUT_PROGRESS=${TMP_MIGR_DATA}"/PSEUDO_DMNFS_PROGRESS" 
    12  
    1313 
    1414# Sur curie en sequentiel 
  • TOOLS/PACK_IPSL/write_liste_pack.sh

    r1922 r2027  
    103103 
    104104# 
     105date_begin_pack=`echo $date_begin_pack|sed 's/^0*//'` 
     106date_end_simulation=`echo $date_end_simulation|sed 's/^0*//'` 
     107 
    105108while [[ ${date_begin_pack} -le ${date_end_simulation}  ]] 
    106109do  
Note: See TracChangeset for help on using the changeset viewer.