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 #342 imod refactor primod update #352

Merged
merged 11 commits into from
Nov 13, 2024

Conversation

JoerivanEngelen
Copy link
Contributor

@JoerivanEngelen JoerivanEngelen commented Nov 8, 2024

Fixes #342

This PR merges the refactoring branch of MetaSWAP to main. You reviewed this work earlier.

The extra fixes I made with respect to #351 only are in the pixi.toml. What I did:

  • pin imod >=0.18.0
  • pin pandas >2.0
  • Add pandera

In #351, one test job for python 3.10 broke. This was because, pandas 2.0 is required for the ribasim test models, and for some reason, the installed pandas version was set back to 1.5 in the python 3.10 environment. I therefore forced pandas >2.0 in the pixi.toml.

Furthermore, I added pandera, as this was still missing, whereas it is quite essential in our dev environment, as ribasim python is built on top of it.

* Temporarily install imod python from feature branch for feature development

* Use Mf6Wel object instead of WellDisStructuredDis

* Drop unused "layer" coord that was causing trouble

* Set fill value to -1 for rasterio >=1.3.10

* Set dtype explicitly after imod-python update. Otherwise defaults to using the dtype of like, which is an integer. This causes problem for the fill value "nan" which the ribamod coupling depends on.
* * Provide wel at write instead of at init.
* Derive Mf6Wel package from coupler dict
* Use special method to get diskey, for future support of unstructured grids

* Update test fixture and cases

* Make sprinkling optional and improve function name.

* Also fetch MF6 packages in RibaMetaMod

* Move function to static method in a modflow mixin

* Add unittest for get_mf6_pkgs_with_coupling_dict

* Remove well arg from call to metaswap_model

* Update remove sprinkling function, as initialization of Coupling object is not necessary anymore.

* Better namespace of model mixin

* Update docstring

* Update internal variable name

* Rename ModflowMixin to MetaModMixin, and rename to get_mf6_pkgs_for_metaswap
@JoerivanEngelen JoerivanEngelen marked this pull request as ready for review November 12, 2024 14:06
@JoerivanEngelen JoerivanEngelen merged commit 18b1020 into main Nov 13, 2024
9 of 10 checks passed
@JoerivanEngelen JoerivanEngelen deleted the issue_#342_imod_refactor_primod_update branch November 13, 2024 10:54
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.

primod: Update mapping objects to update to iMOD Python's refactoring plans
2 participants