- Timestamp:
- 05/15/12 17:03:51 (12 years ago)
- Location:
- TOOLS/PACK_IPSL
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
TOOLS/PACK_IPSL/create_config_card.sh
r1716 r1726 48 48 IGCM_DEM_SIMU=${IGCM_DEM}/${PATH_SIMUL_SHORT} 49 49 mkdir -p ${IGCM_DEM_SIMU} 50 rm -f ${IGCM_DEM_SIMU}/* 51 50 rm -rf ${IGCM_DEM_SIMU}/* 51 52 #creation du repertoire permettant de stocker 53 #les listes de fichiers qui ne sont pas au format output ou restart 54 #les listes de fichiers d'analyse, les monitos et les atlas 55 OTHER_TAR=${IGCM_DEM_SIMU}/other_tar 56 STORE_CP=${IGCM_DEM_SIMU}/store_cp 57 WORK_CP=${IGCM_DEM_SIMU}/work_cp 58 59 DEM_log -2 "creation des repertoires : $OTHER_TAR - $STORE_CP - $WORK_CP" 60 61 mkdir -p ${OTHER_TAR} 62 mkdir -p ${STORE_CP} 63 mkdir -p ${WORK_CP} 64 65 # on recherche le nom du job 52 66 JobName="" 53 67 … … 83 97 fi 84 98 99 100 # Etablir la liste des fichiers d'Analyse 101 grep ${PATH_SIMUL_FULL}/ ${LISTE_DMNFS} | grep Analyse | awk '{print $2 " " $3}' | sort >> ${STORE_CP}/liste_analyse_files.txt 102 103 104 # Etablir la liste des fichiers Monito et Atlas 105 grep ${PATH_SIMUL_FULL}/ ${LISTE_DMNFS} | grep MONITORING | awk '{print $2 " " $3}' | sort >> ${WORK_CP}/liste_monito_files.txt 106 grep ${PATH_SIMUL_FULL}/ ${LISTE_DMNFS} | grep ATLAS | awk '{print $2 " " $3}' | sort >> ${WORK_CP}/liste_atlas_files.txt 107 108 109 85 110 # Lecture du nom du job 86 111 JobName=`awk -F/ '{if (NR==1) print $(NF-3)}' ${IGCM_TMP}/${$}.liste_restart_files_config.txt` … … 96 121 # Sauvegarde des fichiers qui ne sont pas dans la norme 97 122 cat ${IGCM_TMP}/${$}.info_tmp_bis.txt >> ${IGCM_TMP}/${$}.liste_no_restart_files_config.txt 98 mv ${IGCM_TMP}/${$}.liste_no_restart_files_config.txt ${ IGCM_DEM_SIMU}/tar_no_restart_files.txt123 mv ${IGCM_TMP}/${$}.liste_no_restart_files_config.txt ${OTHER_TAR}/tar_no_restart_files.txt 99 124 100 125 … … 106 131 # Sauvegarde des fichiers qui ne sont pas dans la norme 107 132 cat ${IGCM_TMP}/${$}.info_tmp_bis.txt >> ${IGCM_TMP}/${$}.liste_no_output_files_config.txt 108 mv ${IGCM_TMP}/${$}.liste_no_output_files_config.txt ${ IGCM_DEM_SIMU}/tar_no_output_files.txt133 mv ${IGCM_TMP}/${$}.liste_no_output_files_config.txt ${OTHER_TAR}/tar_no_output_files.txt 109 134 110 135 … … 161 186 fi 162 187 188 # si les listes no_output et no_restart sont vides on les efface 189 if [[ ! -s ${OTHER_TAR}/tar_no_output_files.txt ]]; then 190 rm -f ${OTHER_TAR}/tar_no_output_files.txt 191 fi 192 193 if [[ ! -s ${OTHER_TAR}/tar_no_restart_files.txt ]]; then 194 rm -f ${OTHER_TAR}/tar_no_restart_files.txt 195 fi 196 197 163 198 done 164 199 -
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.