refactor IHU upscaling code for readability
- streams array can be simplified, no need to save cell indices
- lots of duplicate code between
upscale_checkandupscale_errormethods - remove unused code
- improve comments. consistent use of pixel vs cell in terminology.
Hi Dirk Eliander,
Thanks for pyflwdir python library! I am Phd student at University of Bucharest, Romania. My plan is to use pyflwdir in my activity. I have tested for wateshed delineation and is great and usefull. I found the zenodo DOI for citing this library in my future research.
I didn't understand exactly how the delimitation of watersheds works in the pyflwdir library. Please, could you help me with an article to understand the methodology? I suspect that the algorithms are created by you at Deltares or are taken from somewhere else. If you have a little time, please answer me too. I am at your disposal for other details!
Best, Florin Bilbie
Hi @flor187
The delineation is based on a flow direction grid which basically defines a downstream direction for each grid cell. Hence the basin boundaries are fixed given this data.
Flow direction can be derived from DEMs, see this examle. Here we use the algorithm implemented by Wang & Liu (2006) as mentioned in the example.
Hope this helps.
PS. this question is a bit off topic here. Please reach with on-topic issues for bugs / new feature requests or the discussion forum for general questions.