ImperialCollegeLondon / SWMManywhere

SWMManywhere is used to derive and simulate a sewer network anywhere in the world
https://imperialcollegelondon.github.io/SWMManywhere/
BSD 3-Clause "New" or "Revised" License
4 stars 1 forks source link

`pysheds` to `whitebox` #266

Closed barneydobson closed 2 months ago

barneydobson commented 2 months ago

Description

Need because pysheds is GNU.

Fixes #263 Fixes #212 Fixes #137 Fixes #141 Fixes #138 Fixes #268

whitebox seems super powerful and the most sensible way to accommodate many changes to catchment delineation. In the long run it seems that pyflwdir could be removed and everything done on whitebox - one thing at a time though. (Adding an issue to discuss whitebox #267 )

cheginit commented 2 months ago

In whitebox documentaion this is what I found:

In comparison with the BreachDepressions tool, this breaching method often provides a more satisfactory, lower impact, breaching solution and is often more efficient. It is therefore advisable that users try the BreachDepressionsLeastCost tool to remove depressions from their DEMs first.

barneydobson commented 2 months ago

In whitebox documentaion this is what I found:

In comparison with the BreachDepressions tool, this breaching method often provides a more satisfactory, lower impact, breaching solution and is often more efficient. It is therefore advisable that users try the BreachDepressionsLeastCost tool to remove depressions from their DEMs first.

@cheginit I will stick with BreachDepressions for now because my new test values have been adjusted for it and I've verified that the subbasins created are sensible. We can investigate alternatives as part of #267 .

Did you want to rereview my calling of the wrapper?

I know it seems extravagant to have the WBT directory inside the temporary folder and redownload it each time - but it seems that all manner of strangeness can happen on the cluster and this just feels the most robust way to deal with it.

cheginit commented 2 months ago

I packaged the wrapper that I wrote for whitebox as a python library called pywbt that doesn't have any dep, even requests. While testing it, I realized that the least cost version of the breaching depressions algorithm is not stable and has a couple of open issues. So for now just stick to using BreachDepressions but also pass --fillpits option.

barneydobson commented 2 months ago

@cheginit amazing thanks - all now good