imod.msw.MetaSwapModel#

class imod.msw.MetaSwapModel(unsaturated_database: Path | str, settings: dict[str, Any] | None = None, starttime: str | None = None)[source]#

Contains data and writes consistent model input files

Parameters:
  • unsaturated_database (Path-like or str) – Path to the MetaSWAP soil physical database folder.

  • settings (dict)

__init__(unsaturated_database: Path | str, settings: dict[str, Any] | None = None, starttime: str | None = None)[source]#

Methods

__init__(unsaturated_database[, settings, ...])

clear()

clip_box([time_min, time_max, x_min, x_max, ...])

Clip a model by a bounding box (time, y, x).

copy()

dump(directory[, modelname, validate, ...])

Dump model packages to netCDF files and create a toml file with paths to these files.

from_file(directory, modelname)

from_imod5_data(imod5_data, target_dis, ...)

Construct a MetaSWAP model from iMOD5 data in the CAP package, loaded with the imod.formats.prj.open_projectfile_data() function.

fromkeys(iterable[, value])

get(k[,d])

get_pkgkey(pkg_type[, optional_package])

Get the package key for a package of type pkg_type.

has_key(k)

items()

keys()

mask_all_packages(mask)

This function applies a mask to all packages in a model. The mask must

pop(k[,d])

value.

popitem()

as a 2-tuple; but raise KeyError if D is empty.

regrid_like(mf6_regridded_dis[, regrid_cache])

Creates a model by regridding the packages of this model to another discretization.

setdefault(k[,d])

split(submodel_labels)

Split a MetaSWAP model in different partitions using a submodel_labels array.

update([E, ]**F)

If E present and has a .keys() method, does:

values()

write(directory, mf6_dis[, mf6_wel, validate])

Write packages and simulation settings (para_sim.inp).

Attributes

nsubunits

Get the number of subunits in the model from the first dataset having a subunit dimension.