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

Create constant infiltration rates based on lulc and reclass_table #103

Merged
merged 5 commits into from
Jul 12, 2023

Conversation

roeldegoede
Copy link
Collaborator

In addition to the existing functionality, we can now also set up constant infiltration rates based on landuse/landcover and a reclass table. Before we could only use spatiallly varying infiltration fields.

@roeldegoede roeldegoede marked this pull request as ready for review July 5, 2023 15:10
Copy link
Contributor

@DirkEilander DirkEilander left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @roeldegoede for this PR!
I've made a few small changes (see also comments), let me know if you agree.
It would be good to also update the csv tables - can you still do that?
Otherwise good to be merged.

elif lulc is not None:
# landuse/landcover should always be combined with mapping
if reclass_table is None and isinstance(lulc, str):
reclass_table = join(DATADIR, "qinf", f"{lulc}_mapping.csv")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed this to point the the "data/lulc" folder. Should we also modify the tables in there to contain a qinf column?

Comment on lines 980 to 984
if (
not os.path.isfile(reclass_table)
and reclass_table not in self.data_catalog
):
raise IOError(f"Infiltration mapping file not found: {reclass_table}")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't work if reclass_table is a pandas DataFrame

@roeldegoede roeldegoede merged commit 6e5f078 into main Jul 12, 2023
3 checks passed
@roeldegoede roeldegoede deleted the enh-infiltration_based_on_lulc branch July 20, 2023 09:19
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

Successfully merging this pull request may close these issues.

2 participants