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

Issues with wflow clipping (initial states, gauge outlet, lake csv files) #317

Open
2 tasks done
atsiokanos opened this issue Jan 10, 2025 · 5 comments
Open
2 tasks done
Labels
bug Something isn't working needs refinement issue still needs refinement

Comments

@atsiokanos
Copy link

atsiokanos commented Jan 10, 2025

HydroMT-Wflow version checks

  • I have checked that this issue has not already been reported.
  • I have checked that this bug exists on the latest version of HydroMT-Wflow.

Reproducible Example

(I can share an example on the Nile basin)

Current behaviour

  1. When clipping a wflow model the instates are not clipped. Instead, they are copied and pasted as unclipped versions, which cannot be used by the model.

  2. A gauge is not automatically placed at the outlet of the clipped model. Users must manually run an update command -c setup_outlets -v to address this.

  3. Lake csv files (rating curves, e.g. lake_hq.csv) are not properly copied to the clipped version. In the clipped version, the csv contains "H" in first line and then instead of the water level and its corresponding DOY values it has only the first DOY value (under H) which ofc results in an error. Also these files can be copied to a clipped version without the specified lake.

Desired behaviour

instates.nc file must be clipped as well. Consider also placing a gauge automatically at the outlet of the clipped (sub)basin. Lake rating curves provided in a csv format should be copied properly. Ideally, a check should be done to verify whether the specified lake exists in the clipped version.

Additional context

No response

@atsiokanos atsiokanos added bug Something isn't working needs refinement issue still needs refinement labels Jan 10, 2025
@hboisgon
Copy link
Contributor

Thanks for reporting this issue @atsiokanos. Do you plan to solve it yourself in hydromt_wflow or do you want us to look into it? If so what is the priority/timelie you would like the issue to be fixed?

@atsiokanos atsiokanos changed the title Clipping wflow does NOT clip initial states (and does not automatically add outlet gauge?) Issues with wflow clipping wflow (initial states, gauge outlet, lake csv files) Jan 20, 2025
@atsiokanos atsiokanos changed the title Issues with wflow clipping wflow (initial states, gauge outlet, lake csv files) Issues with wflow clipping (initial states, gauge outlet, lake csv files) Jan 20, 2025
@atsiokanos
Copy link
Author

thanks @hboisgon for your quick response! I have slightly updated the issue to include the bug with the lake CSV rating curves (see above). Unfortunately, at the moment, I don’t have the time and budget in my project to resolve it in hydromt_wflow. Fortunately, these issues are minor and can be fixed easily. While it’s not urgent, it is good to have it documented here.

@shartgring
Copy link
Collaborator

@shartgring
Copy link
Collaborator

We have a clipped_states method now (https://deltares.github.io/hydromt_wflow/latest/_generated/hydromt_wflow.WflowModel.clip_states.html) so I think we would have to add that one to HydroMT core

For the tables and geoms, there is already some code there within WflowModel.clip_grid() indeed, so filtering on the new basin geometry might indeed be a quick implementation

@JoostBuitink
Copy link
Collaborator

Given that HydroMT-core (understandably) decided to drop support for the clip function through the CLI (Deltares/hydromt#1063), we should implement this fully in the plugin. This also gives the opportunity to improve the code and add stuff like inverse clipping as well!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs refinement issue still needs refinement
Projects
None yet
Development

No branches or pull requests

4 participants