[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
This commit is contained in:
pre-commit-ci[bot] 2023-11-06 15:38:03 +00:00
parent 7241efd3a4
commit 4f28dfd4fd
2 changed files with 9 additions and 4 deletions

View File

@ -220,7 +220,10 @@ rule build_renewable_profiles:
gebco=ancient(
lambda w: (
"data/bundle/GEBCO_2014_2D.nc"
if (config["renewable"][w.technology].get("max_depth") or config["renewable"][w.technology].get("min_depth"))
if (
config["renewable"][w.technology].get("max_depth")
or config["renewable"][w.technology].get("min_depth")
)
else []
)
),

View File

@ -269,8 +269,10 @@ if __name__ == "__main__":
excluder.add_raster(snakemake.input.gebco, codes=func, crs=4326, nodata=-1000)
if params.get("min_depth"):
func = functools.partial(np.greater,-params['min_depth'])
excluder.add_raster(snakemake.input.gebco, codes=func, crs=4326, nodata=-1000, invert=True)
func = functools.partial(np.greater, -params["min_depth"])
excluder.add_raster(
snakemake.input.gebco, codes=func, crs=4326, nodata=-1000, invert=True
)
if "min_shore_distance" in params:
buffer = params["min_shore_distance"]