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

Fix LISFLOOD Errors when no lakes or reservoirs in the domain. #3

Open
wants to merge 2 commits into
base: seedfd_develop
Choose a base branch
from

Conversation

nicola-martin
Copy link

When running LISFLOOD over the SEED-FD domains there are errors for the domains that do not contain lakes/reservoirs due to missing expected input files. This is only a problem for warm starts.

This change adds a check to checkers.py so that if there are no lakes or reservoirs present then the input file check will not run for lakes/reservoirs.

The lisflood code already handles domains without lakes or reservoirs within the hydrological_modules/lakes.py and hydrological_modules/reservoir.py scripts so this deals with switching off the options in the model settings. This extra check just deals with the errors that happen before this stage when running checks on input files for model restarts.

The same logic that is used in hydrological_modules/lakes.py and hydrological_modules/reservoir.py, for determining where a lake/reservoir is present, is used in this new change to checkers.py.

Tests carried out:

  • lisflood-code/tests run with pytest. All 73 tests passed (fast and slow tests).
  • tested in longflow suite. Ran lisflood for the Juba-Shebelle basin and it successfully ran the model including warmstart/restart.

@nicola-martin nicola-martin requested a review from doc78 as a code owner March 5, 2025 15:32
@nicola-martin nicola-martin marked this pull request as draft March 5, 2025 15:40
@nicola-martin
Copy link
Author

Adding @corentincarton as a reviewer since this change relates to: ec-jrc#163

@nicola-martin nicola-martin marked this pull request as ready for review March 5, 2025 16:31
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.

1 participant