UA-MD availability matrix: consider ship density
This commit is contained in:
parent
9a13748d34
commit
9d7b250230
@ -215,6 +215,11 @@ rule determine_availability_matrix_MD_UA:
|
||||
if "max_depth" in config["renewable"][w.technology].keys()
|
||||
else []
|
||||
),
|
||||
ship_density=lambda w: (
|
||||
RESOURCES + "shipdensity_raster.tif"
|
||||
if "ship_threshold" in config["renewable"][w.technology].keys()
|
||||
else []
|
||||
),
|
||||
country_shapes=RESOURCES + "country_shapes.geojson",
|
||||
offshore_shapes=RESOURCES + "offshore_shapes.geojson",
|
||||
regions=lambda w: (
|
||||
|
@ -81,6 +81,13 @@ if __name__ == "__main__":
|
||||
snakemake.input.country_shapes, buffer=buffer, invert=True
|
||||
)
|
||||
|
||||
if "ship_threshold" in config:
|
||||
shipping_threshold = config["ship_threshold"] * 8760 * 6
|
||||
func = functools.partial(np.less, shipping_threshold)
|
||||
excluder.add_raster(
|
||||
snakemake.input.ship_density, codes=func, crs=4326, allow_no_overlap=True
|
||||
)
|
||||
|
||||
kwargs = dict(nprocesses=nprocesses, disable_progressbar=noprogress)
|
||||
if noprogress:
|
||||
logger.info("Calculate landuse availabilities...")
|
||||
|
Loading…
Reference in New Issue
Block a user