-
Notifications
You must be signed in to change notification settings - Fork 21
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
Refactor types and model initialization #517
base: master
Are you sure you want to change the base?
Conversation
Nice, some of these improvements (e.g. write out structs for About the naming I think it would be good to replace the terms What are your thoughts on this @SouthEndMusic and @JoostBuitink ? |
I don't have opinions yet about hydrological jargon 😋 |
@vers-w I'm done refactoring for this PR :) The structs I introduced also need some inline documentation, but I'm not the right person to do that. I leave it up to you whether you want to do this within this PR or in a follow up. I see there is a lot of duplicate code in the model initialization code, but I don't understand it well enough at the moment to split it op into sensible sub functions. |
I agree that replacing the terms |
Yes, I think replacing the term |
I also agree that Line 88 in fbc2383
I fully agree that |
Yes, I can do that in this PR, that's fine. When we have decided what terms to use for
Yes, definitely true and also something we would like to improve for v1.0. Did not look into detail at this yet. Probably good to check if we can use structs here that we can set partly (I see that you added |
Yes, in this PR I also make quite heavy use of partly setting structs. With |
'land` refers to `AbstractLandModel`.
- For `Routing` struct use more explicit names (`river_flow`, `overland_flow` and `subsurface_flow`), also easier to distinguish from `land` (vertical) component. - Changed mapping of groundwater flow model (boundaries).
Explanation
When starting to look into water balance calculations for Wflow, I came across some aspects of the code that I think can be improved:
AbstractModel
Model.Network
instead of using a nestedNamedTuple
network.jl
Model.Lateral
lateral.jl
Model.vertical
?initialize_sbm_gwf_model
initialize_sbm_model
initialize_sediment_model