GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
BUFRREAD(1) User Contributed Perl Documentation BUFRREAD(1)

  bufrread.pl <bufr file(s)>
      [--ahl <ahl_regexp>]
      [--all_operators]
      [--bitmap]
      [--codetables]
      [--data_only]
      [--filter <filter file>]
      [--help]
      [--nodata]
      [--noqc]
      [--on_error_stop]
      [--optional_section]
      [--outfile <filename>]
      [--param <descriptor file>]
      [--strict_checking n]
      [--tableformat <BUFRDC|ECCODES>]
      [--tablepath <path to BUFR tables>]
      [--verbose n]
      [--width n]

Extract BUFR messages from BUFR file(s) and print the decoded content to screen, including AHL (Abbreviated Header Line) if present.

Execute without arguments for Usage, with option "--help" for some additional info. See also <https://wiki.met.no/bufr.pm/start> for examples of use.

   --ahl <ahl_regexp>
                   Decode BUFR messages with AHL matching <ahl_regexp> only
   --all_operators Show replication descriptors and all operator descriptors
                   when printing section 4
   --bitmap        Display bit-mapped values on same line
   --codetables    Use code and flag tables to resolve values when unit
                   is [CODE TABLE] or [FLAG TABLE]
   --data_only     Print section 4 (data section) only
   --filter <filter file>
                   Decode observations meeting criteria in <filter file> only
   --help          Display Usage and explain the options used. For even
                   more info you might prefer to consult perldoc bufrread.pl
   --nodata        Do not print (nor decode) section 4 (data section)
   --noqc          Do not decode quality control
                   (or any descriptors following 222000)
   --on_error_stop Stop processing as soon as an error occurs during decoding
   --outfile <filename>
                   Will print to <filename> instead of STDOUT
   --optional_section
                   Display a hex dump of optional section if present
   --param <descriptor file>
                   Display parameters with descriptors in <descriptor file> only
   --strict_checking n n=0 (default) Disable strict checking of BUFR format
                       n=1 Issue warning if (recoverable) error in
                           BUFR format
                       n=2 Croak if (recoverable) error in BUFR format.
                           Nothing more in this message/subset will be decoded.
   --tableformat   Currently supported are BUFRDC and ECCODES (default is BUFRDC)
   --tablepath <path to BUFR tables>
                   Set path to BUFR tables (overrides ENV{BUFR_TABLES})
   --verbose n     Set verbose level to n, 0<=n<=6 (default 0). n=1 will
                   show the tables loaded.
   --width n       Set width of field used for data values to n characters
                   (default is 15)

Options may be abbreviated, e.g. "--h" or "-h" for "--help".

To avoid having to use the "--tablepath" option, you are adviced to set the environment variable BUFR_TABLES to the directory where your BUFR tables are located (unless the default path provided by bufrread.pl works for you). For tableformat ECCODES, se <http://search.cpan.org/dist/Geo-BUFR/lib/Geo/BUFR.pm#BUFR-TABLE-FILES> for more info on how to set "--tablepath" (or BUFR_TABLES).

For option "--ahl" the <ahl_regexp> should be a Perl regular expression. E.g. "--ahl "ISS... ENMI"" will decode only BUFR SHIP (ISS) from CCCC=ENMI. This is the only case where a little knowledge of Perl might possibly be required when using the utility programs included in Geo::BUFR.

For option "--param" each line in <descriptor file> should start with a BUFR descriptor (6 digits). Rest of line will be ignored. bufrread.pl will display values for these descriptors only.

Using "--filter" will decode only those observations that meet one of the criteria in <filter file> marked D: and all of those criteria marked D!:. Comments (starting with #) are ignored. An example of a filter file is

  D: 001001
  1
  D: 001001 001002
  3 895
  6 252
  D: 001011
  LF5U       # Ekofisk
  D!: 004004
  6
  7

which decodes all observations with block number 01, two other specific WMO stations and one specific ship, all of which having hour (004004) equal to 6 or 7. If there is no value line after a descriptor line, it is enough that the observation contains the descriptor(s), whatever the values are. So to extract all ship messages from a BUFR file, the filter file should contain this single line only:

  D: 001011

If an error occurs during decoding (typically because the required BUFR table is missing or message is corrupt), the BUFR message is skipped with an error message printed to STDERR, and processing then continues with the next BUFR message. You can change this default behaviour, however, by setting "--on_error_stop".

Option "--bitmap" may not work properly for complicated BUFR messages. Namely, when the first bit-map is encountered, no more data values (or their descriptors) will be displayed unless they refer to the preceding data values by a bit-map. And output is not to be trusted if a bit-map refers to another bit-map or the bit-mapped values are combined with 204YYY (add associated field operator).

Pål Sannes <pal.sannes@met.no>

Copyright (C) 2010-2020 MET Norway
2022-04-09 perl v5.32.1

Search for    or go to Top of page |  Section 1 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.