Changeset 584 for trunk/libIGCM/AA_pack_output
- Timestamp:
- 03/19/12 10:36:39 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libIGCM/AA_pack_output
r583 r584 272 272 273 273 for comp in ${config_ListOfComponents[*]} ; do 274 dirList=$( find ${ BUFR}/${comp}/-maxdepth 1 -mindepth 1 -type d )275 for dir in ${dir list} ; do274 dirList=$( find ${R_BUFR}/${comp}/Output -maxdepth 1 -mindepth 1 -type d ) 275 for dir in ${dirList} ; do 276 276 # dirID is like ATM.Output.MO 277 277 dirID=$( echo $dir | sed "s:${R_BUFR}/::" | sed "s:/:.:g" ) … … 284 284 for myType in ${fileType} ; do 285 285 grep ${myType} liste_files.${dirID}.txt > liste_files.${dirID}.${myType}.txt 286 nbfile=0 286 287 for file in $( gawk '{print $11}' liste_files.${dirID}.${myType}.txt ); do 287 288 extract_date_file=$( echo ${file} | sed -e "s/.*${JobName}_[0-9]*_//" ) 288 289 date_file=$( echo ${extract_date_file} | sed 's/\([0-9]\{8\}\)_.*$/\1/g' ) 289 # echo pack n°${number_pack} ${date_file} ${date_begin_pack} ${date_end_pack} 290 # echo pack n°${number_pack} ${date_file} ${date_begin_pack} ${date_end_pack} 290 291 if [ ${date_file} -le ${date_end_pack} ] && [ ${date_file} -ge ${date_begin_pack} ] ; then 291 292 echo ${file} >> liste_pack_${myType}_${number_pack}.txt 293 ncdump -h ${file} | grep -E 'float|double' | cut -f 1 -d '(' | cut -f 2 -d ' ' >> liste_variables_${myType}_${number_pack}.txt 294 (( nbfile = nbfile + 1 )) 292 295 fi 293 296 done 297 # Select list of variables to work with 298 list_var=$( cat liste_variables_${myType}_${number_pack}.txt | sort | uniq -c | awk -v nbfile=$nbfile '{if ($1 != nbfile) {print $2}}' | paste -s -d ',' ) 299 liste_file_tmp=$( for i in $( cat liste_pack_${myType}_${number_pack}.txt ) ; do basename $i ; done ) 294 300 # Create packed files 295 301 IGCM_debug_Print 1 "Ncrcat ongoing for ${dir} and ${myType}" 296 302 output=${JobName}_${date_begin_pack}_${date_end_pack}_${myType} 297 cat liste_pack_${myType}_${number_pack}.txt | xargs IGCM_sys_ncrcat -o ${output} 303 #cat liste_pack_${myType}_${number_pack}.txt | xargs ncrcat -v ${list_var} -o ${output} 304 if [ X${list_var} = X ] ; then 305 ncrcat --omp_num_threads 4 -p ${dir} ${liste_file_tmp} --output ${output} 306 else 307 ncrcat --omp_num_threads 4 -x -v ${list_var} -p ${dir} ${liste_file_tmp} --output ${output} 308 fi 298 309 # ------------------------------------------------------------------ 299 310 # Test if all was right before proceeding further … … 301 312 IGCM_debug_Verif_Exit_Post 302 313 # Save it 303 IGCM_sys_Put_Out ${output} ${R_SAVE}/$ {dir}314 IGCM_sys_Put_Out ${output} ${R_SAVE}/$( echo $dir | sed "s:${R_BUFR}/::" )/${output} 304 315 # ------------------------------------------------------------------ 305 316 # Test if all was right before proceeding further
Note: See TracChangeset
for help on using the changeset viewer.