DESCRIPTION
Apply the rules defined in rules_file to each BUFR message in the BUFR files provided as arguments.
USAGE
bufr_filter [options] rules_file file file ...
OPTIONS
-f
Force. Force the execution not to fail on error.
-o output_grib_file
Output grib is written to output_grib_file. If an output grib file is required and -o is not used, the output grib is written to filtered.out
-V
Version.
-g
Copy GTS header.
-7
Does not fail when the message has wrong length
-v
Verbose.
bufr_filter examples
The bufr_filter processes sequentially all bufr messages contained in the input files and applies the rules to each one of them. Input messages can be written to the output by using the "write" statement. The write statement can be parameterised so that output is sent to multiple files depending on key values used in the output file name. If we write a rules_file containing the only statement:
Applying this rules_file to the "../data/tigge_pf_ecmwf.grib2" grib file we obtain several files in the ../data/split directory containing fields split according to their key valueswrite "../data/split/[bufrHeaderCentre]_[date]_[dataType]_[levelType].grib[editionNumber]";
To filter out only header information that all the BUFR files must have.
print "[bufrHeaderCentre] [bufrHeaderSubCentre] [masterTablesVersionNumber] [localTablesVersionNumber] [numberOfSubsets]"; > bufr_filter ../data/bufr/aaen_51.bufr
> bufr_filter rules_file ../data/bufr/syno_multi.bufr > results 98 0 13 1 1 98 0 13 1 1 98 0 13 1 1