Deltares / Deltares/imod-python
[Bug] - imod.prepare.reproject does not reproject to new grid size
@JoerivanEngelen is already working on this.
Since Sep 17, 2026.
- Dominant language
- Python
- Stars
- 41
- Forks
- 12
- Avg merge
- 21h 8m
- Merged PRs (30d)
- 1
Description
Bug description
When using imod.prepare.reproject to change to the cell size of another array, it does not regrid to the new cell size, but keeps the original cell size.
It seems to be an issue with rioxarray reproject_match as well, but xugrid - regridder does work fine.
Steps to reproduce
- What error message do you get?
- Can you create a minimum reproducible example?
rivsys = imod.idf.open(rivsyspad) <- dx, dy = 25.0
rivsys = rivsys.rio.write_crs('EPSG:28991')
bnd = imod.idf.open(bndpad) <- dx, dy = 100.0
bnd = bnd.rio.write_crs('EPSG:28991')
test = imod.prepare.reproject(bnd, like=rivsys) <- dx, dy = 100.0 (but should become 25.0)
Desktop (please complete the following information):
- OS: [e.g. Windows 11]
- iMOD Python Version 1.1.0
- Rioxarray version 0.23.0
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.