Skip to content
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

Using custom watershed datasets instead of HydroBasins? #132

Open
kanishkan91 opened this issue May 24, 2022 · 5 comments
Open

Using custom watershed datasets instead of HydroBasins? #132

kanishkan91 opened this issue May 24, 2022 · 5 comments

Comments

@kanishkan91
Copy link

kanishkan91 commented May 24, 2022

@jonschwenk @jsta From the documentation and the code I gather that you are using the HydroBasins data product to produce aggregate delineations. But is it that rabpro can only be used with HydroBasins for producing more aggregate delineations? For example, if I had my own aggregate basins file, can I use rabpro with it (Maybe by just switching in the shape file)?

The reason I raise this is that there are Earth System Models that use custom basin boundaries. If this package can be used with such custom aggregate basin files, it would be extremely useful to the community.

On further study of the code, I see that load_continent_basins() is used to load the HydroBasins file. I'm wondering whether it would be possible to parameterize this to read in generic shapefiles? If this is a tool that works specifically with HydroBasins and not with any other generic shapefile, then that needs to be noted more front and center.

Apologies if I missed anything in the documentation related to this.

(PS- Note that this is probably my last comment on the code. After this, I will probably be out of your hair for the code review at least!)

@jonschwenk
Copy link
Collaborator

The short answer is no, you can't use generic watershed boundaries to do aggregations. This is mainly due to the fields that rabpro expects to see that it uses to identify connectivity and drainage areas. In theory, if you renamed your shapefile fields to match HydroBasins, then it would be possible...ish. The other thing that rabpro does (kinda hacky) to avoid loading in all the level-12 (highest resolution) subbasins to figure out which contains your coordinate is to first load in the level-1 subbasins (coarsest), intersect with the provided coordinate and use that intersection to determine which level-12 continent file to load. So this would also have to be adapted. We could make the procedure generic, but then users would need to modify the HydroBasins file (or use our version of it)...

If there is a consistent format that the ESM community uses, we'd be amenable to providing watershed delineation support for that format!

@jsta
Copy link
Member

jsta commented May 24, 2022

Do you know an example of a custom (aggregate) basin boundaries file that is not HydroBasins?

@kanishkan91
Copy link
Author

We work with an IAM and ESM called GCAM and we use our 235 basins for the same (We call them GLUs or geographical land use regions) which are intersected with 32 regions. These are custom developed for the model. Details are here -https://jgcri.github.io/gcam-doc/common_assumptions.html. I think other ESMs may have their own maps like these. But we need to initialize data for these 235 basins.

@kanishkan91
Copy link
Author

@jonschwenk , @jsta Could you add some text to the paper similar to the above comment on why you cant use custom boundaries with rabpro. Also, feel free to keep this issue open if you think this is something that may happen in the future.

@jonschwenk
Copy link
Collaborator

Added the following to the paper:

rabpro does not currently provide support for custom watershed datasets similar to HydroBASINS due to attribute field and data structure requirements that must be consistent for generalizability.

I will change the title of this Issue and leave it open--if enough people want to see either generalizability or a specific format supported, we can consider it (or help them implement). Thanks for bringing this up!

@jonschwenk jonschwenk changed the title JOSS review: How easy/hard is it to use custom aggregate boundaries in place of HydroBasins? Using custom watershed datasets instead of HydroBasins? May 24, 2022
jonschwenk added a commit that referenced this issue May 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants