imod.mf6.StructuredDiscretization#

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

Discretization information for structered grids is specified using the file. (DIS6) Only one discretization input file (DISU6, DISV6 or DIS6) can be specified for a model. https://water.usgs.gov/water-resources/software/MODFLOW-6/mf6io_6.0.4.pdf#page=35

Parameters:
  • top (array of floats (xr.DataArray)) – is the top elevation for each cell in the top model layer.

  • bottom (array of floats (xr.DataArray)) – is the bottom elevation for each cell.

  • idomain (array of integers (xr.DataArray)) –

    Indicates the existence status of a cell as follows:

    • If 0, the cell does not exist in the simulation. Input and output values will be read and written for the cell, but internal to the program, the cell is excluded from the solution.

    • If >0, the cell exists in the simulation.

    • If <0, the cell does not exist in the simulation. Furthermore, the first existing cell above will be connected to the first existing cell below. This type of cell is referred to as a “vertical pass through” cell.

    This DataArray needs contain a "layer", "y" and "x" coordinate. Horizontal discretization information will be derived from its x and y coordinates.

  • validate ({True, False}) – Flag to indicate whether the package should be validated upon initialization. This raises a ValidationError if package input is provided in the wrong manner. Defaults to True.

__init__(top, bottom, idomain, validate: bool = True)[source]#

Methods

__init__(top, bottom, idomain[, validate])

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).

from_imod5_data(imod5_data[, ...])

Construct package from iMOD5 data, loaded with the imod.formats.prj.open_projectfile_data() function.

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[, ...])

Regrid discretization package.

render(directory, pkgname, globaltimes, binary)

sel()

to_netcdf(*args[, mdal_compliant, crs])

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

skip_variables