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

Add imod.msw.MetaSwapModel.from_imod5_data #1316

Closed
Tracked by #1260
JoerivanEngelen opened this issue Dec 2, 2024 · 0 comments
Closed
Tracked by #1260

Add imod.msw.MetaSwapModel.from_imod5_data #1316

JoerivanEngelen opened this issue Dec 2, 2024 · 0 comments
Assignees

Comments

@JoerivanEngelen
Copy link
Contributor

JoerivanEngelen commented Dec 2, 2024

Requirements

  • Read existing para_sim.inp and set as simulation settings
  • Set starttime and endtime based on imod5 data
  • Initiate all packages from imod5 data
  • Allow users to define their own settings dictionary, instead of forcing hardcoded settings.
@github-project-automation github-project-automation bot moved this to 📯 New in iMOD Suite Dec 2, 2024
@JoerivanEngelen JoerivanEngelen changed the title Read para_sim.inp, adapt with iMOD5 settings and write. Do not hardcode settings in MetaSwapModel, make these editable instead. Add imod.msw.MetaSwapModel.from_imod5_data Dec 2, 2024
@JoerivanEngelen JoerivanEngelen self-assigned this Dec 3, 2024
@JoerivanEngelen JoerivanEngelen moved this from 📯 New to 🏗 In Progress in iMOD Suite Dec 3, 2024
JoerivanEngelen added a commit that referenced this issue Dec 12, 2024
Fixes #1316

# Description
Adds ``MetaSwapModel.from_imod5_data``, currently only models can be
written by turning off validation, that is still something to pick up.

- Adds ``MetaSwapModel.from_imod5_data``
- Converts ``Imod5DataDict`` TypeAlias to TypedDict, with which we can
avoid a lot of type casting.
- Add masking and broadcasting utilities for MetaSWAP iMOD5 data. I
could not easily make calls to the MODFLOW6 utilities for masking, as
these assumed presence of a layer coordinate and had logic to deal with
that, which is irrelevant for MetaSWAP.
- Adds ``MetaSwapActive`` dataclass to store masks
- Allow user-defined ``settings`` upon initialization, instead of only
supporting default settings.
- Add ``validate`` argument to ``MetaSwapModel.write`` to turn off model
validation upon writing.

# Checklist
- [x] Links to correct issue
- [x] Update changelog, if changes affect users
- [x] PR title starts with ``Issue #nr``, e.g. ``Issue #737``
- [x] Unit tests were added
- [ ] **If feature added**: Added/extended example
@github-project-automation github-project-automation bot moved this from 🏗 In Progress to ✅ Done in iMOD Suite Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ✅ Done
Development

No branches or pull requests

1 participant