finishing touches and release notes

This commit is contained in:
Fabian Neumann 2024-02-12 10:49:45 +01:00
parent 49171901d7
commit 09ada56bf1
6 changed files with 22 additions and 26 deletions

View File

@ -10,6 +10,9 @@ Release Notes
Upcoming Release
================
* Merged two OPSD time series data versions into such that the option ``load:
power_statistics:`` becomes superfluous and was hence removed.
* Add new default to overdimension heating in individual buildings. This allows
them to cover heat demand peaks e.g. 10% higher than those in the data. The
disadvantage of manipulating the costs is that the capacity is then not quite

View File

@ -24,9 +24,9 @@ rule build_electricity_demand:
countries=config["countries"],
load=config["load"],
input:
ancient(RESOURCES + "electricity_demand.csv"),
ancient("data/electricity_demand_raw.csv"),
output:
RESOURCES + "load.csv",
RESOURCES + "electricity_demand.csv",
log:
LOGS + "build_electricity_demand.log",
resources:
@ -417,7 +417,7 @@ rule add_electricity:
if config["conventional"]["dynamic_fuel_price"]
else []
),
load=RESOURCES + "load.csv",
load=RESOURCES + "electricity_demand.csv",
nuts3_shapes=RESOURCES + "nuts3_shapes.geojson",
ua_md_gdp="data/GDP_PPP_30arcsec_v3_mapped_default.csv",
output:

View File

@ -191,7 +191,7 @@ if config["enable"]["retrieve"]:
params:
versions=["2019-06-05", "2020-10-06"],
output:
RESOURCES + "electricity_demand.csv",
"data/electricity_demand_raw.csv",
log:
LOGS + "retrieve_electricity_demand.log",
resources:

View File

@ -52,7 +52,7 @@ Inputs
:scale: 34 %
- ``data/geth2015_hydro_capacities.csv``: alternative to capacities above; not currently used!
- ``resources/load.csv`` Hourly per-country load profiles.
- ``resources/electricity_demand.csv`` Hourly per-country electricity demand profiles.
- ``resources/regions_onshore.geojson``: confer :ref:`busregions`
- ``resources/nuts3_shapes.geojson``: confer :ref:`shapes`
- ``resources/powerplants.csv``: confer :ref:`powerplants`

View File

@ -1,15 +1,13 @@
# -*- coding: utf-8 -*-
# SPDX-FileCopyrightText: : 2020 @JanFrederickUnnewehr, The PyPSA-Eur Authors
# SPDX-FileCopyrightText: : 2020 @JanFrederickUnnewehr, 2020-2024 The PyPSA-Eur Authors
#
# SPDX-License-Identifier: MIT
"""
This rule downloads the load data from `Open Power System Data Time series.
This rule downloads the load data from `Open Power System Data Time series
<https://data.open-power-system-data.org/time_series/>`_. For all countries in
the network, the per country load timeseries with suffix
``_load_actual_entsoe_transparency`` are extracted from the dataset. After
filling small gaps linearly and large gaps by copying time-slice of a given
period, the load data is exported to a ``.csv`` file.
the network, the per country load timeseries are extracted from the dataset.
After filling small gaps linearly and large gaps by copying time-slice of a
given period, the load data is exported to a ``.csv`` file.
Relevant Settings
-----------------
@ -19,9 +17,7 @@ Relevant Settings
snapshots:
load:
interpolate_limit:
time_shift_for_large_gaps:
manual_adjustments:
interpolate_limit: time_shift_for_large_gaps: manual_adjustments:
.. seealso::
@ -31,12 +27,12 @@ Relevant Settings
Inputs
------
- ``resources/electricity_demand.csv``:
- ``data/electricity_demand_raw.csv``:
Outputs
-------
- ``resources/load.csv``:
- ``resources/electricity_demand.csv``:
"""
import logging
@ -141,7 +137,7 @@ def copy_timeslice(load, cntry, start, stop, delta, fn_load=None):
].values
def manual_adjustment(load, fn_load):
def manual_adjustment(load, fn_load, countries):
"""
Adjust gaps manual for load data from OPSD time-series package.
@ -262,7 +258,7 @@ if __name__ == "__main__":
if "snakemake" not in globals():
from _helpers import mock_snakemake
snakemake = mock_snakemake("build_electricity_demand", run="network2019")
snakemake = mock_snakemake("build_electricity_demand")
configure_logging(snakemake)
@ -289,7 +285,7 @@ if __name__ == "__main__":
load["MD"] = 6.2e6 * (load_ua / load_ua.sum())
if snakemake.params.load["manual_adjustments"]:
load = manual_adjustment(load, snakemake.input[0])
load = manual_adjustment(load, snakemake.input[0], countries)
if load.empty:
logger.warning("Build electricity demand time series is empty.")

View File

@ -1,9 +1,9 @@
# -*- coding: utf-8 -*-
# SPDX-FileCopyrightText: : 2023 The PyPSA-Eur Authors
# SPDX-FileCopyrightText: 2023-2024 The PyPSA-Eur Authors
#
# SPDX-License-Identifier: MIT
"""
Retrieve monthly fuel prices from Destatis.
Retrieve electricity prices from OPSD.
"""
import logging
@ -12,9 +12,7 @@ import pandas as pd
logger = logging.getLogger(__name__)
from pathlib import Path
from _helpers import configure_logging, set_scenario_config
from _helpers import configure_logging
if __name__ == "__main__":
if "snakemake" not in globals():
@ -25,7 +23,6 @@ if __name__ == "__main__":
else:
rootpath = "."
configure_logging(snakemake)
set_scenario_config(snakemake)
url = "https://data.open-power-system-data.org/time_series/{version}/time_series_60min_singleindex.csv"