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
SDR: sed_deposition has large swaths of nodata in Gura sample data #911
Comments
It's the DEM causing the problem. In a desperate attempt to be able to use the SDR sample data for training, I downloaded a different DEM for the Gura sample data area, ran it with SDR version 3.12.0, and the output rasters do not have these weird holes! The original DEM data was SRTM, the new DEM data is HydroSHEDS (resampled from 90m to 15m to match the LULC, which is something I wouldn't typically do, but it's fine for this purpose). |
Thanks for the update @newtpatrol! Does this behavior still seem like a software bug, or do we just need to update the sample data? |
Hm, I think a little of both, since we did use the SRTM DEM for an analysis successfully years ago, and the same DEM does not cause similar problems with NDR. However, since I don't think anyone else has reported this problem, I'd be fine with shelving it as a bug for now, I'll just need to update the sample data - what's the best way to do that? |
Investigating this now, some notes:
|
The sediment deposition function takes three inputs: flow direction, sdr, and e_prime. flow_dir and sdr have valid data in the larger area (same as the LULC and DEM), while Because This is happening now because of a recent change to the sediment deposition function - we used to ignore upstream pixels that were missing data, which led to some potentially wrong results. Now that we require all upstream pixels to have data, we can't calculate results in all the same places. So I think what's happening is correct mathematically, but we could handle this situation better. Maybe we should set flow direction to nodata where e_prime is nodata. (Though there's an assumption here that the flow direction raster has data over the entire watershed). This is worth discussing with Lisa and Rafa before deciding what to do. |
Thanks for doing all that sleuthing @emlys. Do you think it's due to something about the DEM sample data that could be fixed by the user (me)? If so, I might add related guidance to the User Guide as relevant. I'll also thank you for another reason - it seems that I never updated the Gura sample data with the more functional HydroSHEDS DEM, so glad to have that reminder! What's the best way to update sample data? It's been a while since I've had to. |
@newtpatrol I think it could be fixed in the short term by aligning the DEM and other raster inputs so that they all have nodata in the same places. But that's not something we normally expect from user data. The sample data lives in this bitbucket repo: https://bitbucket.org/natcap/invest-sample-data/src/master/ You'd need to clone the repo, change the file, and commit and push the change back to the master branch. Or I can do it if you send me the file |
Yep, I think it's easiest to send us the files for updating :)
I know we had this discussion previously but I wonder if there is a compromise between "ignoring undefined upstream pixels" and communicating how that could affect the results. Thanks for picking this up Emily! |
Thanks y'all. I tried to update the SDR sample data myself in Bitbucket, but couldn't for the life of me successfully log in via any git tool, so gave up and sent an updated folder to @emlys. (For the record, there are several updates in that folder, along with the DEM). |
Hey everyone, this issue came up on the forums (#1433 ) and I'm about to submit a patch that will fix it by mutually masking out the user's input rasters. That way, once alignment and masking are complete (which is early in model execution), all outputs should have data in the same places, except for regions that don't drain to the stream. I'll include you all on the PR. |
Reported by Stacie:
After running SDR, I overlayed the
sed_deposition.tif
on top ofwhat_drains_to_stream.tif
to show that these regions do indeed flow to the stream.I can confirm that this is happening on InVEST 3.10.2 with the sample data.
The text was updated successfully, but these errors were encountered: