open_data_ch#

Monthly degree-day series from Swiss open data: the population-weighted Swiss heating and cooling degree days of the BFE (since 1980) and the heating degree days / accumulated temperature differences of the Stadt Zürich (since 1864). Both serve as reference series for degree_days.

See open_data_ch for usage examples.

API Reference#

Swiss open-data degree-day series (BFE and Stadt Zürich).

Monthly heating degree days published as Open Government Data, useful as reference series for pyedautils.degree_days:

  • BFE (Bundesamt für Energie, OGD105): population-weighted Swiss heating degree days HGT 20/12 and cooling degree days CDD 18.3 per month since 1980, computed by MeteoSwiss per postal-code area.

  • Stadt Zürich (UMW103OD1031): heating degree days HGT 20/12 and accumulated temperature differences ATD (base 12 °C) per month since 1864 for the sites Fluntern, Stampfenbachstrasse, Schimmelstrasse, Rosengartenstrasse and Heubeeribühl.

pyedautils.weather.open_data_ch.BFE_DEGREE_DAYS_URL = 'https://www.bfe-ogd.ch/ogd105_heizgradtage_k%C3%BChlgradtage.csv'#

BFE OGD105 “Monatliche Heizgradtage und Kühlgradtage in der Schweiz (gewichtet)”.

pyedautils.weather.open_data_ch.ZURICH_DEGREE_DAYS_URL = 'https://data.stadt-zuerich.ch/dataset/umw_heizgradtage_standort_jahr_monat_od1031/download/UMW103OD1031.csv'#

Stadt Zürich “Heizgradtage und akkumulierte Temperaturdifferenzen”.

pyedautils.weather.open_data_ch.ZURICH_STATIONS = ('Fluntern', 'Stampfenbachstrasse', 'Schimmelstrasse', 'Rosengartenstrasse', 'Heubeeribühl')#

Measurement sites of the Stadt Zürich degree-day series.

pyedautils.weather.open_data_ch.download_degree_days_bfe(timeout: int = 60) → DataFrame[source]#

Downloads the monthly population-weighted Swiss degree days of the BFE.

HGT: heating degree days 20/12 (sum of 20 − T_mean on days with T_mean <= 12 °C). CDD: cooling degree days with base 18.3 °C. Source: Bundesamt für Energie / MeteoSchweiz (OGD105).

Parameters:

timeout (int) – Request timeout in seconds. Default 60.

Returns:

Indexed by month start (period) with columns hgt and cdd [Kd]. Pass df["hgt"] to pyedautils.degree_days.climatology_from_monthly().

Return type:

pd.DataFrame

pyedautils.weather.open_data_ch.download_degree_days_zurich(station: str | None = None, timeout: int = 60) → DataFrame[source]#

Downloads the monthly degree days of the Stadt Zürich open data.

HGT: heating degree days 20/12. ATD: accumulated temperature difference with base 12 °C (SIA 380). Source: Stadt Zürich, Umwelt- und Gesundheitsschutz / MeteoSchweiz (UMW103OD1031).

Parameters:
  • station (str, optional) – One of ZURICH_STATIONS (e.g. "Fluntern"). Default None returns all sites with a station column.

  • timeout (int) – Request timeout in seconds. Default 60.

Returns:

Indexed by month start (period) with columns station, hgt and atd [Kd].

Return type:

pd.DataFrame