wradlib Documentation - Bitbucket
wradlib Documentation - Bitbucket
wradlib Documentation - Bitbucket
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
<strong>wradlib</strong> <strong>Documentation</strong>, Release 0.1.1<br />
At the moment, the national RADOLAN composite is a 900 x 900 grid with 1 km resolution and in polarstereographic<br />
projection.<br />
Parameters fname : path to the composite file<br />
Returns output : tuple of two items (data, attrs)<br />
• data : numpy array of shape (number of rows, number of columns)<br />
• attrs : dictionary of metadata information from the file header<br />
References<br />
[DWD2009]<br />
3.2 Reading BUFR Files<br />
The Binary Universal Form for the Representation of meteorological data (BUFR) is a binary data format maintained<br />
by the World Meteorological Organization (WMO). The BUFR format was adopted by the OPERA program for the<br />
representation of weather radar data. This module provides a wrapper around the OPERA BUFR software, currently<br />
only for decoding BUFR files. In the future, functions for BUFR encoding might be added as well. If you intend to<br />
work with BUFR data, we recommend reading OPERA’s BUFR software documentation.<br />
decodebufr<br />
parse_desctable<br />
Main BUFR interface: Decodes BUFR file and returns metadata and values<br />
Parses the decriptor table and returns a dictionary of descriptors<br />
3.2.1 <strong>wradlib</strong>.bufr.decodebufr<br />
<strong>wradlib</strong>.bufr.decodebufr(buffile)<br />
Main BUFR interface: Decodes BUFR file and returns metadata and values<br />
The BUFR file format is a self-describing binary format for meteorological data. <strong>wradlib</strong> uses<br />
the decoding software from the OPERA 3 program. All background information is available under<br />
http://www.knmi.nl/opera/bufr.html.<br />
Basically, a BUFR file consists of a set of descriptors which contain all the relevant metadata and a data section.<br />
The descriptors are identified as a tuple of three integers. The meaning of these tupels is described in the so<br />
called BUFR tables. There are generic BUFR tables provided by the WMO, but it is also possible to define so<br />
called local tables - which was done by the OPERA consortium for the purpose of radar data representation.<br />
This decoding function returns a two element tuple. The first element of the return tuple is the actual data array.<br />
It is a multi-dimensional numpy array of which the shape depends on the descriptor specifications (mostly it<br />
will be 2-dimensional). The second element is a tuple of two dictionaries (descnames, descvals). descnames<br />
relates the descriptor identifiers to comprehensible descriptor names. descvals relates the descriptor names to<br />
descriptor values. E.g. if the descriptor identifier was (0, 30, 21), the descriptor name would be ‘Number of<br />
pixels per row’ and the descriptor value could be an integer which actually specifies the number of rows of a<br />
grid.<br />
Parameters buffile : Path to a BUFR file<br />
Returns output: a tuple with two elements (data, metadata) :<br />
• data : the actual data as a multidimensional numpy array<br />
• metadata : tuple of two elements (descnames, descvals)<br />
38 Chapter 3. Library Reference