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 CopyFiles MetaSWAP package, to copy settings and lookup tables from iMOD5 projectfiles #1320

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

Comments

@JoerivanEngelen
Copy link
Contributor

JoerivanEngelen commented Dec 3, 2024

The iMOD5 projectfile contains an "EXTRA" section, with files to copy. These files usually contain settings and lookup tables for MetaSWAP, which have no direct relation to cell data.

I've seen instances where mappings to meteo grids (svat2precgrid.inp and svat2etrefgrid.inp) are copied as well, but this is dangerous as it leads to errors if the grid changes. It also is not necessary for iMOD Python, as per #1315.

Ideally, I would create MetaSwapPackage subclasses for each possible lookup table and settings file to read and write it back again, as it would allow users to parametrize MetaSWAP settings in Python. However, we don't have the necessary resources for that available and I don't see a big demand for it as is.

I think for the beta release, adding a simple CopyFiles package class is sufficient. Upon calling its .write method, it will copy files.

Requirements

  • Copy files listed under the "extra" section in the iMOD5 projectfile
  • Does not write own .inp, instead, upon calling the .write method, files are copied to their destination
  • Take list of paths, ideally store in xarray dataset, so MetaSWAP model can be dumped in the future.
  • Do not copy the following files:
    • para_sim.inp
    • mete_grid.inp
    • svat2precgrid.inp
    • svat2etrefgrid.inp
@github-project-automation github-project-automation bot moved this to 📯 New in iMOD Suite Dec 3, 2024
@JoerivanEngelen JoerivanEngelen changed the title Copy files under "EXTRA FILES" Add CopyFiles MetaSWAP package, to copy settings and lookup tables from iMOD5 projectfiles Dec 3, 2024
@JoerivanEngelen JoerivanEngelen self-assigned this Dec 3, 2024
@JoerivanEngelen JoerivanEngelen moved this from 📯 New to 🧐 In Review in iMOD Suite Dec 3, 2024
@JoerivanEngelen JoerivanEngelen changed the title Add CopyFiles MetaSWAP package, to copy settings and lookup tables from iMOD5 projectfiles Add CopyFiles MetaSWAP package, to copy settings and lookup tables from iMOD5 projectfiles Dec 3, 2024
JoerivanEngelen added a commit that referenced this issue Dec 4, 2024
Fixes #1320

# Description
The iMOD5 projectfile contains an "EXTRA" section, with files to copy.
These files usually contain settings and lookup tables for MetaSWAP,
which have no direct relation to cell data.

This PR adds CopyFiles package to copy these files.

# 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 Review to ✅ Done in iMOD Suite Dec 4, 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