Skip to content
Open
Show file tree
Hide file tree
Changes from 2 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
4 changes: 4 additions & 0 deletions scripts/build_renewable_profiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@
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 = np.intersect1d(offshore_regions, regions.index)
Comment thread
fneum marked this conversation as resolved.
regions = regions.loc[offshore_regions]
regions = regions.map(lambda g: _simplify_polys(g, minarea=1)).set_crs(
regions.crs
Expand Down Expand Up @@ -294,6 +295,9 @@
average_distance = []
bus_bins = layoutmatrix.indexes["bus_bin"]
for bus, bin in bus_bins:
if bus not in regions.index:
average_distance.append(0.0)
Comment thread
fneum marked this conversation as resolved.
continue
row = layoutmatrix.sel(bus=bus, bin=bin).data
nz_b = row != 0
row = row[nz_b]
Expand Down
2 changes: 2 additions & 0 deletions scripts/determine_availability_matrix_MD_UA.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ def get_wdpa_layer_name(wdpa_fn, layer_substring):
excluder = atlite.ExclusionContainer(crs=3035, res=100)

corine = config.get("corine", {})
if not isinstance(corine, dict):
corine = {}
if "grid_codes" in corine:
# Land cover codes to emulate CORINE results
if snakemake.wildcards.technology == "solar":
Expand Down
Loading