Ignore:
Timestamp:
05/15/12 17:03:51 (12 years ago)
Author:
acosce
Message:

Scripts ccrt to tgcc
create directories where we can store file lists to be archived (ncrcat or tar)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TOOLS/PACK_IPSL/write_liste_pack.sh

    r1717 r1726  
    5252 
    5353# creation des repertoires with_tar et with_ncrcat 
    54  
    55 mkdir -p ${IGCM_DEM_SIMU}/with_ncrcat ${IGCM_DEM_SIMU}/with_tar 
     54OUTPUT_NCRCAT=${IGCM_DEM_SIMU}/with_ncrcat 
     55OUTPUT_TAR=${IGCM_DEM_SIMU}/with_tar 
     56 
     57mkdir -p ${OUTPUT_NCRCAT} 
     58mkdir -p ${OUTPUT_TAR} 
    5659 
    5760# lecture de periodpack dans ${IGCM_DEM_SIMU}/period_pack.txt 
     
    117120               if [ ${date_fin} -ge ${date_begin_pack} ] 
    118121               then  
    119                    echo ${file} >> ${IGCM_DEM_SIMU}/with_ncrcat/ncrcat_${type_file}_${date_begin_pack}_${date_end_pack}.list 
     122                   echo ${file} >> ${OUTPUT_NCRCAT}/ncrcat_${type_file}_${date_begin_pack}_${date_end_pack}.list 
    120123                   echo ${date_debut} | cut -c 1-6 >>  ${IGCM_TMP}/${$}.date_${type_file}.txt 
    121124                   grep -v ${file} ${IGCM_TMP}/${$}.info_${type_file}.txt > ${IGCM_TMP}/${$}.info_${type_file}.txt.tmp 
     
    136139 
    137140#On renomme le fichier ncrcat avec la date reelle de fin et non pas la premiere date suivant la fin  
    138        sort ${IGCM_DEM_SIMU}/with_ncrcat/ncrcat_${type_file}_${date_begin_pack}_${date_end_pack}.list > ${IGCM_TMP}/${$}.ncrcat.tmp 
     141       sort ${OUTPUT_NCRCAT}/ncrcat_${type_file}_${date_begin_pack}_${date_end_pack}.list > ${IGCM_TMP}/${$}.ncrcat.tmp 
    139142       last_file=$(tail -n 1 ${IGCM_TMP}/${$}.ncrcat.tmp ) 
    140143       extract_date_file=$( echo ${last_file}  | sed -e "s/.*${JobName}_//" ) 
    141144       date_fin=$(echo ${extract_date_file}| sed 's%.*_\([0-9]\{8\}\)_.*$%\1%g' ) 
    142        mv ${IGCM_DEM_SIMU}/with_ncrcat/ncrcat_${type_file}_${date_begin_pack}_${date_end_pack}.list ${IGCM_DEM_SIMU}/with_ncrcat/ncrcat_${type_file}_${date_begin_pack}_${date_fin}.list 
     145       mv ${OUTPUT_NCRCAT}/ncrcat_${type_file}_${date_begin_pack}_${date_end_pack}.list ${OUTPUT_NCRCAT}/ncrcat_${type_file}_${date_begin_pack}_${date_fin}.list 
    143146   done 
    144147    
     
    220223        if [[ -f ${IGCM_DEM_SIMU}/${type_file}_manquant.list && -s ${IGCM_DEM_SIMU}/${type_file}_manquant.list ]]; then  
    221224            for date in `awk '{print $0}' ${IGCM_DEM_SIMU}/${type_file}_manquant.list` ; do  
    222                 ls -l ${IGCM_DEM_SIMU}/with_ncrcat/ncrcat_${type_file}* > ${IGCM_TMP}/${$}.liste_ncrcat 
     225                ls -l ${OUTPUT_NCRCAT}/ncrcat_${type_file}* > ${IGCM_TMP}/${$}.liste_ncrcat 
    223226                for pack in $( awk '{print $9}' ${IGCM_TMP}/${$}.liste_ncrcat ) ; do  
    224227                    extract_date_file=$( echo ${pack}       | sed -e "s%.*${type_file}_%%" ) 
     
    226229                    date_fin=$(   echo ${extract_date_file} | sed 's%.*_\([0-9]\{8\}\).list%\1%g' | cut -c 1-6  ) 
    227230                    if [[ ${date} -ge ${date_debut} && ${date} -lt ${date_fin} ]]; then 
    228                         mv ${pack} ${IGCM_DEM_SIMU}/with_tar/tar_${type_file}_${date_debut}_${date_fin}.list 
     231                        mv ${pack} ${OUTPUT_TAR}/tar_${type_file}_${date_debut}_${date_fin}.list 
    229232                        break  
    230233                    else 
Note: See TracChangeset for help on using the changeset viewer.