Skip to content

Commit

Permalink
pre_commit
Browse files Browse the repository at this point in the history
  • Loading branch information
vanasseltk committed Aug 29, 2024
1 parent 1b0598a commit f193873
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions hydromt_sfincs/sfincs.py
Original file line number Diff line number Diff line change
Expand Up @@ -3719,7 +3719,7 @@ def _parse_datasets_riv(self, datasets_riv):
"gdf_riv",
"gdf_riv_mask",
"gdf_zb",
"point_zb"
"point_zb",
]
copy_keys = []
attrs = ["rivwth", "rivdph", "rivbed", "manning"]
Expand Down Expand Up @@ -3756,9 +3756,12 @@ def _parse_datasets_riv(self, datasets_riv):
geom=self.mask.raster.box,
)
dd.update({"gdf_zb": gdf_zb})

if "gdf_riv" in dd:
if not gdf_riv.columns.isin(["rivbed", "rivdph"]).any() and "gdf_zb" not in dd:
if (
not gdf_riv.columns.isin(["rivbed", "rivdph"]).any()
and "gdf_zb" not in dd
):
raise ValueError("No 'rivbed' or 'rivdph' attribute found.")
else:
raise ValueError("No 'centerlines' dataset provided.")
Expand Down

0 comments on commit f193873

Please sign in to comment.