Changeset 1922
- Timestamp:
- 11/15/12 16:00:27 (12 years ago)
- Location:
- TOOLS/PACK_IPSL
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
TOOLS/PACK_IPSL/archive_debug.sh
r1913 r1922 147 147 #la date du dernier fichier donnera la date de fin du pack 148 148 sort ${IGCM_TMP}/${$}.liste_pack_debug_${number_pack}.txt > ${IGCM_TMP}/${$}.liste_pack_debug_${number_pack}.txt.tmp 149 150 first_file=$(head -n 1 ${IGCM_TMP}/${$}.liste_pack_debug_${number_pack}.txt.tmp ) 151 extract_date_file=$( echo ${first_file} | sed -e "s/.*${JobName}_//" ) 152 DateBegin_Debug=$(echo ${extract_date_file}| sed 's%\([0-9]\{8\}\)_.*$%\1%g' ) 153 149 154 last_file=$(tail -n 1 ${IGCM_TMP}/${$}.liste_pack_debug_${number_pack}.txt.tmp ) 150 155 extract_date_file=$( echo ${last_file} | sed -e "s/.*${JobName}_//" ) 151 156 DateEnd_Debug=$( echo ${extract_date_file}| sed 's/\([0-9]\{8\}\)_.*$/\1/g' ) 152 mv ${IGCM_TMP}/${$}.liste_pack_debug_${number_pack}.txt.tmp ${DEBUG_TAR}/${JobName}_debug_${ date_begin_pack}_${DateEnd_Debug}.list157 mv ${IGCM_TMP}/${$}.liste_pack_debug_${number_pack}.txt.tmp ${DEBUG_TAR}/${JobName}_debug_${DateBegin_Debug}_${DateEnd_Debug}.list 153 158 154 159 -
TOOLS/PACK_IPSL/archive_restart.sh
r1911 r1922 159 159 #la date du dernier fichier donnera la date de fin du pack 160 160 sort ${IGCM_TMP}/${$}.liste_pack_restart_${number_pack}.txt > ${IGCM_TMP}/${$}.liste_pack_restart_${number_pack}.txt.tmp 161 162 first_file=$(head -n 1 ${IGCM_TMP}/${$}.liste_pack_restart_${number_pack}.txt.tmp ) 163 extract_date_file=$( echo ${first_file} | sed -e "s/.*${JobName}_//" ) 164 DateBegin_Restart=$(echo ${extract_date_file}| sed 's%\([0-9]\{8\}\)_.*$%\1%g' ) 165 161 166 last_file=$(tail -n 1 ${IGCM_TMP}/${$}.liste_pack_restart_${number_pack}.txt.tmp ) 162 167 extract_date_file=$( echo ${last_file} | sed -e "s/.*${JobName}_//" ) 163 168 DateEnd_Restart=$( echo ${extract_date_file}| sed 's/\([0-9]\{8\}\)_.*$/\1/g' ) 164 mv ${IGCM_TMP}/${$}.liste_pack_restart_${number_pack}.txt.tmp ${RESTART_TAR}/${JobName}_restart_${ date_begin_pack}_${DateEnd_Restart}.list169 mv ${IGCM_TMP}/${$}.liste_pack_restart_${number_pack}.txt.tmp ${RESTART_TAR}/${JobName}_restart_${DateBegin_Restart}_${DateEnd_Restart}.list 165 170 166 171 -
TOOLS/PACK_IPSL/write_liste_pack.sh
r1913 r1922 88 88 [[ "${clean_tmp}" = "yes" ]] && rm -f ${IGCM_TMP}/${$}.tmp_info_${type_file}.txt.tmp 89 89 done 90 91 90 92 91 # 3- Maintenant pour chaque type de fichier de sortie nous allons creer la liste … … 151 150 152 151 #On renomme le fichier ncrcat avec la date reelle de fin et non pas la premiere date suivant la fin 153 sort ${OUTPUT_NCRCAT}/ncrcat_${type_file}_${date_begin_pack}_${date_end_pack}.list > ${IGCM_TMP}/${$}.ncrcat.tmp 154 last_file=$(tail -n 1 ${IGCM_TMP}/${$}.ncrcat.tmp ) 155 extract_date_file=$( echo ${last_file} | sed -e "s/.*${JobName}_//" ) 156 date_fin=$(echo ${extract_date_file}| sed 's%.*_\([0-9]\{8\}\)_.*$%\1%g' ) 157 mv ${OUTPUT_NCRCAT}/ncrcat_${type_file}_${date_begin_pack}_${date_end_pack}.list ${OUTPUT_NCRCAT}/${JobName}_${date_begin_pack}_${date_fin}_${type_file}.list 152 #on renomme egalement en fonction de la date reelle de debut pour le cas des annees < 1000 qui perdent leurs zeros en cour de route 153 if [[ -f ${OUTPUT_NCRCAT}/ncrcat_${type_file}_${date_begin_pack}_${date_end_pack}.list ]]; then 154 sort ${OUTPUT_NCRCAT}/ncrcat_${type_file}_${date_begin_pack}_${date_end_pack}.list > ${IGCM_TMP}/${$}.ncrcat.tmp 155 156 first_file=$(head -n 1 ${IGCM_TMP}/${$}.ncrcat.tmp ) 157 extract_date_file=$( echo ${first_file} | sed -e "s/.*${JobName}_//" ) 158 date_debut=$(echo ${extract_date_file}| sed 's%\([0-9]\{8\}\)_.*$%\1%g' ) 159 160 last_file=$(tail -n 1 ${IGCM_TMP}/${$}.ncrcat.tmp ) 161 extract_date_file=$( echo ${last_file} | sed -e "s/.*${JobName}_//" ) 162 date_fin=$(echo ${extract_date_file}| sed 's%.*_\([0-9]\{8\}\)_.*$%\1%g' ) 163 mv ${OUTPUT_NCRCAT}/ncrcat_${type_file}_${date_begin_pack}_${date_end_pack}.list ${OUTPUT_NCRCAT}/${JobName}_${date_debut}_${date_fin}_${type_file}.list 164 fi 158 165 done 159 160 166 161 167 month_begin_pack=${month_end_pack} 162 168 year_begin_pack=${year_end_pack} … … 243 249 date_debut=$( echo ${extract_date_file} | sed 's%\([0-9]\{8\}\)_.*$%\1%g' | cut -c 1-6 ) 244 250 date_fin=$( echo ${extract_date_file} | sed 's%.*_\([0-9]\{8\}\)_.*$%\1%g' | cut -c 1-6 ) 251 #on retire les eventuels zero pour eviter de tomber sur des dates de type 08 ou 09 252 date=`echo $date|sed 's/^0*//'` 253 date_debut=`echo $date_debut|sed 's/^0*//'` 254 date_fin=`echo $date_fin|sed 's/^0*//'` 245 255 if [[ ${date} -ge ${date_debut} && ${date} -lt ${date_fin} ]]; then 246 256 mv ${pack} ${OUTPUT_TAR}/.
Note: See TracChangeset
for help on using the changeset viewer.