reading RAINBOW .dpsri and .pac data

181 views
Skip to first unread message

Willem Maetens

unread,
Mar 10, 2016, 10:14:01 AM3/10/16
to wradlib-users, Willem Maetens
Hello,

I'm completely new to wradlib (and radar imaging for that matter). I would like to read RAINBOW5 .dpsri (dual polarisation surface rain intensity) an .pac (precipitation accumulation) data using the read_Rainbow function, example .dpsri file in attachment. Metadata reading is OK (setting loaddata=False) runs fine, but the binary blob causes an error (see screenshots). Any ideas on what exactly causes this error (the blob key apparently, but I have no idea what's wrong with it) and how to bypass it?

best wishes,
Willem


2016021704000400dBR.dpsri

Kai Muehlbauer

unread,
Mar 10, 2016, 10:18:17 AM3/10/16
to wradli...@googlegroups.com
Hi Willem,

thanks for using wradlib.

It seems, that you are using an outdated wradlib version. Just today we
released version 0.8.0 which is python3 compatible.

Its available from pypi, or find your way from wradlib.org to the github
repo.

If all is good, the new version fixes the problem already.

Cheers,
Kai
> <https://lh3.googleusercontent.com/-VIxTcVi1Rag/VuGO5WhticI/AAAAAAAAAwQ/VOj15Of4T9A/s1600/Screenshot%2Bfrom%2B2016-03-10%2B15%253A36%253A09.png>
>

--
Kai Muehlbauer
Meteorological Institute University of Bonn
Auf dem Huegel 20 | +49 228 739083
D-53121 Bonn | kai.mue...@uni-bonn.de

Kai Muehlbauer

unread,
Mar 14, 2016, 5:34:59 AM3/14/16
to wradli...@googlegroups.com, Willem Maetens
Hi Willem,

did you have any progress regarding that matter?

For quick "browsing" your rainbow5 data you can use the snippet
presented in this article (http://wradlib.org/2016/03/treeview-with-traits/)

If you take a closer look, it's the data from your example file.

HTH,
Kai



Am 10.03.2016 um 16:14 schrieb Willem Maetens:

Willem Maetens

unread,
Mar 14, 2016, 7:11:07 PM3/14/16
to wradlib-users, w.ma...@vmm.be, kai.mue...@uni-bonn.de
Hi,

Thanks for the help. I updated wradlib to v.0.8.1 but still get stuck on reading the binary data part (the xml 'metadata' part is OK). read_Rainbow now gets stuck on the
for k, v in dictionary.items(): line in the find_key function. When the error is generated, dictionary is a string with value "11" and thus has no items while I guess it should be a dictionary where find_key is looking for @blobid.
There are 2 @blobid's in the dictionary (in the radarpicture section) that is read when loaddata in read_Rainbow is set to False, but but I didn't have time yet to delve deeper to see why find_key doesn't find them, hopefully I can have a look at it later this week.

cheers,
Willem

Op maandag 14 maart 2016 10:34:59 UTC+1 schreef Kai Muehlbauer:

Kai Muehlbauer

unread,
Mar 15, 2016, 10:52:11 AM3/15/16
to wradli...@googlegroups.com, w.ma...@vmm.be
Hi Willem,

this took a while to figure out.

First we may have some bug, fetching list data from the file. We have to
look into this separately.

Second, your data consists of processed radar images, not raw radar data.

So this data has in your case 800 x 800 rows x cols (keys 'rows' and
'columns' in the file), whereas the raw radar data is in polar format
(keys 'rays' and 'bins').

The good thing is, the rainbow reader implementation in wradlib is
momentarily able to read this data out of the box. The bad thing is,
there is flag-data attached. In your case 6 bits per pixel packed into
the 8bit raw data (depth=6). I've tried a quick look into this, we can
use numpy functions to unpack this flag-data and have this as array
within the dictionary (rows x cols x flag#).

Additional discussion will follow in this ticket here:
https://github.com/wradlib/wradlib/issues/31

Cheers,
Kai
>> D-53121 Bonn | kai.mue...@uni-bonn.de <javascript:>

Kai Muehlbauer

unread,
Mar 17, 2016, 2:54:47 AM3/17/16
to wradli...@googlegroups.com, w.ma...@vmm.be
Hi Willem,

we have updated the dev-version with the needed changes:

https://github.com/wradlib/wradlib/pull/32

You are encouraged to pull the latest wradlib version from
https://github.com/wradlib/wradlib.git

You can test this with your data files and report back if things get
well or if there are any additional issues or questions.

Cheers,
Kai

Am 15.03.2016 um 00:11 schrieb Willem Maetens:
>> D-53121 Bonn | kai.mue...@uni-bonn.de <javascript:>

Willem Maetens

unread,
Mar 23, 2016, 6:25:22 PM3/23/16
to wradlib-users, w.ma...@vmm.be, kai.mue...@uni-bonn.de
Hi,

Finally got round to test your updated code and it works like a charm! It handles the different variations of our data (.sri, .dpsri and .pac) OK.
Lots of thanks!

cheers,
Willem

Op donderdag 17 maart 2016 07:54:47 UTC+1 schreef Kai Muehlbauer:

Kai Muehlbauer

unread,
Mar 24, 2016, 4:44:09 AM3/24/16
to Willem Maetens, wradlib-users, w.ma...@vmm.be
Hi Willem,

that's really good news!

We are thinking about expanding our examples section with more real use
cases. Would it be possible to get a set of your data and product files
from one particular time step (with precipitation)?

This would indeed help to get quick insights of the capabilities of wradlib.

Thanks!

Cheers,
Kai
Reply all
Reply to author
Forward
0 new messages