Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions doc/release_notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

<!-- Upcoming Release -->
<!-- ================= -->
* Fix: Offshore wind profiles no longer fail for clustered buses without an onshore region; the nearest onshore regions then serve as the shoreline ([#2425](https://github.com/PyPSA/pypsa-eur/pull/2425)).
* Fix: Hydro reservoir storage (`renewable: hydro: hydro_max_hours`) no longer depends on the first unit of each country, and the default now matches the country totals. This changes default results ([#2428](https://github.com/PyPSA/pypsa-eur/pull/2428)).
* data: Upgrade techno-economic assumptions to `technology-data` v0.16.0. This changes default results. Affected are nuclear fuel cost, `central solid biomass CHP CC` cost and efficiency, `waste CHP CC` (`industry: waste_to_energy_cc`) and `biogas to gas CC` ([#2426](https://github.com/PyPSA/pypsa-eur/pull/2426)).
* Feature: Add enhanced rock weathering, biochar, afforestation and perennial grass as land-based carbon dioxide removal options (`sector: rock_weathering`, `sector: biochar`, `sector: afforestation`, `sector: perennials`). Their potentials derive from CORINE land cover or, for perennial grass, from the cropland freed by the phase-out of unsustainable bioliquids. ([#2405](https://github.com/PyPSA/pypsa-eur/pull/2405)) We acknowledge funding to Alberto Alamia from [CORC](https://corc.au.dk/).
Expand Down
13 changes: 12 additions & 1 deletion scripts/build_renewable_profiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,18 @@
regions = regions.set_index("name").rename_axis("bus")
if snakemake.wildcards.technology.startswith("offwind"):
# for offshore regions, the shortest distance to the shoreline is used
offshore_regions = availability.coords["bus"].values
offshore_regions = availability.coords["bus"].to_index()
missing = offshore_regions.difference(regions.index)
if not missing.empty:
logger.info(
f"Using nearest onshore regions as shoreline for {len(missing)} buses without onshore region."
)
offshore = gpd.read_file(snakemake.input.resource_regions).set_index("name")
i, j = regions.to_crs(3035).sindex.nearest(
offshore.loc[missing].to_crs(3035).geometry
)
shore = regions.iloc[j][["geometry"]].set_axis(missing[i])
regions = pd.concat([regions, shore.dissolve(level=0)])
regions = regions.loc[offshore_regions]
regions = regions.map(lambda g: _simplify_polys(g, minarea=1)).set_crs(
regions.crs
Expand Down
Loading