Skip to content

Commit c3dcdb0

Browse files
Fix min/max_shore_distance param access in availability matrix calc (#2020)
1 parent 547e8e8 commit c3dcdb0

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

doc/release_notes.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ Release Notes
99
Upcoming Release
1010
================
1111

12+
* Fix `None` default config parameter from creating zero availability for offshore wind (#2019).
13+
1214
* Remove snakemake's slurm plugin from windows installations (https://github.com/PyPSA/pypsa-eur/pull/2009).
1315

1416
* Added Xpress solver configuration options (``xpress-default`` and ``xpress-gpu``) with barrier method settings optimized for large-scale linear programming problems.

scripts/determine_availability_matrix.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,11 +145,11 @@
145145
snakemake.input.gebco, codes=func, crs=4326, nodata=-1000, invert=True
146146
)
147147

148-
if "min_shore_distance" in params:
148+
if params.get("min_shore_distance") is not None:
149149
buffer = params["min_shore_distance"]
150150
excluder.add_geometry(snakemake.input.country_shapes, buffer=buffer)
151151

152-
if "max_shore_distance" in params:
152+
if params.get("max_shore_distance") is not None:
153153
buffer = params["max_shore_distance"]
154154
excluder.add_geometry(
155155
snakemake.input.country_shapes, buffer=buffer, invert=True

0 commit comments

Comments
 (0)