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

Evaluation and Restructuring of Lake and Reservoir Structs #353

Open
alimeshgi opened this issue Feb 9, 2024 · 4 comments
Open

Evaluation and Restructuring of Lake and Reservoir Structs #353

alimeshgi opened this issue Feb 9, 2024 · 4 comments
Labels
needs refinement issue still needs refinement user-experience Improvements to the settings file, logging, error handling, etc.

Comments

@alimeshgi
Copy link

Feature type

Changing existing functionality

Improvement Description

The current implementation of lake and reservoir structs may contain shared functionality, leading to potential code duplication and decreased maintainability. To address this issue and improve the design of these structs, it's necessary to examine the shared functionality and explore restructuring based on user input.

Implementation Description

1)Examination of Shared Functionality:
Conduct a thorough examination of the lake and reservoir structs to identify shared functionality, such as water level management, inflow/outflow calculations, and storage capacity constraints.
Determine areas where functionality can be consolidated or abstracted to reduce redundancy and improve code maintainability.

2)User Input and Feedback:
Gather input from users and stakeholders regarding their requirements and preferences for the design of lake and reservoir structs.
Incorporate user feedback into the restructuring process to ensure that the new design aligns with the needs of the user community and addresses common use cases effectively.

3)Restructuring for Improved Design:
Explore restructuring options, such as introducing a common base struct for lakes and reservoirs or utilizing composition to encapsulate shared functionality.
Refactor the existing structs based on the identified shared functionality and user input, aiming to improve design clarity, modularity, and extensibility.

Additional Context

No response

@alimeshgi alimeshgi added user-experience Improvements to the settings file, logging, error handling, etc. needs refinement issue still needs refinement labels Feb 9, 2024
@Starphire1
Copy link

@alimeshgi thanks for your post on lakes/reservoirs. I also would like to see more functionality with water level management and inflow/outflow calculations. Cheers.

@shartgring
Copy link
Collaborator

Good point @alimeshgi , happy to see it listed here

It is something I encountered when modelling the reservoirs in the Rur catchment. Currently, we implemented the reservoirs using the hq rating curves. However, this means that in practice the reservoirs are included in the model as 'lakes', as this is only supported for lakes. As a result, I need to include a very clear description of this lake-reservoir-trick when the model is shared. A shared concept for both lakes and reservoirs ("waterbody"?) may prevent such confusion/risk of miscommunication

@alimeshgi
Copy link
Author

thanks for your feedback and nice suggestion @shartgring.
@verseve and @JoostBuitink, we discussed this before but please also see the above comment from @shartgring.

@JoostBuitink
Copy link
Contributor

This is indeed a valid comment: the names "lakes" and "reservoirs" are more linked to functionality and not so much to what they are in reality.

I agree that a name such as "waterbodies" is more suitable if we want to combine these functionalities. However, this would mean that there would be a lot of (different) functionality behind the same "name". This is not directly a problem I think, but we need to critically evaluate how we want to setup the "user-experience/input data/toml" to make sure the correct information is provided to wflow for each functionality.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs refinement issue still needs refinement user-experience Improvements to the settings file, logging, error handling, etc.
Projects
None yet
Development

No branches or pull requests

4 participants