API#

DWD#

DMO#

class wetterdienst.provider.dwd.dmo.api.DwdDmoRequest(parameter, dmo_type, start_issue=DwdForecastDate.LATEST, end_issue=None, start_date=None, end_date=None, station_group=None, lead_time=None, settings=None)#

Implementation of sites for dmo sites

Parameters:
  • parameter (Optional[List[Union[str, DwdDmoParameter, Parameter]]]) – parameter(s) to be collected

  • dmo_type (Union[str, DwdDmoType]) – dmo type, either small or large

  • start_issue (Union[str, datetime, DwdForecastDate]) – start of issue of dmo which should be caught (DMO run at time XX:YY)

  • end_issue (Union[str, datetime, None]) – end of issue

  • start_date (Union[str, datetime, None]) – start date for filtering returned dataframe

  • end_date (Union[str, datetime, None]) – end date

static adjust_datetime(datetime_)#

Adjust datetime to DMO release frequency (9/12 hours). Datetime is floored to closest release time e.g. if hour is 14, it will be rounded to 12

Parameters:

datetime – datetime that is adjusted

Return type:

datetime

Returns:

adjusted datetime with floored hour

property issue_end#

Required for typing

property issue_start#

Required for typing

Mosmix#

class wetterdienst.provider.dwd.mosmix.api.DwdMosmixRequest(parameter, mosmix_type, start_issue=DwdForecastDate.LATEST, end_issue=None, start_date=None, end_date=None, station_group=None, settings=None)#

Implementation of sites for MOSMIX mosmix sites

Parameters:
  • parameter (Optional[List[Union[str, DwdMosmixParameter, Parameter]]]) – parameter(s) to be collected

  • mosmix_type (Union[str, DwdMosmixType]) – mosmix type, either small or large

  • start_issue (Union[str, datetime, DwdForecastDate, None]) – start of issue of mosmix which should be caught (Mosmix run at time XX:YY)

  • end_issue (Union[str, datetime, None]) – end of issue

  • start_date (Union[str, datetime, None]) – start date for filtering returned dataframe

  • end_date (Union[str, datetime, None]) – end date

static adjust_datetime(datetime_)#

Adjust datetime to MOSMIX release frequency, which is required for MOSMIX-L that is only released very 6 hours (3, 9, 15, 21). Datetime is floored to closest release time e.g. if hour is 14, it will be rounded to 9

Parameters:

datetime – datetime that is adjusted

Return type:

datetime

Returns:

adjusted datetime with floored hour

property issue_end#

Required for typing

property issue_start#

Required for typing

Observation#

class wetterdienst.provider.dwd.observation.api.DwdObservationRequest(parameter, resolution, period=None, start_date=None, end_date=None, settings=None)#

The DWDObservationStations class represents a request for a station list as provided by the DWD service.

Parameters:
  • parameter (Union[str, DwdObservationDataset, DwdObservationParameter, List[Union[str, DwdObservationDataset, DwdObservationParameter]]]) – parameter set str/enumeration

  • resolution (Union[str, Resolution, DwdObservationResolution]) – resolution str/enumeration

  • period (Union[str, Period, DwdObservationPeriod, List[Union[str, Period, DwdObservationPeriod]], None]) – period str/enumeration

  • start_date (Union[str, datetime, None]) – start date to limit the stations_result

  • end_date (Union[str, datetime, None]) – end date to limit the stations_result

classmethod describe_fields(dataset, resolution, period, language='en')#
Parameters:
  • dataset

  • resolution

  • period

  • language (str) –

Return type:

dict

Returns:

filter_by_station_id(station_id)#

Method to filter stations_result by station ids

Parameters:

station_id (Union[str, int, Tuple[str, ...], Tuple[int, ...], List[str], List[int]]) – list of stations_result that are requested

Returns:

df with filtered stations_result

Radar#

class wetterdienst.provider.dwd.radar.api.DwdRadarValues(parameter, site=None, fmt=None, subset=None, elevation=None, start_date=None, end_date=None, resolution=None, period=None, settings=None)#

API for DWD radar data requests.

Request radar data from different places on the DWD data repository.

Parameters:
  • parameter (Union[str, DwdRadarParameter]) – The radar moment to request

  • site (Optional[DwdRadarSite]) – Site/station if parameter is one of RADAR_PARAMETERS_SITES

  • fmt (Optional[DwdRadarDataFormat]) – Data format (BINARY, BUFR, HDF5)

  • subset (Optional[DwdRadarDataSubset]) – The subset (simple or polarimetric) for HDF5 data.

  • start_date (Union[str, datetime, DwdRadarDate, None]) – Start date

  • end_date (Union[str, datetime, timedelta, None]) – End date

  • resolution (Union[str, Resolution, DwdRadarResolution, None]) – Time resolution for RadarParameter.RADOLAN_CDC, either daily or hourly or 5 minutes.

  • period (Union[str, Period, DwdRadarPeriod, None]) – Period type for RadarParameter.RADOLAN_CDC

adjust_datetimes()#

Adjust start_date and end_date attributes to match minute marks for respective RadarParameter.

query()#

Send request(s) and return generator of RadarResult instances.

Return type:

Generator[RadarResult, None, None]

Returns:

Generator of RadarResult instances.

Road#

