Deltares / Deltares/imod-python
imod.select.points_values - question about out_of_bounds handling
Open
@JoerivanEngelen is already working on this.
Since Jul 28, 2025.
bug
- Dominant language
- Python
- Stars
- 41
- Forks
- 12
- Avg merge
- 21h 8m
- Merged PRs (30d)
- 1
Description
I want to have NODATA for point out of bound.
How can I do that? Is the “warn” option in parameter oud_of_bounds functioning correct?
At the moment there are 3 out_of_bounds arguments.
- “raise” raises an exception. Python gives: ValueError: Not all points are located within the bounds of the DataArray . Python stops. That is what I expect
- “ignore”: ignore the missing points. In my example 1 of 30 points are out of bound, so the functions returns a DataArray with 30-1=29 points. That is what I expect
And now the third option.
- “warn” raise a warning. Python gives: ValueError: conflicting sizes for dimension 'index': length 30 on the data but length 29 on coordinate 'index'. Python stops. That is not what I expect.
- comes a warning always together with a termination?
- I expect the 'warn' option to continue with the function and give e.g. NODATA to the points out of bound.
- Or do we need a 4th option, e.g. "continue"
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.