Skip to content

Issue #1775 improve target grid#1817

Merged
JoerivanEngelen merged 6 commits intomasterfrom
issue_#1775_improve_target_grid
Apr 22, 2026
Merged

Issue #1775 improve target grid#1817
JoerivanEngelen merged 6 commits intomasterfrom
issue_#1775_improve_target_grid

Conversation

@JoerivanEngelen
Copy link
Copy Markdown
Contributor

@JoerivanEngelen JoerivanEngelen commented Apr 21, 2026

Fixes #1775

Description

Add option to regrid to target_grid and default to iMOD5 target grid if not provided.

  • Add option to specify target_grid upon importing, this saves unnecessary regridding for iMOD5 databases with inconsistent grids
  • When no target_grid is provided, choose the first BND grid, like iMOD5 did. Instead of trying to estimate the grid with the smallest extent and finest resolution from the TOP, BOT, BND. This could result in very poor performance when iMOD5 databases had grids for TOP or BOT on a very fine resolution.
  • Remove smallest targest grid utility

Checklist

  • Links to correct issue
  • Update changelog, if changes affect users
  • PR title starts with Issue #nr, e.g. Issue #737
  • Unit tests were added
  • If feature added: Added/extended example
  • If feature added: Added feature to API documentation
  • If pixi.lock was changed: Ran pixi run generate-sbom and committed changes

@JoerivanEngelen JoerivanEngelen marked this pull request as ready for review April 22, 2026 09:23
Comment thread imod/mf6/simulation.py Outdated

>>> mf6_sim["imported_model"]["ims"] = SolutionPresetSimple()

To allocate rivers differently:
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you elaborate? What is different about this? When do you use it?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have elaborated further on this and linked to the user guide on allocation of topsystems.

@Manangka
Copy link
Copy Markdown
Collaborator

In the description you say "iMOD5 databases with inconsistent grids". What are inconsistent grids and are those kind of grids common?

@JoerivanEngelen
Copy link
Copy Markdown
Contributor Author

In the description you say "iMOD5 databases with inconsistent grids". What are inconsistent grids and are those kind of grids common?

Good question, pardon my vagueness: iMOD5 only supports structured grids, but in an iMOD5 database, the grid for hydraulic conductivity can be on a 100m resolution, whereas the grid for a bottom in a database can be 25 m. iMOD5 (and iMOD Python when calling from_imod5_data) rescales all these parameters to one consistent model grid behind-the-scenes.

@sonarqubecloud
Copy link
Copy Markdown

@JoerivanEngelen JoerivanEngelen merged commit 0eb679d into master Apr 22, 2026
4 of 8 checks passed
@JoerivanEngelen JoerivanEngelen deleted the issue_#1775_improve_target_grid branch April 22, 2026 12:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] - Add user defined regridding option in functions for processing an iMOD5 prj file

2 participants