From 047276b2dc13a1a296ee9f34c20562bfc78ecc16 Mon Sep 17 00:00:00 2001 From: Martha Maria <53824825+eb5194@users.noreply.github.com> Date: Thu, 24 Sep 2020 10:13:13 +0200 Subject: [PATCH] Fix clustering sites (#191) * fix clustering of offwind-ac and offwind-dc in sites option * add release nodes Co-authored-by: martha.frysztacki --- doc/release_notes.rst | 2 ++ scripts/cluster_network.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/release_notes.rst b/doc/release_notes.rst index f5e3c377..b33a6b6a 100644 --- a/doc/release_notes.rst +++ b/doc/release_notes.rst @@ -25,6 +25,8 @@ Upcoming Release * Don't remove capital costs from lines and links, when imposing a line volume limit (wildcard ``lv``) or a line cost limit (``lc``). Previously, these were removed to move the expansion in direction of the limit. +* Fix bug of clustering offwind-{ac,dc} sites in the option of high-resolution sites for renewables. Now, there are more sites for offwind-{ac,dc} available than network nodes. Before, they were clustered to the resolution of the network. (e.g. elec_s1024_37m.nc: 37 network nodes, 1024 sites) + PyPSA-Eur 0.2.0 (8th June 2020) ================================== diff --git a/scripts/cluster_network.py b/scripts/cluster_network.py index ff85bcf3..6a8e526b 100644 --- a/scripts/cluster_network.py +++ b/scripts/cluster_network.py @@ -333,7 +333,7 @@ if __name__ == "__main__": renewable_carriers = pd.Index([tech for tech in n.generators.carrier.unique() - if tech.split('-', 2)[0] in snakemake.config['renewable']]) + if tech in snakemake.config['renewable']]) if snakemake.wildcards.clusters.endswith('m'): n_clusters = int(snakemake.wildcards.clusters[:-1])