Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Excerpt
hiddentrue

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:

...

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:

...

To explain the use of these keys the following example using the bufr_filter is provided, but we highlight the fact that the keys can be set using the Fortran and Python interfaces as well and no special functions have been implemented in the bufr_filter for this feature.

The following file "instructionsinstructions1.filter" with bufr_filter instructions can be used to perform the extraction of several subsets a single subset from a BUFR message.

Code Block
languagedelphi
titleinstructionsinstructions1.filter
linenumberstrue
set unpack=1;

set extractSubset=4;
set doExtractSubsets=1;
write;

...

In the next example we extract all the several subsets specifying an interval.

Code Block
languagedelphi
titleinstructions2.filter
linenumberstrue
set unpack=1;
set extractSubsetIntervalStart=3;
set extractSubsetIntervalEnd=8;
set doExtractSubsets=1;
write;

Here we extract all the subsets in an interval starting with the key extractSubsetIntervalStart and ending with the key extractSubsetIntervalEnd. In the example at lines 2 to 3 the request to extract all the subsets between the 3rd and the 8th (including the 3rd and the 8th) is expressed setting the two extractSubsetInterval keys. The extraction is performed when the key doExtractSubset is set to 1 and the resulting message containing the 6 subsets from the 3rd to the 8th from the original message are written to the output file.

This example These examples can be used on any multi-subset input file in compressed and uncompressed form as follows:

Code Block
languagebash
% bufr_filter -o out1.bufr instructions1.filter in.bufr
% bufr_filter -o outout2.bufr instructionsinstructions2.filter in.bufr


There is also the key "extractSubsetList" which allows you to specify the subsets of interest in a list e.g.

...

Content by Label
showLabelsfalse
max5
spaces~usa
showSpacefalse
sortmodified
reversetrue
typepage
excludeCurrenttrue
cqllabel in ("kb-how-to-article","eccbufr-faqs","bufr","bufr_filter","subsets","split") and label = "bufr" and type = "page" and space = "UDOC"
labelskb-how-to-article

...