Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue #964 from imod5 classmethbod DIS #981

Merged

Conversation

JoerivanEngelen
Copy link
Contributor

@JoerivanEngelen JoerivanEngelen commented Apr 23, 2024

Fixes #964

Description

Implements from_imod5 classmethod to StructuredDiscretization classmethod.

NOTE: I had to modify the default regridding method of "idomain" as the "mode" method appears to have a bug with perfectly aligned structured grids.
This bug requires further investigation. Will post an issue if found.

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

@JoerivanEngelen JoerivanEngelen changed the base branch from master to imod5_converter_feature_branch April 26, 2024 15:44
@JoerivanEngelen JoerivanEngelen marked this pull request as ready for review April 26, 2024 15:44
imod/mf6/dis.py Outdated

target_grid = get_smallest_target_grid(*data.values())

regridder_settings = cls._regrid_method
Copy link
Contributor

@luitjansl luitjansl Apr 29, 2024

Choose a reason for hiding this comment

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

make a deepcopy of cls._regrid_method to avoid changing the defaults in this assignment. This is something that must be done at more locations. probably every implementation of "get_regrid_methods"should do this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Very good catch! Implementing this elsewhere is worthy of its own issue. Created an issue for this #1000

Copy link
Contributor

@luitjansl luitjansl left a comment

Choose a reason for hiding this comment

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

looks good, some comments

@JoerivanEngelen JoerivanEngelen merged commit 72515e6 into imod5_converter_feature_branch May 1, 2024
6 of 7 checks passed
@JoerivanEngelen JoerivanEngelen deleted the issue_#964_from_imod5_dis branch May 1, 2024 07:51
luitjansl added a commit that referenced this pull request May 8, 2024
luitjansl added a commit that referenced this pull request May 8, 2024
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.

Add converter for iMOD5 Discretization package
2 participants