[Beginner] Getting Rainfall Data out of DWD Radolan format

175 views
Skip to first unread message

Steven J

unread,
Feb 1, 2021, 11:01:38 AM2/1/21
to wradlib-users

Hi guys,

i am trying to get rainfall data in mm/h from the DWD Radolan WN data. I have chosen WN because i need the current value for a specific time and the prediction from 15min to 45min. I am using https://github.com/earthobservations/wetterdienst for receiving the data. So far receiving the data is working. WN delivers Reflectivity values (dBZ) therefore i have to convert these values, already found something for that issue.


What is not very clear to me, cause i am new to the topic of Weatherdata and Python, how to access the actual reflectiviy/rainfall data for a specific location from the radolan data. The whole grid location, raster coordinaten, their relation to numpy arrays and how to find the correct values in the arrays is kind of confusing for me

Maybe you guys can give me a hint how i can proceed on the matter.

Thx in advance!
and thanks to the guy/guys maintaining and developing the wetterdienst library, outstanding work!

radolan_wn_data.py

Kai Muehlbauer

unread,
Mar 22, 2021, 9:35:07 AM3/22/21
to wradli...@googlegroups.com
Hi Steven,

it looks like you're already using the xarray representation.
Than it is just as simple as selecting the wanted data.

binary_data.sel(x=slice(150, 250), y=slice(-4600, -4500))

would select a 100x100km area in south/east Bavaria.

As you might want to select with geographic coordinates you would need
to add the lon/lat coordinates to the xarray dataset:

binary_data = binary_data.assign_coords(dict(lon=(["y", "x"],
radolan_grid_ll[...,0]), lat=(["y", "x"], radolan_grid_ll[...,1])))

Now you can select your coordinates using "where" (sel doesn't work for
2D arrays):

binary_data.where((data.lon > 11) & (data.lon < 13) & (data.lat > 47) &
(data.lat < 49), drop=True).WN.plot(x="lon", y="lat")

HTH,
Kai


Am 01.02.21 um 17:01 schrieb Steven J:
> --
> You received this message because you are subscribed to the Google
> Groups "wradlib-users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to wradlib-user...@googlegroups.com
> <mailto:wradlib-user...@googlegroups.com>.
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/wradlib-users/eda35919-f347-4d39-9d89-d2d451addae9n%40googlegroups.com
> <https://groups.google.com/d/msgid/wradlib-users/eda35919-f347-4d39-9d89-d2d451addae9n%40googlegroups.com?utm_medium=email&utm_source=footer>.
Reply all
Reply to author
Forward
0 new messages