Reading Radlon RW files

17 views
Skip to first unread message

Murugesan Narayanasamy

unread,
Oct 8, 2022, 12:37:48 PM10/8/22
to wradlib-users

Hi Team,
   I am able to read and plot the graph with raa01-rw_10000-2208301350-dwd---bin.gz
file with xy co-ordinates.

 The below code works fine. But I want your help to plot the graph with longitude and latitude. Could you please send me some working code/links for the same product type.

Moreover I need to know if there is any function which can tell me what is the rainfall rate value [data] for a particular longitude and latitude.
 Or how should I have to find it only with data without ploting it?

if __name__ == '__main__':
   data, attrs = read_radolan("raa01-rw_10000-2208301350-dwd---bin.gz")
   data = np.ma.masked_equal(data, -9999)
   radolan_grid_xy = wrl.georef.get_radolan_grid(900, 900)
   plot_radolan(data, attrs, radolan_grid_xy, clabel="mm * h-1")
   pl.show()


def read_radolan(rad_file):
     rad_data_file = wrl.util.get_wradlib_data_file(rad_file)
     print_header(rad_data_file)
     return wrl.io.read_radolan_composite(rad_data_file)


def plot_radolan(data, attrs, grid, clabel=None):
   fig = pl.figure(figsize=(10, 8))
   ax = fig.add_subplot(111, aspect="equal")
   x = grid[:, :, 0]
   y = grid[:, :, 1]
   pm = ax.pcolormesh(x, y, data, cmap="viridis")
   cb = fig.colorbar(pm, shrink=0.75)
   cb.set_label(clabel)
   pl.xlabel("x [km]")
   pl.ylabel("y [km]")
   pl.title(
    "{0} Product\n{1}".format(attrs["producttype"], attrs["datetime"].isoformat())
    )
    pl.xlim((x[0, 0], x[-1, -1]))
    pl.ylim((y[0, 0], y[-1, -1]))
    pl.grid(color="r")

Kai Mühlbauer

unread,
Oct 8, 2022, 1:05:45 PM10/8/22
to wradli...@googlegroups.com
Hi,

would you mind asking this on

https://openradar.discourse.group/

We are slowly transitioning to this new openradar discourse.

Please also state your python and wradlib version.

Thanks!

Best,
Kai
--
Diese Nachricht wurde von meinem Android-Gerät mit K-9 Mail gesendet.

Murugesan Narayanasamy

unread,
Oct 8, 2022, 1:54:27 PM10/8/22
to wradlib-users
Hi Kai,
 Thanks. I have requested in the below link.
Reply all
Reply to author
Forward
0 new messages