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
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.inpandsvat2etrefgrid.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
CopyFilespackage class is sufficient. Upon calling its.writemethod, it will copy files.Requirements
.writemethod, files are copied to their destinationpara_sim.inpmete_grid.inpsvat2precgrid.inpsvat2etrefgrid.inp