RadKlim - Precipitation Climatology over Germany#

This notebook describes how to access and use the zarr-version of the RadKlim dataset. The dataset includes hourly accumulated rainfall and five-minute rain-rate data over Germany, which is derived from the German Weather Service (DWD) radar network. The RadKlim dataset has been extended annually since the first version released in 2017 (covering 2001-2017). The the v0.1.1 zarr version of the dataset includes up to Extension 6, covering 2001-2023.

The dataset was created by processing the netCDF files for the hourly and five-minute precipitation data into two separate zarr datasets which are described below. The processing was done with code hosted on mlcast-community/mlcast-dataset-radklim.

import matplotlib.pyplot as plt
import cartopy.crs as ccrs

import mlcast_datasets

mlcast_datasets.__version__
'0.3.0.post1+g40465eeaa'
# open the mlcast datasets intake catalog
cat = mlcast_datasets.open_catalog()
list(cat.precipitation)
['radklim_hourly',
 'radklim_5_minutes',
 'dmi_10_minutes',
 'it_dpc_sri_5min',
 'uk_metoffice_5min',
 'be_rmi_radclim_mfb_5min']

5-minute rainfall amount#

One part of RadKlim is the hourly rainfall amount which is available in the intake catalog as radklim_hourly.

ds = cat.precipitation.radklim_5_minutes.to_dask()
ds
<xarray.Dataset> Size: 10TB
Dimensions:          (time: 2419200, y: 1100, x: 900)
Coordinates:
  * time             (time) datetime64[ns] 19MB 2001-01-01 ... 2023-12-31T23:...
  * y                (y) float64 9kB -4.758e+03 -4.757e+03 ... -3.659e+03
  * x                (x) float64 7kB -443.0 -442.0 -441.0 ... 454.0 455.0 456.0
    lat              (y, x) float64 8MB dask.array<chunksize=(1100, 900), meta=np.ndarray>
    lon              (y, x) float64 8MB dask.array<chunksize=(1100, 900), meta=np.ndarray>
Data variables:
    rainfall_amount  (time, y, x) float32 10TB dask.array<chunksize=(1, 1100, 900), meta=np.ndarray>
    crs              float64 8B ...
Attributes: (12/13)
    Author:                            Harald Rybka, Katharina Lengfeld
    Conventions:                       CF-1.6
    history:                           Created at 2021-07-09 09:10:06.385653
    institution:                       Deutscher Wetterdienst (DWD)
    reference:                         10.5676/DWD/RADKLIM_YW_V2017.002
    title:                             RADKLIM - radar-based precipitation cl...
    ...                                ...
    mlcast_created_on:                 2026-02-27T12:03:00
    mlcast_created_by:                 Leif Denby <lcd@dmi.dk>
    mlcast_created_with:               https://github.com/mlcast-community/ml...
    mlcast_dataset_version:            0.1.1
    mlcast_dataset_identifier:         DE-DWD-radar_precipitation-RADKLIM
    mlcast_dataset_identifier_format:  {country_code}-{entity}-{physical_vari...
var_name = "rainfall_amount"

crs_name = ds[var_name].grid_mapping
data_crs = ccrs.Projection(ds[crs_name].crs_wkt)

g = (
    ds[var_name]
    .sel(time="2010-01-02")
    .isel(time=slice(None, 2))
    .plot(
        transform=data_crs,
        cmap="viridis",
        add_colorbar=True,
        col="time",
        robust=True,
        subplot_kws=dict(projection=data_crs),
    )
)

for ax in g.axes.flat:
    ax.coastlines()
    ax.gridlines(draw_labels=["top", "left"])
/tmp/ipykernel_2683/839515734.py:20: FutureWarning: self.axes is deprecated since 2022.11 in order to align with matplotlibs plt.subplots, use self.axs instead.
  for ax in g.axes.flat:
_images/91ff93bc444b11d198b5d72e6878c16cf6cb3cb08e18f8e827985bec13d74ed0.png

Hourly rainfall amount#

ds = cat.precipitation.radklim_hourly.to_dask()
ds
<xarray.Dataset> Size: 798GB
Dimensions:          (time: 201600, y: 1100, x: 900)
Coordinates:
  * time             (time) datetime64[ns] 2MB 2001-01-01T00:50:00 ... 2023-1...
  * y                (y) float64 9kB -4.758e+03 -4.757e+03 ... -3.659e+03
  * x                (x) float64 7kB -443.0 -442.0 -441.0 ... 454.0 455.0 456.0
    lat              (y, x) float64 8MB dask.array<chunksize=(1100, 900), meta=np.ndarray>
    lon              (y, x) float64 8MB dask.array<chunksize=(1100, 900), meta=np.ndarray>
Data variables:
    rainfall_amount  (time, y, x) float32 798GB dask.array<chunksize=(1, 1100, 900), meta=np.ndarray>
    crs              float64 8B ...
Attributes: (12/13)
    Author:                            Harald Rybka, Katharina Lengfeld
    Conventions:                       CF-1.6
    history:                           Created at 2021-07-09 08:48:10.797384
    institution:                       Deutscher Wetterdienst (DWD)
    reference:                         10.5676/DWD/RADKLIM_RW_V2017.002
    title:                             RADKLIM - radar-based precipitation cl...
    ...                                ...
    mlcast_created_on:                 2026-02-27T12:03:00
    mlcast_created_by:                 Leif Denby <lcd@dmi.dk>
    mlcast_created_with:               https://github.com/mlcast-community/ml...
    mlcast_dataset_version:            0.1.1
    mlcast_dataset_identifier:         DE-DWD-radar_precipitation-RADKLIM
    mlcast_dataset_identifier_format:  {country_code}-{entity}-{physical_vari...
var_name = "rainfall_amount"

crs_name = ds[var_name].grid_mapping
data_crs = ccrs.Projection(ds[crs_name].crs_wkt)

g = (
    ds[var_name]
    .sel(time="2010-01-02")
    .isel(time=slice(None, 2))
    .plot(
        transform=data_crs,
        cmap="viridis",
        add_colorbar=True,
        col="time",
        robust=True,
        subplot_kws=dict(projection=data_crs),
    )
)

for ax in g.axes.flat:
    ax.coastlines()
    ax.gridlines(draw_labels=["top", "left"])
/tmp/ipykernel_2683/839515734.py:20: FutureWarning: self.axes is deprecated since 2022.11 in order to align with matplotlibs plt.subplots, use self.axs instead.
  for ax in g.axes.flat:
_images/2e8d37129af431e4bed442c16c756db7c4f18e6de51d1debeebdd43c6e75e759.png