Deltares / Deltares/imod-python

[Bug] - imod.prepare.reproject does not reproject to new grid size

Open
#1,905 3 comments 0 reactions 1 assignee View on GitHub

@JoerivanEngelen is already working on this.

Since Sep 17, 2026.

bug documentation
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

  1. What error message do you get?
  2. 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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.