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")