natcap / invest

InVEST®: models that map and value the goods and services from nature that sustain and fulfill human life.
Apache License 2.0
152 stars 63 forks source link

Handle 0 values in NDR runoff proxy #1009

Open phargogh opened 2 years ago

phargogh commented 2 years ago

In a slack thread with Rafa and Stacie, they clarified that runoff proxy should always be nonzero. Because the UG states this as a distance, I think we can safely interpret this as that runoff proxy values should always be positive, nonzero values.

While we could validate this away, I wonder if we should just treat these as nodata and log a warning instead.

Came up in response to #1005

phargogh commented 2 years ago

One possible solution here is to use the watersheds vector here and to only consider normalizing pixels under the vector instead of considering everything in the raster except nodata.