Changeset 1754


Ignore:
Timestamp:
06/07/12 17:28:17 (12 years ago)
Author:
acosce
Message:

in archive_restart.sh (for ccrt/tgcc mig) :

1- correct a bug on list date
2- use list of restart create by create_config_card

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TOOLS/PACK_IPSL/archive_restart.sh

    r1730 r1754  
    6565period_pack=`awk '{print $0} ' ${IGCM_DEM_SIMU}/period_pack.txt` 
    6666 
     67DEM_log -1 "Period pack = ${period_pack}"  
    6768#### 1- renommer les fichiers ###### 
    6869DEM_log -1 "Renommer les fichiers de Restart" 
     
    7273 
    7374# On les copie sur le scratchdir en changeant le nom et conservant la date 
    74 grep ${PATH_SIMUL_FULL} ${LISTE_DMNFS} | grep Restart | awk '{print $3}' | sed '/^.*Restart$/d' >> ${IGCM_TMP}/${$}.liste_restart_files.txt 
     75awk '{print $2}' ${IGCM_DEM_SIMU}/liste_restart_files_config.txt > ${IGCM_TMP}/${$}.liste_restart_files.txt 
     76#grep ${PATH_SIMUL_FULL} ${LISTE_DMNFS} | grep Restart | awk '{print $3}' | sed '/^.*Restart$/d' >> ${IGCM_TMP}/${$}.liste_restart_files.txt 
    7577 
    7678   
     
    108110   year_end_pack=`expr ${year_begin_pack} + ${period_pack}` 
    109111 
    110    if [ ${month_end_pack} -le 9 ]  
    111    then  
    112       date_end_pack=${year_end_pack}0${month_end_pack}01 
    113    fi  
    114    if [ ${month_end_pack} -gt 9 ]  
    115    then  
    116       date_end_pack=${year_end_pack}${month_end_pack}01    
    117    fi  
    118112 
    119    
     113   date_end_pack=${year_end_pack}${month_end_pack}01    
     114 
    120115   for file in `awk '{print $9}' ${IGCM_TMP}/${$}.new_liste_restart_files.txt`; do  
    121116    
     
    123118     date_file=`echo ${extract_date_file}| sed 's/\([0-9]\{8\}\)_.*$/\1/g'` 
    124119 
    125  
     120#     DEM_log "date_file = ${date_file}" 
    126121     if [  ${date_file} -lt ${date_end_pack} ] 
    127122     then  
    128123        if [ ${date_file} -ge ${date_begin_pack} ] 
    129124        then  
     125#          DEM_log "${file} ${date_file} dans ${date_begin_pack} ${date_end_pack} " 
    130126           echo ${file} >> ${IGCM_TMP}/${$}.liste_pack_restart_${number_pack}.txt 
    131127        fi 
     
    156152   year_begin_pack=${year_end_pack} 
    157153 
    158    if [ ${month_begin_pack} -le 9 ] 
    159    then  
    160       date_begin_pack=${year_begin_pack}0${month_begin_pack}01 
    161    fi  
    162    if [ ${month_begin_pack} -gt 9 ] 
    163    then  
    164       date_begin_pack=${year_begin_pack}${month_begin_pack}01 
    165    fi  
    166  
     154   date_begin_pack=${year_begin_pack}${month_begin_pack}01 
    167155 
    168156   number_pack=`expr ${number_pack} + 1` 
Note: See TracChangeset for help on using the changeset viewer.