class wetterdienst.provider.dwd.road.api.DwdRoadRequest(parameter, start_date=None, end_date=None, settings=None)#
Parameters:
  • parameter (List[Union[str, Enum, Parameter]]) – requested parameter(s)

  • resolution – requested resolution

  • period – requested period(s)

  • start_date (Union[str, datetime, None]) – Start date for filtering stations_result for their available data

  • end_date (Union[str, datetime, None]) – End date for filtering stations_result for their available data

EA#

Hydrology#

class wetterdienst.provider.ea.hydrology.api.EaHydrologyRequest(parameter, resolution, start_date=None, end_date=None, settings=None)#
Parameters:
  • parameter (List[Union[str, EaHydrologyParameter, Parameter]]) – requested parameter(s)

  • resolution (Union[str, EaHydrologyResolution, Resolution]) – requested resolution

  • period – requested period(s)

  • start_date (Union[str, datetime, None]) – Start date for filtering stations_result for their available data

  • end_date (Union[str, datetime, None]) – End date for filtering stations_result for their available data

Eaufrance#

Hubeau#

class wetterdienst.provider.eaufrance.hubeau.api.HubeauRequest(parameter, start_date=None, end_date=None, settings=None)#
Parameters:
  • parameter (List[Union[str, Enum, Parameter]]) – requested parameter(s)

  • resolution – requested resolution

  • period – requested period(s)

  • start_date (Union[str, datetime, None]) – Start date for filtering stations_result for their available data

  • end_date (Union[str, datetime, None]) – End date for filtering stations_result for their available data

ECCC#

Observation#

class wetterdienst.provider.eccc.observation.api.EcccObservationRequest(parameter, resolution, start_date=None, end_date=None, settings=None)#

Download weather data from Environment and Climate Change Canada (ECCC). - https://www.canada.ca/en/environment-climate-change.html - https://www.canada.ca/en/services/environment/weather.html

Original code by Trevor James Smith. Thanks! - https://github.com/Zeitsperre/canada-climate-python

Parameters:
  • parameter (List[Union[str, EcccObservationParameter, Parameter]]) – parameter or list of parameters that are being queried

  • resolution (Union[str, EcccObservationResolution, Resolution]) – resolution of data

  • start_date (Union[str, datetime, None]) – start date for values filtering

  • end_date (Union[str, datetime, None]) – end date for values filtering

Geosphere#

Observation#

class wetterdienst.provider.geosphere.observation.api.GeosphereObservationRequest(parameter, resolution, start_date=None, end_date=None, settings=None)#
Parameters:
  • parameter (List[Union[str, GeosphereObservationParameter, Parameter]]) – requested parameter(s)

  • resolution (Union[str, GeosphereObservationResolution, Resolution]) – requested resolution

  • period – requested period(s)

  • start_date (Union[str, datetime, None]) – Start date for filtering stations_result for their available data

  • end_date (Union[str, datetime, None]) – End date for filtering stations_result for their available data

IMGW#

Hydrology#

class wetterdienst.provider.imgw.hydrology.api.ImgwHydrologyRequest(parameter, resolution, start_date=None, end_date=None, settings=None)#
Parameters:
  • parameter – requested parameter(s)

  • resolution – requested resolution

  • period – requested period(s)

  • start_date (Union[str, datetime, None]) – Start date for filtering stations_result for their available data

  • end_date (Union[str, datetime, None]) – End date for filtering stations_result for their available data

Meteorology#

class wetterdienst.provider.imgw.meteorology.api.ImgwMeteorologyRequest(parameter, resolution, start_date=None, end_date=None, settings=None)#
Parameters:
  • parameter – requested parameter(s)

  • resolution – requested resolution

  • period – requested period(s)

  • start_date (Union[str, datetime, None]) – Start date for filtering stations_result for their available data

  • end_date (Union[str, datetime, None]) – End date for filtering stations_result for their available data

NOAA#

GHCN#

class wetterdienst.provider.noaa.ghcn.api.NoaaGhcnRequest(parameter, start_date=None, end_date=None, settings=None)#
Parameters:
  • parameter (List[Union[str, NoaaGhcnParameter, Parameter]]) – list of parameter strings or parameter enums being queried

  • start_date (Union[str, datetime, None]) – start date for request or None if all data is requested

  • end_date (Union[str, datetime, None]) – end date for request or None if all data is requested

National Weather Service#

Observation#

class wetterdienst.provider.nws.observation.api.NwsObservationRequest(parameter, start_date=None, end_date=None, settings=None)#
Parameters:
  • parameter (List[Union[str, NwsObservationParameter, Parameter]]) – requested parameter(s)

  • resolution – requested resolution

  • period – requested period(s)

  • start_date (Union[str, datetime, None]) – Start date for filtering stations_result for their available data

  • end_date (Union[str, datetime, None]) – End date for filtering stations_result for their available data

WSV#

Observation#

class wetterdienst.provider.wsv.pegel.api.WsvPegelRequest(parameter, start_date=None, end_date=None, settings=None)#

Request class for WSV Pegelonline, a German river management facility and provider of river-based measurements for last 30 days

Parameters:
  • parameter (List[Union[str, WsvPegelParameter, Parameter]]) – requested parameter(s)

  • resolution – requested resolution

  • period – requested period(s)

  • start_date (Union[str, datetime, None]) – Start date for filtering stations_result for their available data

  • end_date (Union[str, datetime, None]) – End date for filtering stations_result for their available data