A BUFR message can be composed of several subsets. The number of subsets in a BUFR message is given by the key |
How to split subsets
A BUFR message can be composed of several subsets. The number of subsets in a BUFR message is given by the key "numberOfSubsets"
which is printed by the bufr_ls tool:
> bufr_ls synop_multi_subset.bufr centre masterTablesVersionNumber localTablesVersionNumber numberOfSubsets enmi 14 0 12 |
Starting from release version 0.13.0 a given number of subsets can be extracted and saved in a new message. This is based on the use of the following keys:
The following file "instructions.filter" with bufr_filter instructions can be used to perform the extraction of several subsets from a BUFR message.
set unpack=1; set extractSubset=4; set doExtractSubsets=1; write; set extractSubsetIntervalStart=3; set extractSubsetIntervalEnd=8; set doExtractSubsets=1; write; |
This example can be used on any multi-subset input file in compressed and uncompressed form as follows:
> bufr_filter -o out.bufr instructions.filter in.bufr |
There is also the key "extractSubsetList
" which allows you to specify the subsets of interest in a list e.g.
# Extract the first and the third subsets set unpack=1; set extractSubsetList={1, 3}; set doExtractSubsets=1; write; |
Related articles appear here based on the labels you select. Click to edit the macro and add or change labels.