imod.mf6.ApiPackage#

class imod.mf6.ApiPackage(*_, **__)[source]#

The API package can be used to interact with the dll-version of Modflow (libMF6.dll). libMF6 implement the XMI api, which can be used among other things to get or set internal MF6 arrays mid-simulation. For more information, see:

https://doi.org/10.1016/j.envsoft.2021.105257 https://modflow6.readthedocs.io/en/stable/_mf6io/gwf-api.html https://modflow6.readthedocs.io/en/stable/_mf6io/gwt-api.html

Parameters:
  • maxbound (int) – The number of cells for which information will be queried or set with api calls.

  • print_input (({True, False}, optional)) – keyword to indicate that the list of constant head information will be written to the listing file immediately after it is read. Default is False.

  • print_flows (({True, False}, optional)) – Indicates that the list of constant head flow rates will be printed to the listing file for every stress period time step in which “BUDGET PRINT” is specified in Output Control. If there is no Output Control option and PRINT FLOWS is specified, then flow rates are printed for the last time step of each stress period. Default is False.

  • save_flows (({True, False}, optional)) – Indicates that constant head flow terms will be written to the file specified with “BUDGET FILEOUT” in Output Control. Default is False.

  • note:: (..) – This package can be added to both flow and transport models.

__init__(maxbound: int, print_input: bool = False, print_flows: bool = False, save_flows: bool = False, validate: bool = True)[source]#

Methods

__init__(maxbound[, print_input, ...])

cleanup(dis)

clip_box([time_min, time_max, layer_min, ...])

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

copy()

from_file(path, **kwargs)

Loads an imod mf6 package from a file (currently only netcdf and zarr are supported).

get_non_grid_data(grid_names)

This function copies the attributes of a dataset that are scalars, such as options.

get_regrid_methods()

is_clipping_supported()

is_empty()

Returns True if the package is empty- for example if it contains only no-data values.

is_grid_agnostic_package()

is_regridding_supported()

is_splitting_supported()

isel()

mask(mask)

Mask values outside of domain.

regrid_like(target_grid, regrid_cache[, ...])

Creates a package of the same type as this package, based on another discretization.

render(directory, pkgname, globaltimes, binary)

sel()

to_netcdf(*args, **kwargs)

Write dataset contents to a netCDF file.

write(pkgname, globaltimes, directory[, ...])

Write package to file

write_binary_griddata(outpath, da, dtype)

write_blockfile(pkgname, globaltimes, ...)

write_text_griddata(outpath, da, dtype)

Attributes

auxiliary_data_fields

dataset