Changeset 1726 for TOOLS/PACK_IPSL/write_liste_pack.sh
- Timestamp:
- 05/15/12 17:03:51 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TOOLS/PACK_IPSL/write_liste_pack.sh
r1717 r1726 52 52 53 53 # creation des repertoires with_tar et with_ncrcat 54 55 mkdir -p ${IGCM_DEM_SIMU}/with_ncrcat ${IGCM_DEM_SIMU}/with_tar 54 OUTPUT_NCRCAT=${IGCM_DEM_SIMU}/with_ncrcat 55 OUTPUT_TAR=${IGCM_DEM_SIMU}/with_tar 56 57 mkdir -p ${OUTPUT_NCRCAT} 58 mkdir -p ${OUTPUT_TAR} 56 59 57 60 # lecture de periodpack dans ${IGCM_DEM_SIMU}/period_pack.txt … … 117 120 if [ ${date_fin} -ge ${date_begin_pack} ] 118 121 then 119 echo ${file} >> ${ IGCM_DEM_SIMU}/with_ncrcat/ncrcat_${type_file}_${date_begin_pack}_${date_end_pack}.list122 echo ${file} >> ${OUTPUT_NCRCAT}/ncrcat_${type_file}_${date_begin_pack}_${date_end_pack}.list 120 123 echo ${date_debut} | cut -c 1-6 >> ${IGCM_TMP}/${$}.date_${type_file}.txt 121 124 grep -v ${file} ${IGCM_TMP}/${$}.info_${type_file}.txt > ${IGCM_TMP}/${$}.info_${type_file}.txt.tmp … … 136 139 137 140 #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.tmp141 sort ${OUTPUT_NCRCAT}/ncrcat_${type_file}_${date_begin_pack}_${date_end_pack}.list > ${IGCM_TMP}/${$}.ncrcat.tmp 139 142 last_file=$(tail -n 1 ${IGCM_TMP}/${$}.ncrcat.tmp ) 140 143 extract_date_file=$( echo ${last_file} | sed -e "s/.*${JobName}_//" ) 141 144 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}.list145 mv ${OUTPUT_NCRCAT}/ncrcat_${type_file}_${date_begin_pack}_${date_end_pack}.list ${OUTPUT_NCRCAT}/ncrcat_${type_file}_${date_begin_pack}_${date_fin}.list 143 146 done 144 147 … … 220 223 if [[ -f ${IGCM_DEM_SIMU}/${type_file}_manquant.list && -s ${IGCM_DEM_SIMU}/${type_file}_manquant.list ]]; then 221 224 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_ncrcat225 ls -l ${OUTPUT_NCRCAT}/ncrcat_${type_file}* > ${IGCM_TMP}/${$}.liste_ncrcat 223 226 for pack in $( awk '{print $9}' ${IGCM_TMP}/${$}.liste_ncrcat ) ; do 224 227 extract_date_file=$( echo ${pack} | sed -e "s%.*${type_file}_%%" ) … … 226 229 date_fin=$( echo ${extract_date_file} | sed 's%.*_\([0-9]\{8\}\).list%\1%g' | cut -c 1-6 ) 227 230 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}.list231 mv ${pack} ${OUTPUT_TAR}/tar_${type_file}_${date_debut}_${date_fin}.list 229 232 break 230 233 else
Note: See TracChangeset
for help on using the changeset viewer.