Python Examples#
DWD#
Observation#
Get available parameters for daily historical data of DWD:
1from wetterdienst.provider.dwd.observation import DwdObservationRequest
2
3metadata = DwdObservationRequest.discover(
4 resolutions="daily",
5)
6
7metadata
{'daily': {'description': None,
'datasets': {'climate_summary': {'description': 'Daily station observations (temperature, pressure, precipitation, sunshine duration, etc.) for Germany.',
'parameters': [{'name': 'wind_gust_max',
'name_original': 'fx',
'unit_type': 'speed',
'unit': 'meter_per_second',
'description': 'Daily maximum of windgust.'},
{'name': 'wind_speed',
'name_original': 'fm',
'unit_type': 'speed',
'unit': 'meter_per_second',
'description': 'Daily mean of wind velocity.'},
{'name': 'precipitation_amount',
'name_original': 'rsk',
'unit_type': 'precipitation',
'unit': 'millimeter',
'description': 'Daily precipitation height.'},
{'name': 'precipitation_form',
'name_original': 'rskf',
'unit_type': 'dimensionless',
'unit': 'dimensionless',
'description': 'Precipitation form.'},
{'name': 'sunshine_duration',
'name_original': 'sdk',
'unit_type': 'time',
'unit': 'hour',
'description': 'Daily sunshine duration.'},
{'name': 'snow_depth',
'name_original': 'shk_tag',
'unit_type': 'length_short',
'unit': 'centimeter',
'description': 'Daily snow depth.'},
{'name': 'cloud_cover_total',
'name_original': 'nm',
'unit_type': 'fraction',
'unit': 'one_eighth',
'description': 'Daily mean of cloud cover: the arithmetic mean of at least 21 hourly values, in earlier periods the mean of the observation terms (3 terms at most stations, 4 or 8 at some).'},
{'name': 'pressure_vapor',
'name_original': 'vpm',
'unit_type': 'pressure',
'unit': 'hectopascal',
'description': 'Daily mean of vapor pressure: the arithmetic mean of at least 21 hourly values, in earlier periods the mean of the observation terms (3 terms at most stations, 4 or 8 at some).'},
{'name': 'pressure_air_site',
'name_original': 'pm',
'unit_type': 'pressure',
'unit': 'hectopascal',
'description': 'Daily mean of pressure: the arithmetic mean of at least 21 hourly values, in earlier periods the mean of the observation terms (3 terms at most stations, 4 or 8 at some).'},
{'name': 'temperature_air_mean_2m',
'name_original': 'tmk',
'unit_type': 'temperature',
'unit': 'degree_celsius',
'description': 'Daily mean of temperature: the arithmetic mean of at least 21 hourly values, in earlier periods the mean of the observation terms (3 terms at most stations, TT1 to TT3: TMK=(TT1+TT2+(TT3*2))/4; 4 or 8 at some).'},
{'name': 'humidity_relative',
'name_original': 'upm',
'unit_type': 'fraction',
'unit': 'percent',
'description': 'Daily mean of relative humidity: the arithmetic mean of at least 21 hourly values, in earlier periods the mean of the observation terms (3 terms at most stations, 4 or 8 at some).'},
{'name': 'temperature_air_max_2m',
'name_original': 'txk',
'unit_type': 'temperature',
'unit': 'degree_celsius',
'description': 'Daily maximum of temperature at 2 m height.'},
{'name': 'temperature_air_min_2m',
'name_original': 'tnk',
'unit_type': 'temperature',
'unit': 'degree_celsius',
'description': 'Daily minimum of temperature at 2m height.'},
{'name': 'temperature_air_min_0_05m',
'name_original': 'tgk',
'unit_type': 'temperature',
'unit': 'degree_celsius',
'description': 'Daily minimum of air temperature at 5 cm above ground.'}]},
'precipitation_more': {'description': 'Daily precipitation observations for Germany.',
'parameters': [{'name': 'precipitation_amount',
'name_original': 'rs',
'unit_type': 'precipitation',
'unit': 'millimeter',
'description': 'Daily precipitation height.'},
{'name': 'precipitation_form',
'name_original': 'rsf',
'unit_type': 'dimensionless',
'unit': 'dimensionless',
'description': 'Precipitation form.'},
{'name': 'snow_depth',
'name_original': 'sh_tag',
'unit_type': 'length_short',
'unit': 'centimeter',
'description': 'Height of snow pack.'},
{'name': 'snow_depth_new',
'name_original': 'nsh_tag',
'unit_type': 'length_short',
'unit': 'centimeter',
'description': 'Fresh snow depth.'}]},
'solar': {'description': 'Daily station observations of solar incoming (total/diffuse) and longwave downward radiation for Germany.',
'parameters': [{'name': 'radiation_sky_long_wave',
'name_original': 'atmo_strahl',
'unit_type': 'energy_per_area',
'unit': 'joule_per_square_centimeter',
'description': 'Daily sum of longwave downward radiation.'},
{'name': 'radiation_sky_short_wave_diffuse',
'name_original': 'fd_strahl',
'unit_type': 'energy_per_area',
'unit': 'joule_per_square_centimeter',
'description': 'Daily sum of diffuse solar radiation.'},
{'name': 'radiation_global',
'name_original': 'fg_strahl',
'unit_type': 'energy_per_area',
'unit': 'joule_per_square_centimeter',
'description': 'Daily sum of solar incoming radiation.'},
{'name': 'sunshine_duration',
'name_original': 'sd_strahl',
'unit_type': 'time',
'unit': 'hour',
'description': 'Daily sum of sunshine duration.'}]},
'temperature_soil': {'description': 'Daily station observations of soil temperature station data for Germany.',
'parameters': [{'name': 'temperature_soil_mean_0_02m',
'name_original': 'v_te002m',
'unit_type': 'temperature',
'unit': 'degree_celsius',
'description': 'Daily soil temperature in 2 cm depth.'},
{'name': 'temperature_soil_mean_0_05m',
'name_original': 'v_te005m',
'unit_type': 'temperature',
'unit': 'degree_celsius',
'description': 'Daily soil temperature in 5 cm depth.'},
{'name': 'temperature_soil_mean_0_1m',
'name_original': 'v_te010m',
'unit_type': 'temperature',
'unit': 'degree_celsius',
'description': 'Daily soil temperature in 10 cm depth.'},
{'name': 'temperature_soil_mean_0_2m',
'name_original': 'v_te020m',
'unit_type': 'temperature',
'unit': 'degree_celsius',
'description': 'Daily soil temperature in 20 cm depth.'},
{'name': 'temperature_soil_mean_0_5m',
'name_original': 'v_te050m',
'unit_type': 'temperature',
'unit': 'degree_celsius',
'description': 'Daily soil temperature in 50 cm depth.'},
{'name': 'temperature_soil_mean_1m',
'name_original': 'v_te100m',
'unit_type': 'temperature',
'unit': 'degree_celsius',
'description': 'Daily soil temperature in 100 cm depth.'}]},
'water_equivalent': {'description': 'Daily observations of snow height and water equivalent for Germany.',
'parameters': [{'name': 'snow_depth_sampled',
'name_original': 'ash_6',
'unit_type': 'length_short',
'unit': 'centimeter',
'description': 'Height of the sampled snow pack.'},
{'name': 'snow_depth',
'name_original': 'sh_tag',
'unit_type': 'length_short',
'unit': 'centimeter',
'description': 'Height of the snow pack.'},
{'name': 'water_equivalent_snow_depth',
'name_original': 'wash_6',
'unit_type': 'precipitation',
'unit': 'millimeter',
'description': 'Water equivalent of the total snow pack.'},
{'name': 'water_equivalent_snow_depth_sampled',
'name_original': 'waas_6',
'unit_type': 'precipitation',
'unit': 'millimeter',
'description': 'Water equivalent of the sampled snow pack.'}]},
'weather_phenomena': {'description': 'Daily weather events fog, thunder, storm (strong wind), storm (stormier wind), dew, glaze, hoar frost, graupel and hail at stations of Germany (details missing, parameter descriptions [here](https://opendata.dwd.de/climate_environment/CDC/help/Abkuerzung_neu_Spaltenname_CDC_20171128.xlsx)).',
'parameters': [{'name': 'count_weather_type_fog',
'name_original': 'nebel',
'unit_type': 'dimensionless',
'unit': 'dimensionless',
'description': 'Weather event: fog during the day (DWD: "Wetterereignis: Nebel im Verlauf des Tages").'},
{'name': 'count_weather_type_thunder',
'name_original': 'gewitter',
'unit_type': 'dimensionless',
'unit': 'dimensionless',
'description': 'Weather event: thunderstorm during the day (DWD: "Wetterereignis: Gewitter im Verlauf des Tages").'},
{'name': 'count_weather_type_storm_strong_wind',
'name_original': 'sturm_6',
'unit_type': 'dimensionless',
'unit': 'dimensionless',
'description': 'Weather event: storm of at least 6 Bft during the day (DWD: "Wetterereignis: Sturm>=6 Bft im Verlauf des Tages").'},
{'name': 'count_weather_type_storm_stormier_wind',
'name_original': 'sturm_8',
'unit_type': 'dimensionless',
'unit': 'dimensionless',
'description': 'Weather event: storm of at least 8 Bft during the day (DWD: "Wetterereignis: Sturm>=8 Bft im Verlauf des Tages").'},
{'name': 'count_weather_type_dew',
'name_original': 'tau',
'unit_type': 'dimensionless',
'unit': 'dimensionless',
'description': 'Weather event: dew during the day (DWD: "Wetterereignis: Tau im Verlauf des Tages").'},
{'name': 'count_weather_type_glaze',
'name_original': 'glatteis',
'unit_type': 'dimensionless',
'unit': 'dimensionless',
'description': 'Weather event: glaze ice during the day (DWD: "Wetterereignis: Glatteis im Verlauf des Tages").'},
{'name': 'count_weather_type_hoar_frost',
'name_original': 'reif',
'unit_type': 'dimensionless',
'unit': 'dimensionless',
'description': 'Weather event: hoar frost during the day (DWD: "Wetterereignis: Reif im Verlauf des Tages").'},
{'name': 'count_weather_type_graupel',
'name_original': 'graupel',
'unit_type': 'dimensionless',
'unit': 'dimensionless',
'description': 'Weather event: graupel during the day (DWD: "Wetterereignis: Graupel im Verlauf des Tages").'},
{'name': 'count_weather_type_hail',
'name_original': 'hagel',
'unit_type': 'dimensionless',
'unit': 'dimensionless',
'description': 'Weather event: hail during the day (DWD: "Wetterereignis: Hagel im Verlauf des Tages").'}]},
'weather_phenomena_more': {'description': 'Daily (additional) weather events graupel, hail, fog and thunder at stations of Germany (details missing, parameter descriptions [here](https://opendata.dwd.de/climate_environment/CDC/help/Abkuerzung_neu_Spaltenname_CDC_20171128.xlsx)).',
'parameters': [{'name': 'count_weather_type_graupel',
'name_original': 'rr_graupel',
'unit_type': 'dimensionless',
'unit': 'dimensionless',
'description': 'Weather event of the precipitation network: graupel during the day (DWD: "Wetterereignis_RR: Graupel im Verlauf des Tages").'},
{'name': 'count_weather_type_hail',
'name_original': 'rr_hagel',
'unit_type': 'dimensionless',
'unit': 'dimensionless',
'description': 'Weather event of the precipitation network: hail during the day (DWD: "Wetterereignis_RR: Hagel im Verlauf des Tages").'},
{'name': 'count_weather_type_fog',
'name_original': 'rr_nebel',
'unit_type': 'dimensionless',
'unit': 'dimensionless',
'description': 'Weather event of the precipitation network: fog during the day (DWD: "Wetterereignis_RR: Nebel im Verlauf des Tages").'},
{'name': 'count_weather_type_thunder',
'name_original': 'rr_gewitter',
'unit_type': 'dimensionless',
'unit': 'dimensionless',
'description': 'Weather event of the precipitation network: thunderstorm during the day (DWD: "Wetterereignis_RR: Gewitter im Verlauf des Tages").'}]}}}}
Get stations for daily historical precipitation:
1from wetterdienst.provider.dwd.observation import DwdObservationRequest
2
3request = DwdObservationRequest(
4 parameters=("daily", "precipitation_more"),
5 periods="historical",
6)
7
8stations = request.all()
9df = stations.df
10df
| resolution | dataset | station_id | start_timestamp | end_timestamp | latitude | longitude | elevation | name | region |
|---|---|---|---|---|---|---|---|---|---|
| str | str | str | datetime[μs, UTC] | datetime[μs, UTC] | f64 | f64 | f64 | str | str |
| "daily" | "precipitation_more" | "00001" | 1912-01-01 00:00:00 UTC | 1986-06-30 00:00:00 UTC | 47.8413 | 8.8493 | 478.0 | "Aach" | "Baden-Württemberg" |
| "daily" | "precipitation_more" | "00002" | 1951-01-01 00:00:00 UTC | 2006-12-31 00:00:00 UTC | 50.8066 | 6.0996 | 138.0 | "Aachen (Kläranlage)" | "Nordrhein-Westfalen" |
| "daily" | "precipitation_more" | "00003" | 1891-01-01 00:00:00 UTC | 2011-03-31 00:00:00 UTC | 50.7827 | 6.0941 | 202.0 | "Aachen" | "Nordrhein-Westfalen" |
| "daily" | "precipitation_more" | "00004" | 1951-01-01 00:00:00 UTC | 1979-10-31 00:00:00 UTC | 50.7683 | 6.1207 | 243.0 | "Aachen-Brand" | "Nordrhein-Westfalen" |
| "daily" | "precipitation_more" | "00006" | 1982-11-01 00:00:00 UTC | 2026-10-10 00:00:00 UTC | 48.8361 | 10.0598 | 455.0 | "Aalen-Unterrombach" | "Baden-Württemberg" |
| … | … | … | … | … | … | … | … | … | … |
| "daily" | "precipitation_more" | "20107" | 2025-03-27 00:00:00 UTC | 2026-10-10 00:00:00 UTC | 49.9687 | 6.8272 | 311.0 | "Wittlich-Bergweiler" | "Rheinland-Pfalz" |
| "daily" | "precipitation_more" | "20108" | 2025-05-01 00:00:00 UTC | 2026-10-10 00:00:00 UTC | 51.1543 | 6.5049 | 56.0 | "Mönchengladbach-Schelsen" | "Nordrhein-Westfalen" |
| "daily" | "precipitation_more" | "20110" | 1969-01-01 00:00:00 UTC | 2005-07-31 00:00:00 UTC | 52.3183 | 11.5677 | 64.0 | "Colbitz" | "Sachsen-Anhalt" |
| "daily" | "precipitation_more" | "20189" | 2025-10-01 00:00:00 UTC | 2026-04-30 00:00:00 UTC | 47.6759 | 12.47 | 687.0 | "Reit im Winkl (Kaiserweg)" | "Bayern" |
| "daily" | "precipitation_more" | "20191" | 2025-09-01 00:00:00 UTC | 2026-10-10 00:00:00 UTC | 50.9238 | 14.357 | 375.0 | "Sebnitz-Hinterhermsdorf" | "Sachsen" |
Get data for a dataset:
1from wetterdienst.provider.dwd.observation import DwdObservationRequest
2
3request = DwdObservationRequest(
4 parameters=("daily", "precipitation_more"),
5 periods="historical",
6)
7
8first_values = next(request.all().values.query())
9df = first_values.df
10df
| station_id | resolution | dataset | parameter | timestamp | value | quality |
|---|---|---|---|---|---|---|
| str | str | str | str | datetime[μs, UTC] | f64 | f64 |
| "00001" | "daily" | "precipitation_more" | "precipitation_amount" | 1912-01-01 00:00:00 UTC | 0.0 | 1.0 |
| "00001" | "daily" | "precipitation_more" | "precipitation_amount" | 1912-01-02 00:00:00 UTC | 0.2 | 1.0 |
| "00001" | "daily" | "precipitation_more" | "precipitation_amount" | 1912-01-03 00:00:00 UTC | 0.0 | 1.0 |
| "00001" | "daily" | "precipitation_more" | "precipitation_amount" | 1912-01-04 00:00:00 UTC | 1.0 | 1.0 |
| "00001" | "daily" | "precipitation_more" | "precipitation_amount" | 1912-01-05 00:00:00 UTC | 2.1 | 1.0 |
| … | … | … | … | … | … | … |
| "00001" | "daily" | "precipitation_more" | "snow_depth_new" | 1986-06-26 00:00:00 UTC | 0.0 | 10.0 |
| "00001" | "daily" | "precipitation_more" | "snow_depth_new" | 1986-06-27 00:00:00 UTC | 0.0 | 10.0 |
| "00001" | "daily" | "precipitation_more" | "snow_depth_new" | 1986-06-28 00:00:00 UTC | 0.0 | 10.0 |
| "00001" | "daily" | "precipitation_more" | "snow_depth_new" | 1986-06-29 00:00:00 UTC | 0.0 | 10.0 |
| "00001" | "daily" | "precipitation_more" | "snow_depth_new" | 1986-06-30 00:00:00 UTC | 0.0 | 10.0 |
Get data for a parameter:
1from wetterdienst.provider.dwd.observation import DwdObservationRequest
2
3request = DwdObservationRequest(
4 parameters=("daily", "climate_summary", "precipitation_amount"),
5 periods="historical",
6)
7
8first_values = next(request.all().values.query())
9df = first_values.df
10df
| station_id | resolution | dataset | parameter | timestamp | value | quality |
|---|---|---|---|---|---|---|
| str | str | str | str | datetime[μs, UTC] | f64 | f64 |
| "00001" | "daily" | "climate_summary" | "precipitation_amount" | 1937-01-01 00:00:00 UTC | 0.0 | 5.0 |
| "00001" | "daily" | "climate_summary" | "precipitation_amount" | 1937-01-02 00:00:00 UTC | 0.0 | 5.0 |
| "00001" | "daily" | "climate_summary" | "precipitation_amount" | 1937-01-03 00:00:00 UTC | 0.0 | 5.0 |
| "00001" | "daily" | "climate_summary" | "precipitation_amount" | 1937-01-04 00:00:00 UTC | 0.0 | 5.0 |
| "00001" | "daily" | "climate_summary" | "precipitation_amount" | 1937-01-05 00:00:00 UTC | 0.0 | 5.0 |
| … | … | … | … | … | … | … |
| "00001" | "daily" | "climate_summary" | "precipitation_amount" | 1986-06-26 00:00:00 UTC | 0.0 | 10.0 |
| "00001" | "daily" | "climate_summary" | "precipitation_amount" | 1986-06-27 00:00:00 UTC | 0.0 | 10.0 |
| "00001" | "daily" | "climate_summary" | "precipitation_amount" | 1986-06-28 00:00:00 UTC | 0.0 | 10.0 |
| "00001" | "daily" | "climate_summary" | "precipitation_amount" | 1986-06-29 00:00:00 UTC | 0.0 | 10.0 |
| "00001" | "daily" | "climate_summary" | "precipitation_amount" | 1986-06-30 00:00:00 UTC | 0.0 | 10.0 |
Get data for a parameter from another dataset:
1from wetterdienst.provider.dwd.observation import DwdObservationRequest
2
3request = DwdObservationRequest(
4 parameters=[("daily", "precipitation_more", "precipitation_amount")],
5 periods="historical",
6)
7
8first_values = next(request.all().values.query())
9df = first_values.df
10df
| station_id | resolution | dataset | parameter | timestamp | value | quality |
|---|---|---|---|---|---|---|
| str | str | str | str | datetime[μs, UTC] | f64 | f64 |
| "00001" | "daily" | "precipitation_more" | "precipitation_amount" | 1912-01-01 00:00:00 UTC | 0.0 | 1.0 |
| "00001" | "daily" | "precipitation_more" | "precipitation_amount" | 1912-01-02 00:00:00 UTC | 0.2 | 1.0 |
| "00001" | "daily" | "precipitation_more" | "precipitation_amount" | 1912-01-03 00:00:00 UTC | 0.0 | 1.0 |
| "00001" | "daily" | "precipitation_more" | "precipitation_amount" | 1912-01-04 00:00:00 UTC | 1.0 | 1.0 |
| "00001" | "daily" | "precipitation_more" | "precipitation_amount" | 1912-01-05 00:00:00 UTC | 2.1 | 1.0 |
| … | … | … | … | … | … | … |
| "00001" | "daily" | "precipitation_more" | "precipitation_amount" | 1986-06-26 00:00:00 UTC | 0.0 | 10.0 |
| "00001" | "daily" | "precipitation_more" | "precipitation_amount" | 1986-06-27 00:00:00 UTC | 0.0 | 10.0 |
| "00001" | "daily" | "precipitation_more" | "precipitation_amount" | 1986-06-28 00:00:00 UTC | 0.0 | 10.0 |
| "00001" | "daily" | "precipitation_more" | "precipitation_amount" | 1986-06-29 00:00:00 UTC | 0.0 | 10.0 |
| "00001" | "daily" | "precipitation_more" | "precipitation_amount" | 1986-06-30 00:00:00 UTC | 0.0 | 10.0 |
Mosmix#
Get stations for MOSMIX-SMALL:
1from wetterdienst.provider.dwd.mosmix import DwdMosmixRequest
2
3request = DwdMosmixRequest(
4 parameters=("hourly", "small"),
5)
6
7stations = request.all()
8df = stations.df
9df
| resolution | dataset | station_id | icao_id | start_timestamp | end_timestamp | latitude | longitude | elevation | name | region |
|---|---|---|---|---|---|---|---|---|---|---|
| str | str | str | str | datetime[μs, UTC] | datetime[μs, UTC] | f64 | f64 | f64 | str | str |
| "hourly" | "small" | "01001" | "ENJA" | null | null | 70.93 | -8.67 | 10.0 | "JAN MAYEN" | null |
| "hourly" | "small" | "01008" | "ENSB" | null | null | 78.25 | 15.47 | 29.0 | "SVALBARD" | null |
| "hourly" | "small" | "01025" | null | null | null | 69.68 | 18.92 | 10.0 | "TROMSOE" | null |
| "hourly" | "small" | "01028" | "ENBJ" | null | null | 74.52 | 19.02 | 16.0 | "BJORNOYA" | null |
| "hourly" | "small" | "01049" | "ENAT" | null | null | 69.98 | 23.37 | 3.0 | "ALTA LUFTHAVN" | null |
| … | … | … | … | … | … | … | … | … | … | … |
| "hourly" | "small" | "Z944" | null | null | null | 47.65 | 12.82 | 1615.0 | "WARTSTEINHUETTE" | null |
| "hourly" | "small" | "Z946" | null | null | null | 47.57 | 12.97 | 1420.0 | "KUEHROINT" | null |
| "hourly" | "small" | "Z947" | null | null | null | 47.48 | 12.97 | 2520.0 | "FUNTENSEETAUERN" | null |
| "hourly" | "small" | "Z948" | null | null | null | 47.62 | 13.0 | 660.0 | "HOELLGRABEN" | null |
| "hourly" | "small" | "Z949" | null | null | null | 47.58 | 13.02 | 1200.0 | "JENNER" | null |
Get data for MOSMIX-LARGE:
1from wetterdienst.provider.dwd.mosmix import DwdMosmixRequest
2
3request = DwdMosmixRequest(
4 parameters=("hourly", "large"),
5)
6
7stations = request.all()
8df = stations.df
9df
| resolution | dataset | station_id | icao_id | start_timestamp | end_timestamp | latitude | longitude | elevation | name | region |
|---|---|---|---|---|---|---|---|---|---|---|
| str | str | str | str | datetime[μs, UTC] | datetime[μs, UTC] | f64 | f64 | f64 | str | str |
| "hourly" | "large" | "01001" | "ENJA" | null | null | 70.93 | -8.67 | 10.0 | "JAN MAYEN" | null |
| "hourly" | "large" | "01008" | "ENSB" | null | null | 78.25 | 15.47 | 29.0 | "SVALBARD" | null |
| "hourly" | "large" | "01025" | null | null | null | 69.68 | 18.92 | 10.0 | "TROMSOE" | null |
| "hourly" | "large" | "01028" | "ENBJ" | null | null | 74.52 | 19.02 | 16.0 | "BJORNOYA" | null |
| "hourly" | "large" | "01049" | "ENAT" | null | null | 69.98 | 23.37 | 3.0 | "ALTA LUFTHAVN" | null |
| … | … | … | … | … | … | … | … | … | … | … |
| "hourly" | "large" | "Z944" | null | null | null | 47.65 | 12.82 | 1615.0 | "WARTSTEINHUETTE" | null |
| "hourly" | "large" | "Z946" | null | null | null | 47.57 | 12.97 | 1420.0 | "KUEHROINT" | null |
| "hourly" | "large" | "Z947" | null | null | null | 47.48 | 12.97 | 2520.0 | "FUNTENSEETAUERN" | null |
| "hourly" | "large" | "Z948" | null | null | null | 47.62 | 13.0 | 660.0 | "HOELLGRABEN" | null |
| "hourly" | "large" | "Z949" | null | null | null | 47.58 | 13.02 | 1200.0 | "JENNER" | null |
Radar#
Sites#
Retrieve information about all OPERA radar sites.
1from wetterdienst.provider.eumetnet.opera.sites import OperaRadarSites
2
3# Acquire information for all OPERA sites.
4sites = OperaRadarSites().all()
5print(f"Number of OPERA radar sites: {len(sites)}")
6
7# Acquire information for a specific OPERA site.
8site_ukdea = OperaRadarSites().by_odim_code("ukdea")
9site_ukdea
Number of OPERA radar sites: 205
{'number': 1312,
'country': 'United Kingdom',
'countryid': 'EGRR61',
'oldcountryid': 'UK61',
'wmocode': 3859,
'wigosid': None,
'odimcode': 'ukdea',
'location': 'Dean Hill',
'status': True,
'latitude': 51.0307,
'longitude': -1.6534,
'heightofstation': 155.0,
'band': 'C',
'doppler': True,
'polarization': 'D',
'maxrange': 255,
'startyear': 2005,
'heightantenna': 180.0,
'diametrantenna': 3.66,
'beam': 1.0,
'gain': 43.0,
'frequency': 5.627,
'stratus': None,
'cirusnimbus': None,
'wrwp': None}
Retrieve information about the DWD radar sites.
1from wetterdienst.provider.dwd.radar.api import DwdRadarSites
2
3# Acquire information for a specific site.
4site_asb = DwdRadarSites().by_odim_code("ASB")
5site_asb
{'number': 1389,
'country': 'Germany',
'countryid': 'EDZW40',
'oldcountryid': 'DL40',
'wmocode': 10103,
'wigosid': None,
'odimcode': 'deasb',
'location': 'Isle of Borkum',
'status': True,
'latitude': 53.564,
'longitude': 6.7482,
'heightofstation': 4.0,
'band': 'C',
'doppler': True,
'polarization': 'S',
'maxrange': 180,
'startyear': 2018,
'heightantenna': 36.2,
'diametrantenna': 2.4,
'beam': 1.57,
'gain': 41.55,
'frequency': 5.64,
'stratus': None,
'cirusnimbus': None,
'wrwp': None}
Data#
To use DWDRadarRequest, you have to provide a RadarParameter,
which designates the type of radar data you want to obtain. There is
radar data available at different locations within the DWD data repository:
For RADOLAN_CDC-data, the time resolution parameter (either hourly or daily)
must be specified.
The start and end parameters can optionally be specified to obtain data from specific
points in time: each a datetime or an ISO 8601 string, start also one of DwdRadarDate
(LATEST, CURRENT, MOST_RECENT) and end also a timedelta after start.
For RADOLAN_CDC-data, datetimes are rounded to HH:50min, as the
data is packaged for this minute step.
This is an example on how to acquire RADOLAN_CDC data using
wetterdienst and process it using wradlib.
For more examples, please have a look at examples/provider/dwd/radar.
1from wetterdienst.provider.dwd.radar import DwdRadarValues, DwdRadarParameter, DwdRadarResolution
2import wradlib as wrl
3
4radar = DwdRadarValues(
5 parameter=DwdRadarParameter.RADOLAN_CDC,
6 resolution=DwdRadarResolution.DAILY,
7 start="2020-09-04T12:00:00",
8 end="2020-09-04T12:00:00"
9)
10
11for item in radar.query():
12 # Decode data using wradlib.
13 data, attributes = wrl.io.read_radolan_composite(item.data)
14
15 # Do something with the data (numpy.ndarray) here.
16 break
17
18attributes
{'producttype': 'SF',
'datetime': datetime.datetime(2020, 9, 4, 11, 50),
'radarid': '10000',
'nrow': 900,
'ncol': 900,
'datasize': 1620000,
'formatversion': 3,
'maxrange': '150 km',
'radolanversion': '2.21.0',
'precision': 0.1,
'intervalseconds': 86400,
'radarlocations': ['asb',
'boo',
'ros',
'hnr',
'umd',
'pro',
'ess',
'fld',
'drs',
'neu',
'oft',
'eis',
'tur',
'isn',
'fbg',
'mem'],
'radardays': ['asb 24',
'boo 14',
'drs 24',
'eis 24',
'ess 24',
'fbg 24',
'fld 24',
'hnr 24',
'isn 24',
'mem 24',
'neu 24',
'oft 24',
'pro 24',
'ros 24',
'tur 24',
'umd 24'],
'nodataflag': -9999,
'secondary': array([ 188, 189, 190, ..., 809627, 809628, 809629],
shape=(51322,)),
'nodatamask': array([ 0, 1, 2, ..., 809997, 809998, 809999],
shape=(165976,)),
'cluttermask': array([], dtype=int64)}