read_radolan_composite(f, missing=- 9999, loaddata=True, fillmissing=False)¶
Read quantitative radar composite format of the German Weather Service
The quantitative composite format of the DWD (German Weather Service) was established in the course of the RADOLAN project and includes several file types, e.g. RX, RO, RK, RZ, RP, RT, RC, RI, RG, PC, PG and many, many more. (see format description on the RADOLAN project homepage [DWD, 2009]). At the moment, the national RADOLAN composite is a 900 x 900 grid with 1 km resolution and in polar-stereographic projection. There are other grid resolutions for different composites (eg. PC, PG)
This function already evaluates and applies the so-called PR factor which is specified in the header section of the RADOLAN files. The raw values in an RY file are in the unit 0.01 mm/5min, while read_radolan_composite returns values in mm/5min (i. e. factor 100 higher). The factor is also returned as part of attrs dictionary under keyword “precision”.
Using loaddata=’xarray’ the data is wrapped in an xarray Dataset. x,y, dimension as well as x,y and time coordinates (polar stereographic projection) are supplied.
f (string or file-like) – path to the composite file or file-like object
missing (int) – value assigned to no-data cells
loaddata (bool | str) – True | False | ‘xarray’, If False function returns (None, attrs) If ‘xarray’ returns (xarray Dataset, attrs)
fillmissing (bool) – If True fills truncated values with “missing”. Defaults to False. Does not work for run-length encoded files (“PC” and “PG).
output (tuple) –
- tuple of two items (data, attrs):
numpy.arrayof shape (number of rows, number of columns) | xarray.Dataset
attrs : dictionary of metadata information from the file header