imod.mf6.GroundwaterFlowModel.dump#

GroundwaterFlowModel.dump(directory, modelname, validate: bool = True, mdal_compliant: bool = False, crs: Any | None = None, engine: Literal['netcdf4', 'zarr', 'zarr.zip'] = 'netcdf4') Path#

Dump simulation to files. Writes a model definition as .TOML file, which points to data for each package. Each package is stored as a separate NetCDF. Structured grids are saved as regular NetCDFs, unstructured grids are saved as UGRID NetCDF. Structured grids are always made GDAL compliant, unstructured grids can be made MDAL compliant optionally.

Parameters:
  • directory (str or Path) – directory to dump simulation into.

  • modelname (str) – modelname, will be used to create a subdirectory.

  • validate (bool, optional) – Whether to validate simulation data. Defaults to True.

  • mdal_compliant (bool, optional) – Convert data with imod.prepare.spatial.mdal_compliant_ugrid2d() to MDAL compliant unstructured grids. Defaults to False.

  • crs (Any, optional) – Anything accepted by rasterio.crs.CRS.from_user_input Requires rioxarray installed.

  • engine (str, optional) – File engine used to write packages. Options are 'netcdf4', 'zarr', and 'zarr.zip'. NetCDF4 is readable by many other softwares, for example QGIS. Zarr is optimized for big data, cloud storage and parallel access. The 'zarr.zip' option is an experimental option which creates a zipped zarr store in a single file, which is easier to copy and automatically compresses data as well. Default is 'netcdf4'.