creare-com / pydem

Python library for Global Hydrology Analysis. Used to calculate upstream contributing area, aspect, slope, and topographic wetness index.
Apache License 2.0
114 stars 35 forks source link

How to deal with no place to drain warning #13

Closed kothawadegs closed 6 years ago

kothawadegs commented 6 years ago

While calculating UCA, I'm getting User warning, "Warning 2416 pits had no place to drain to in this chunk "chunk" % len(warn_pits))". How to handle this kind of warning. I'm getting this error on many chunks. Any suggestion?

mpu-creare commented 6 years ago

Pits are pixels that are surrounded by higher-elevation pixels on all sides. As such, water that drains into a pit has no place to drain to. Pits are often considered artifacts, and as such many people will pit-fill their elevation data before calculating TWI. Pydem tries to look a certain distance from a pit to see if it can find a lower-elevation pixel. If it cannot, it records it and throws this warning.

This happens naturally in some places (e.g. endorheic basins). Depending on your application, you can safely ignore this warning.