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

ERROR: One or more cycles detected in flow graph. #248

Closed
BastianT22 opened this issue Mar 14, 2023 · 2 comments
Closed

ERROR: One or more cycles detected in flow graph. #248

BastianT22 opened this issue Mar 14, 2023 · 2 comments

Comments

@BastianT22
Copy link

image
The flow direction was upscaled from MERIT-Hydro by PyFlwDir package. But it still reported the error. How can I check the flow direction data? Thank you!

@verseve
Copy link
Member

verseve commented Mar 15, 2023

Does the flow direction map contains a pit (value = 5)?

If the map contains a pit, probably the easiest way is to check for cycles with pyflwdir. You can use this function (core.loop_indices) to detect cycles:
https://github.com/Deltares/pyflwdir/blob/076783cd979660a6706a1a9840873c8b8fc34f48/pyflwdir/core.py#L236

@BastianT22
Copy link
Author

Thanks for your reply. I have checked that there are pits and no loop. The reason was finally identified that all pixels within the active pixel of the river must flow to pits (which can be not the same), but not to the boundary.

@verseve verseve closed this as completed Mar 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants