mirror of https://github.com/ecmwf/eccodes.git
BUFR indexing and compare
This commit is contained in:
parent
6b3fab9e35
commit
d1401bca1e
|
@ -281,6 +281,24 @@ ${tools_dir}/bufr_compare -b stationOrSiteName $fBufrTmp1 $fBufrTmp2
|
|||
unset ECCODES_BUFR_MULTI_ELEMENT_CONSTANT_ARRAYS
|
||||
rm -f $fBufrTmp1 $fBufrTmp2
|
||||
|
||||
# Through index
|
||||
# -------------
|
||||
tempIndex1=temp.$label.1.idx
|
||||
tempIndex2=temp.$label.2.idx
|
||||
f=$ECCODES_SAMPLES_PATH/BUFR3_local.tmpl
|
||||
${tools_dir}/bufr_set -s ident:s=66611 $f $fBufrTmp
|
||||
${tools_dir}/bufr_index_build -N -o $tempIndex1 $f
|
||||
${tools_dir}/bufr_index_build -N -o $tempIndex2 $fBufrTmp
|
||||
|
||||
set +e
|
||||
${tools_dir}/bufr_compare $tempIndex1 $tempIndex2
|
||||
status=$?
|
||||
set -e
|
||||
[ $status -eq 1 ]
|
||||
|
||||
${tools_dir}/bufr_compare -bident -v $tempIndex1 $tempIndex2
|
||||
rm -f $tempIndex1 $tempIndex2
|
||||
|
||||
|
||||
# Clean up
|
||||
# -------------
|
||||
|
|
|
@ -179,10 +179,11 @@ int grib_tool(int argc, char** argv)
|
|||
dump_file = stdout;
|
||||
}
|
||||
|
||||
/* ECC-926: Currently only GRIB indexing works. Disable the through_index if BUFR, GTS etc */
|
||||
if (global_options.mode == MODE_GRIB &&
|
||||
/* ECC-926: Currently only GRIB and BUFR indexing work. Disable the through_index if GTS etc */
|
||||
if ((global_options.mode == MODE_GRIB || global_options.mode == MODE_BUFR) &&
|
||||
is_index_file(global_options.infile->name) &&
|
||||
(global_options.infile_extra && is_index_file(global_options.infile_extra->name))) {
|
||||
(global_options.infile_extra && is_index_file(global_options.infile_extra->name)))
|
||||
{
|
||||
global_options.through_index = 1;
|
||||
return grib_tool_index(&global_options);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue