Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build - main - ERROR - Lengths of inputs do not match. Left: 0, Right: 3 #115

Closed
aweerts opened this issue Oct 26, 2022 · 5 comments
Closed
Labels
bug Something isn't working workflows Issue linked to the workflows

Comments

@aweerts
Copy link

aweerts commented Oct 26, 2022

error building models related to river width

hydromt build wflow b92eb513-0438-4d57-94c0-c3c0c2c935c1 -r 0.0083333 "{'subbasin': [-96.4458333334093,30.6958333332901], 'strord': 4, 'bounds': [-96.5183333333333,30.6441666666667,-96.3891666666667,30.7766666666667]}" -i wflow_build_1km_vito.ini --dd -vv

@laurenebouaziz
Copy link
Contributor

when building a model for a small upstream basin, the rivers_lin2019_v1 dataset is empty. this gives an issue when trying to calculate the nearest distance between river shape and lin dataset in river.py in function river_bathymetry:
idx_nn, dst_nn = gis_utils.nearest(gdf_out, gdf_riv)
as gdf_riv is empty.

@hboisgon , have you encountered this issue before?

@hboisgon
Copy link
Contributor

Yes but did not really looked into yet. We also have an 'old' method setup_riverwidth. Wonder if in the case lin has no data it may help.

@hboisgon hboisgon added bug Something isn't working workflows Issue linked to the workflows labels Oct 28, 2022
@DirkEilander
Copy link
Contributor

to solve this I propose the following:

  • set a try-except clause around the get_geodataframe in WflowModel.setup_rivers
  • accommodate for gdf_riv=None in hydromt_wflow.workflows.river.river_bathymetry where we can either apply the min_rivwth & min_rivdpth
  • ideally, we would fit a power-law equation (e.g. based on the river_lin dataset) to estimate river width and depth for cells where we don't have data instead of the min values.

@DirkEilander
Copy link
Contributor

DirkEilander commented Oct 28, 2022

For now a workaround is to leave out "river_geom_fn" in [setup_rivers] and add a the [setup_riverwidth] method after. The latter is the old deprecated method. This communicated this with @aweerts

@hboisgon
Copy link
Contributor

Closed as duplicate in #195

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working workflows Issue linked to the workflows
Projects
None yet
Development

No branches or pull requests

4 participants