Skip to content

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

Description

@evaschoonderwoerd

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingwaiting for authorWaiting for input from the author

    Type

    No type

    Projects

    Status
    📯 New

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions