-
Notifications
You must be signed in to change notification settings - Fork 15
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
States #252
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hboisgon, Thanks for the good work! For the most part, it looks very solid!
I had a few points:
path_input
is not set (could cause issues with custom config files)- Same argument goes for the states themselves
( I realise we rely upon the blueprint settings files, but this makes it a bit more future proof) - Nodata value of
waterlevel_lake
- A bit more documentation maybe in the building (or updating) model notebooks that this can be done. I'd say it's really key that the states can be set like this.
Thanks for the review @dalmijn ! I addressed most of comments. Could you check again?
This is handled in the
I added.
Updated.
The only use case for this I know is using wflow in Delft-FEWS because Wflow.jl can setup its own cold states so you don't want to prepare them by default (so should not be included in the wflow_build.yml template). The use is also not really complex so not sure if I need a specific update example for it. It's already documented in the list of available methods in the wflow docs and properly listed in the API. Do you think we really need to add an example? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @hboisgon for addressing the comments!
Everything looks good except for one:
@hboisgon, Thanks for the good work! For the most part, it looks very solid!
I had a few points:
path_input
is not set (could cause issues with custom config files)This is handled in the
read_states
andwrite_states
methods normally :)
This is not handled properly in write_states. state.path_input
will not be set.
An error will be thrown in write_states
as there is no value for it in the config.
A bit more documentation maybe in the building (or updating) model notebooks that this can be done. I'd say it's really
key that the states can be set like this.The only use case for this I know is using wflow in Delft-FEWS because Wflow.jl can setup its own cold states so you don't
want to prepare them by default (so should not be included in the wflow_build.yml template). The use is also not really
complex so not sure if I need a specific update example for it. It's already documented in the list of available methods in the > wflow docs and properly listed in the API. Do you think we really need to add an example?
I agree, I was more thinking of a added cell in the current update or build notebook, not a separate one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
@hboisgon could you take a quick look at the make_path_relative
functionm?
Hi @dalmijn. In the end I preferred to handle this similarly to other components like forcing. |
@hboisgon, It look good to me. I'll delete the excess functions. |
Issue addressed
Fixes #18
Explanation
Added:
To be precise in the cold states method as this can be done after a wflow model has been updated and calibrated, I added a new function to get the right values based on value/scale/offset options in the config file with a new utils.get_grid_from_config function.
Checklist
main
Additional Notes (optional)
Add any additional notes or information that may be helpful.