imod.wq - Create Water Quality model

Create Water Quality model.

Create an imod.wq.SeawatModel and add desired packages to the model (e.g. imod.wq.Well, imod.wq.Dispersion). See Examples and Model for workflow documentation.

class imod.wq.AdvectionFiniteDifference(courant=0.75, weighting='upstream')[source]

Bases: xarray.core.common.DataWithCoords, xarray.core.arithmetic.DatasetArithmetic, Mapping

Solve the advection term using the explicit Finite Difference method (MIXELM = 0) with upstream weighting

courant

Courant number (PERCEL) is the number of cells (or a fraction of a cell) advection will be allowed in any direction in one transport step. For implicit finite-difference or particle tracking based schemes, there is no limit on PERCEL, but for accuracy reasons, it is generally not set much greater than one. Note, however, that the PERCEL limit is checked over the entire model grid. Thus, even if PERCEL > 1, advection may not be more than one cell’s length at most model locations. For the explicit finite-difference, PERCEL is also a stability constraint, which must not exceed one and will be automatically reset to one if a value greater than one is specified.

Type

float

weighting

Indication of which weighting scheme should be used, set to default value “upstream” (NADVFD = 0 or 1) Default value: “upstream”

Type

string {“upstream”, “central”}, optional

all(dim=None, **kwargs)

Reduce this AdvectionFiniteDifference’s data by applying all along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply all. By default all is applied over all dimensions.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating all on this object’s data.

Returns

reduced – New AdvectionFiniteDifference object with all applied to its data and the indicated dimension(s) removed.

Return type

AdvectionFiniteDifference

any(dim=None, **kwargs)

Reduce this AdvectionFiniteDifference’s data by applying any along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply any. By default any is applied over all dimensions.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating any on this object’s data.

Returns

reduced – New AdvectionFiniteDifference object with any applied to its data and the indicated dimension(s) removed.

Return type

AdvectionFiniteDifference

count(dim=None, **kwargs)

Reduce this AdvectionFiniteDifference’s data by applying count along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply count. By default count is applied over all dimensions.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating count on this object’s data.

Returns

reduced – New AdvectionFiniteDifference object with count applied to its data and the indicated dimension(s) removed.

Return type

AdvectionFiniteDifference

courant
cumprod(dim=None, skipna=None, **kwargs)

Apply cumprod along some dimension of AdvectionFiniteDifference.

Parameters
  • dim (str or sequence of str, optional) – Dimension over which to apply cumprod.

  • axis (int or sequence of int, optional) – Axis over which to apply cumprod. Only one of the ‘dim’ and ‘axis’ arguments can be supplied.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to cumprod.

Returns

cumvalue – New AdvectionFiniteDifference object with cumprod applied to its data along the indicated dimension.

Return type

AdvectionFiniteDifference

cumsum(dim=None, skipna=None, **kwargs)

Apply cumsum along some dimension of AdvectionFiniteDifference.

Parameters
  • dim (str or sequence of str, optional) – Dimension over which to apply cumsum.

  • axis (int or sequence of int, optional) – Axis over which to apply cumsum. Only one of the ‘dim’ and ‘axis’ arguments can be supplied.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to cumsum.

Returns

cumvalue – New AdvectionFiniteDifference object with cumsum applied to its data along the indicated dimension.

Return type

AdvectionFiniteDifference

max(dim=None, skipna=None, **kwargs)

Reduce this AdvectionFiniteDifference’s data by applying max along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply max. By default max is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating max on this object’s data.

Returns

reduced – New AdvectionFiniteDifference object with max applied to its data and the indicated dimension(s) removed.

Return type

AdvectionFiniteDifference

mean(dim=None, skipna=None, **kwargs)

Reduce this AdvectionFiniteDifference’s data by applying mean along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply mean. By default mean is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating mean on this object’s data.

Returns

reduced – New AdvectionFiniteDifference object with mean applied to its data and the indicated dimension(s) removed.

Return type

AdvectionFiniteDifference

median(dim=None, skipna=None, **kwargs)

Reduce this AdvectionFiniteDifference’s data by applying median along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply median. By default median is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating median on this object’s data.

Returns

reduced – New AdvectionFiniteDifference object with median applied to its data and the indicated dimension(s) removed.

Return type

AdvectionFiniteDifference

min(dim=None, skipna=None, **kwargs)

Reduce this AdvectionFiniteDifference’s data by applying min along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply min. By default min is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating min on this object’s data.

Returns

reduced – New AdvectionFiniteDifference object with min applied to its data and the indicated dimension(s) removed.

Return type

AdvectionFiniteDifference

prod(dim=None, skipna=None, **kwargs)

Reduce this AdvectionFiniteDifference’s data by applying prod along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply prod. By default prod is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • min_count (int, default: None) – The required number of valid values to perform the operation. If fewer than min_count non-NA values are present the result will be NA. Only used if skipna is set to True or defaults to True for the array’s dtype. New in version 0.10.8: Added with the default being None. Changed in version 0.17.0: if specified on an integer array and skipna=True, the result will be a float array.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating prod on this object’s data.

Returns

reduced – New AdvectionFiniteDifference object with prod applied to its data and the indicated dimension(s) removed.

Return type

AdvectionFiniteDifference

std(dim=None, skipna=None, **kwargs)

Reduce this AdvectionFiniteDifference’s data by applying std along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply std. By default std is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating std on this object’s data.

Returns

reduced – New AdvectionFiniteDifference object with std applied to its data and the indicated dimension(s) removed.

Return type

AdvectionFiniteDifference

sum(dim=None, skipna=None, **kwargs)

Reduce this AdvectionFiniteDifference’s data by applying sum along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply sum. By default sum is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • min_count (int, default: None) – The required number of valid values to perform the operation. If fewer than min_count non-NA values are present the result will be NA. Only used if skipna is set to True or defaults to True for the array’s dtype. New in version 0.10.8: Added with the default being None. Changed in version 0.17.0: if specified on an integer array and skipna=True, the result will be a float array.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating sum on this object’s data.

Returns

reduced – New AdvectionFiniteDifference object with sum applied to its data and the indicated dimension(s) removed.

Return type

AdvectionFiniteDifference

var(dim=None, skipna=None, **kwargs)

Reduce this AdvectionFiniteDifference’s data by applying var along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply var. By default var is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating var on this object’s data.

Returns

reduced – New AdvectionFiniteDifference object with var applied to its data and the indicated dimension(s) removed.

Return type

AdvectionFiniteDifference

weighting
class imod.wq.AdvectionHybridMOC(courant=0.75, tracking='hybrid', weighting_factor=0.5, dconcentration_epsilon=1e-05, nplane=2, nparticles_no_advection=10, nparticles_advection=40, cell_min_nparticles=5, cell_max_nparticles=80, sink_particle_placement=2, sink_nparticles=40, dconcentration_hybrid=0.0001)[source]

Bases: xarray.core.common.DataWithCoords, xarray.core.arithmetic.DatasetArithmetic, Mapping

Hybrid Method of Characteristics and Modified Method of Characteristics with MOC or MMOC automatically and dynamically selected (MIXELM = 3)

courant

Courant number (PERCEL) is the number of cells (or a fraction of a cell) advection will be allowed in any direction in one transport step. For implicit finite-difference or particle tracking based schemes, there is no limit on PERCEL, but for accuracy reasons, it is generally not set much greater than one. Note, however, that the PERCEL limit is checked over the entire model grid. Thus, even if PERCEL > 1, advection may not be more than one cell’s length at most model locations. For the explicit finite-difference, PERCEL is also a stability constraint, which must not exceed one and will be automatically reset to one if a value greater than one is specified.

Type

float

max_particles

is the maximum total number of moving particles allowed (MXPART).

Type

int

tracking

indicates which particle tracking algorithm is selected for the Eulerian-Lagrangian methods. ITRACK = 1, the first-order Euler algorithm is used; ITRACK = 2, the fourth-order Runge-Kutta algorithm is used; this option is computationally demanding and may be needed only when PERCEL is set greater than one. ITRACK = 3, the hybrid 1st and 4th order algorithm is used; the Runge- Kutta algorithm is used in sink/source cells and the cells next to sinks/sources while the Euler algorithm is used elsewhere.

Type

int

weighting_factor

is a concentration weighting factor (WD) between 0.5 and 1. It is used for operator splitting in the particle tracking based methods. The value of 0.5 is generally adequate. The value may be adjusted to achieve better mass balance. Generally, it can be increased toward 1.0 as advection becomes more dominant.

Type

float

dceps

is a small Relative Cell Concentration Gradient below which advective transport is considered negligible. A value around 10-5 is generally adequate.

Type

float

nplane

is a flag indicating whether the random or fixed pattern is selected for initial placement of moving particles. NPLANE = 0, the random pattern is selected for initial placement. Particles are distributed randomly in both the horizontal and vertical directions by calling a random number generator. This option is usually preferred and leads to smaller mass balance discrepancy in nonuniform or diverging/converging flow fields. NPLANE > 0, the fixed pattern is selected for initial placement. The value of NPLANE serves as the number of vertical “planes” on which initial particles are placed within each cell block. The fixed pattern may work better than the random pattern only in relatively uniform flow fields. For two-dimensional simulations in plan view, set NPLANE = 1. For cross sectional or three-dimensional simulations, NPLANE = 2 is normally adequate. Increase NPLANE if more resolution in the vertical direction is desired.

Type

int

npl

is number of initial particles per cell to be placed at cells where the Relative Cell Concentration Gradient is less than or equal to DCEPS. Generally, NPL can be set to zero since advection is considered insignificant when the Relative Cell Concentration Gradient is less than or equal to DCEPS. Setting NPL equal to NPH causes a uniform number of particles to be placed in every cell over the entire grid (i.e., the uniform approach).

Type

int

nph

is number of initial particles per cell to be placed at cells where the Relative Cell Concentration Gradient is greater than DCEPS. The selection of NPH depends on the nature of the flow field and also the computer memory limitation. Generally, use a smaller number in relatively uniform flow fields and a larger number in relatively nonuniform flow fields. However, values exceeding 16 in twodimensional simulation or 32 in three-dimensional simulation are rarely necessary. If the random pattern is chosen, NPH particles are randomly distributed within the cell block. If the fixed pattern is chosen, NPH is divided by NPLANE to yield the number of particles to be placed per vertical plane.

Type

int

npmin

is the minimum number of particles allowed per cell. If the number of particles in a cell at the end of a transport step is fewer than NPMIN, new particles are inserted into that cell to maintain a sufficient number of particles. NPMIN can be set to zero in relatively uniform flow fields, and a number greater than zero in diverging/converging flow fields. Generally, a value between zero and four is adequate.

Type

int

npmax

is the maximum number of particles allowed per cell. If the number of particles in a cell exceeds NPMAX, all particles are removed from that cell and replaced by a new set of particles equal to NPH to maintain mass balance. Generally, NPMAX can be set to approximately twice of NPH.

Type

int

dchmoc

is the critical Relative Concentration Gradient for controlling the selective use of either MOC or MMOC in the HMOC solution scheme. The MOC solution is selected at cells where the Relative Concentration Gradient is greater than DCHMOC; The MMOC solution is selected at cells where the Relative Concentration Gradient is less than or equal to DCHMOC

Type

real

all(dim=None, **kwargs)

Reduce this AdvectionHybridMOC’s data by applying all along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply all. By default all is applied over all dimensions.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating all on this object’s data.

Returns

reduced – New AdvectionHybridMOC object with all applied to its data and the indicated dimension(s) removed.

Return type

AdvectionHybridMOC

any(dim=None, **kwargs)

Reduce this AdvectionHybridMOC’s data by applying any along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply any. By default any is applied over all dimensions.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating any on this object’s data.

Returns

reduced – New AdvectionHybridMOC object with any applied to its data and the indicated dimension(s) removed.

Return type

AdvectionHybridMOC

cell_max_nparticles
cell_min_nparticles
count(dim=None, **kwargs)

Reduce this AdvectionHybridMOC’s data by applying count along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply count. By default count is applied over all dimensions.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating count on this object’s data.

Returns

reduced – New AdvectionHybridMOC object with count applied to its data and the indicated dimension(s) removed.

Return type

AdvectionHybridMOC

courant
cumprod(dim=None, skipna=None, **kwargs)

Apply cumprod along some dimension of AdvectionHybridMOC.

Parameters
  • dim (str or sequence of str, optional) – Dimension over which to apply cumprod.

  • axis (int or sequence of int, optional) – Axis over which to apply cumprod. Only one of the ‘dim’ and ‘axis’ arguments can be supplied.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to cumprod.

Returns

cumvalue – New AdvectionHybridMOC object with cumprod applied to its data along the indicated dimension.

Return type

AdvectionHybridMOC

cumsum(dim=None, skipna=None, **kwargs)

Apply cumsum along some dimension of AdvectionHybridMOC.

Parameters
  • dim (str or sequence of str, optional) – Dimension over which to apply cumsum.

  • axis (int or sequence of int, optional) – Axis over which to apply cumsum. Only one of the ‘dim’ and ‘axis’ arguments can be supplied.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to cumsum.

Returns

cumvalue – New AdvectionHybridMOC object with cumsum applied to its data along the indicated dimension.

Return type

AdvectionHybridMOC

dconcentration_epsilon
dconcentration_hybrid
max(dim=None, skipna=None, **kwargs)

Reduce this AdvectionHybridMOC’s data by applying max along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply max. By default max is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating max on this object’s data.

Returns

reduced – New AdvectionHybridMOC object with max applied to its data and the indicated dimension(s) removed.

Return type

AdvectionHybridMOC

mean(dim=None, skipna=None, **kwargs)

Reduce this AdvectionHybridMOC’s data by applying mean along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply mean. By default mean is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating mean on this object’s data.

Returns

reduced – New AdvectionHybridMOC object with mean applied to its data and the indicated dimension(s) removed.

Return type

AdvectionHybridMOC

median(dim=None, skipna=None, **kwargs)

Reduce this AdvectionHybridMOC’s data by applying median along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply median. By default median is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating median on this object’s data.

Returns

reduced – New AdvectionHybridMOC object with median applied to its data and the indicated dimension(s) removed.

Return type

AdvectionHybridMOC

min(dim=None, skipna=None, **kwargs)

Reduce this AdvectionHybridMOC’s data by applying min along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply min. By default min is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating min on this object’s data.

Returns

reduced – New AdvectionHybridMOC object with min applied to its data and the indicated dimension(s) removed.

Return type

AdvectionHybridMOC

nparticles_advection
nparticles_no_advection
nplane
prod(dim=None, skipna=None, **kwargs)

Reduce this AdvectionHybridMOC’s data by applying prod along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply prod. By default prod is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • min_count (int, default: None) – The required number of valid values to perform the operation. If fewer than min_count non-NA values are present the result will be NA. Only used if skipna is set to True or defaults to True for the array’s dtype. New in version 0.10.8: Added with the default being None. Changed in version 0.17.0: if specified on an integer array and skipna=True, the result will be a float array.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating prod on this object’s data.

Returns

reduced – New AdvectionHybridMOC object with prod applied to its data and the indicated dimension(s) removed.

Return type

AdvectionHybridMOC

sink_nparticles
sink_particle_placement
std(dim=None, skipna=None, **kwargs)

Reduce this AdvectionHybridMOC’s data by applying std along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply std. By default std is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating std on this object’s data.

Returns

reduced – New AdvectionHybridMOC object with std applied to its data and the indicated dimension(s) removed.

Return type

AdvectionHybridMOC

sum(dim=None, skipna=None, **kwargs)

Reduce this AdvectionHybridMOC’s data by applying sum along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply sum. By default sum is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • min_count (int, default: None) – The required number of valid values to perform the operation. If fewer than min_count non-NA values are present the result will be NA. Only used if skipna is set to True or defaults to True for the array’s dtype. New in version 0.10.8: Added with the default being None. Changed in version 0.17.0: if specified on an integer array and skipna=True, the result will be a float array.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating sum on this object’s data.

Returns

reduced – New AdvectionHybridMOC object with sum applied to its data and the indicated dimension(s) removed.

Return type

AdvectionHybridMOC

tracking
var(dim=None, skipna=None, **kwargs)

Reduce this AdvectionHybridMOC’s data by applying var along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply var. By default var is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating var on this object’s data.

Returns

reduced – New AdvectionHybridMOC object with var applied to its data and the indicated dimension(s) removed.

Return type

AdvectionHybridMOC

weighting_factor
class imod.wq.AdvectionMOC(courant=0.75, tracking='hybrid', weighting_factor=0.5, dconcentration_epsilon=1e-05, nplane=2, nparticles_no_advection=10, nparticles_advection=40, cell_min_nparticles=5, cell_max_nparticles=80)[source]

Bases: xarray.core.common.DataWithCoords, xarray.core.arithmetic.DatasetArithmetic, Mapping

Solve the advection term using the Method of Characteristics (MIXELM = 1)

Nota bene: number of particles settings have not been tested. The defaults here are chosen conservatively, with many particles. This increases both memory usage and computational effort.

courant

Courant number (PERCEL) is the number of cells (or a fraction of a cell) advection will be allowed in any direction in one transport step. For implicit finite-difference or particle tracking based schemes, there is no limit on PERCEL, but for accuracy reasons, it is generally not set much greater than one. Note, however, that the PERCEL limit is checked over the entire model grid. Thus, even if PERCEL > 1, advection may not be more than one cell’s length at most model locations. For the explicit finite-difference, PERCEL is also a stability constraint, which must not exceed one and will be automatically reset to one if a value greater than one is specified.

Type

float

max_nparticles

is the maximum total number of moving particles allowed (MXPART).

Type

int

tracking

indicates which particle tracking algorithm is selected for the Eulerian-Lagrangian methods. ITRACK = 1, the first-order Euler algorithm is used; ITRACK = 2, the fourth-order Runge-Kutta algorithm is used; this option is computationally demanding and may be needed only when PERCEL is set greater than one. ITRACK = 3, the hybrid 1st and 4th order algorithm is used; the Runge- Kutta algorithm is used in sink/source cells and the cells next to sinks/sources while the Euler algorithm is used elsewhere. Default value is “hybrid”.

Type

string {“euler”, “runge-kutta”, “hybrid”}, optional

weighting_factor

is a concentration weighting factor (WD) between 0.5 and 1. It is used for operator splitting in the particle tracking based methods. The value of 0.5 is generally adequate. The value may be adjusted to achieve better mass balance. Generally, it can be increased toward 1.0 as advection becomes more dominant. Default value: 0.5.

Type

float, optional

dconcentration_epsilon

is a small Relative Cell Concentration Gradient below which advective transport is considered negligible. A value around 10-5 is generally adequate. Default value: 1.0e-5.

Type

float, optional

nplane

is a flag indicating whether the random or fixed pattern is selected for initial placement of moving particles. NPLANE = 0, the random pattern is selected for initial placement. Particles are distributed randomly in both the horizontal and vertical directions by calling a random number generator. This option is usually preferred and leads to smaller mass balance discrepancy in nonuniform or diverging/converging flow fields. NPLANE > 0, the fixed pattern is selected for initial placement. The value of NPLANE serves as the number of vertical “planes” on which initial particles are placed within each cell block. The fixed pattern may work better than the random pattern only in relatively uniform flow fields. For two-dimensional simulations in plan view, set NPLANE = 1. For cross sectional or three-dimensional simulations, NPLANE = 2 is normally adequate. Increase NPLANE if more resolution in the vertical direction is desired. Default value: 2.

Type

int, optional

nparticles_no_advection

is number of initial particles per cell to be placed at cells where the Relative Cell Concentration Gradient is less than or equal to DCEPS. Generally, NPL can be set to zero since advection is considered insignificant when the Relative Cell Concentration Gradient is less than or equal to DCEPS. Setting NPL equal to NPH causes a uniform number of particles to be placed in every cell over the entire grid (i.e., the uniform approach). Default value: 10.

Type

int, optional

nparticles_advection

is number of initial particles per cell to be placed at cells where the Relative Cell Concentration Gradient is greater than DCEPS. The selection of NPH depends on the nature of the flow field and also the computer memory limitation. Generally, use a smaller number in relatively uniform flow fields and a larger number in relatively nonuniform flow fields. However, values exceeding 16 in twodimensional simulation or 32 in three-dimensional simulation are rarely necessary. If the random pattern is chosen, NPH particles are randomly distributed within the cell block. If the fixed pattern is chosen, NPH is divided by NPLANE to yield the number of particles to be placed per vertical plane. Default value: 40.

Type

int, optional

cell_min_nparticles

is the minimum number of particles allowed per cell. If the number of particles in a cell at the end of a transport step is fewer than NPMIN, new particles are inserted into that cell to maintain a sufficient number of particles. NPMIN can be set to zero in relatively uniform flow fields, and a number greater than zero in diverging/converging flow fields. Generally, a value between zero and four is adequate. Default value is 5.

Type

int, optional

cell_max_nparticles

is the maximum number of particles allowed per cell. If the number of particles in a cell exceeds NPMAX, all particles are removed from that cell and replaced by a new set of particles equal to NPH to maintain mass balance. Generally, NPMAX can be set to approximately twice of NPH. Default value: 80.

Type

int, optional

all(dim=None, **kwargs)

Reduce this AdvectionMOC’s data by applying all along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply all. By default all is applied over all dimensions.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating all on this object’s data.

Returns

reduced – New AdvectionMOC object with all applied to its data and the indicated dimension(s) removed.

Return type

AdvectionMOC

any(dim=None, **kwargs)

Reduce this AdvectionMOC’s data by applying any along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply any. By default any is applied over all dimensions.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating any on this object’s data.

Returns

reduced – New AdvectionMOC object with any applied to its data and the indicated dimension(s) removed.

Return type

AdvectionMOC

cell_max_nparticles
cell_min_nparticles
count(dim=None, **kwargs)

Reduce this AdvectionMOC’s data by applying count along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply count. By default count is applied over all dimensions.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating count on this object’s data.

Returns

reduced – New AdvectionMOC object with count applied to its data and the indicated dimension(s) removed.

Return type

AdvectionMOC

courant
cumprod(dim=None, skipna=None, **kwargs)

Apply cumprod along some dimension of AdvectionMOC.

Parameters
  • dim (str or sequence of str, optional) – Dimension over which to apply cumprod.

  • axis (int or sequence of int, optional) – Axis over which to apply cumprod. Only one of the ‘dim’ and ‘axis’ arguments can be supplied.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to cumprod.

Returns

cumvalue – New AdvectionMOC object with cumprod applied to its data along the indicated dimension.

Return type

AdvectionMOC

cumsum(dim=None, skipna=None, **kwargs)

Apply cumsum along some dimension of AdvectionMOC.

Parameters
  • dim (str or sequence of str, optional) – Dimension over which to apply cumsum.

  • axis (int or sequence of int, optional) – Axis over which to apply cumsum. Only one of the ‘dim’ and ‘axis’ arguments can be supplied.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to cumsum.

Returns

cumvalue – New AdvectionMOC object with cumsum applied to its data along the indicated dimension.

Return type

AdvectionMOC

dconcentration_epsilon
max(dim=None, skipna=None, **kwargs)

Reduce this AdvectionMOC’s data by applying max along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply max. By default max is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating max on this object’s data.

Returns

reduced – New AdvectionMOC object with max applied to its data and the indicated dimension(s) removed.

Return type

AdvectionMOC

mean(dim=None, skipna=None, **kwargs)

Reduce this AdvectionMOC’s data by applying mean along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply mean. By default mean is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating mean on this object’s data.

Returns

reduced – New AdvectionMOC object with mean applied to its data and the indicated dimension(s) removed.

Return type

AdvectionMOC

median(dim=None, skipna=None, **kwargs)

Reduce this AdvectionMOC’s data by applying median along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply median. By default median is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating median on this object’s data.

Returns

reduced – New AdvectionMOC object with median applied to its data and the indicated dimension(s) removed.

Return type

AdvectionMOC

min(dim=None, skipna=None, **kwargs)

Reduce this AdvectionMOC’s data by applying min along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply min. By default min is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating min on this object’s data.

Returns

reduced – New AdvectionMOC object with min applied to its data and the indicated dimension(s) removed.

Return type

AdvectionMOC

nparticles_advection
nparticles_no_advection
nplane
prod(dim=None, skipna=None, **kwargs)

Reduce this AdvectionMOC’s data by applying prod along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply prod. By default prod is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • min_count (int, default: None) – The required number of valid values to perform the operation. If fewer than min_count non-NA values are present the result will be NA. Only used if skipna is set to True or defaults to True for the array’s dtype. New in version 0.10.8: Added with the default being None. Changed in version 0.17.0: if specified on an integer array and skipna=True, the result will be a float array.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating prod on this object’s data.

Returns

reduced – New AdvectionMOC object with prod applied to its data and the indicated dimension(s) removed.

Return type

AdvectionMOC

std(dim=None, skipna=None, **kwargs)

Reduce this AdvectionMOC’s data by applying std along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply std. By default std is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating std on this object’s data.

Returns

reduced – New AdvectionMOC object with std applied to its data and the indicated dimension(s) removed.

Return type

AdvectionMOC

sum(dim=None, skipna=None, **kwargs)

Reduce this AdvectionMOC’s data by applying sum along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply sum. By default sum is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • min_count (int, default: None) – The required number of valid values to perform the operation. If fewer than min_count non-NA values are present the result will be NA. Only used if skipna is set to True or defaults to True for the array’s dtype. New in version 0.10.8: Added with the default being None. Changed in version 0.17.0: if specified on an integer array and skipna=True, the result will be a float array.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating sum on this object’s data.

Returns

reduced – New AdvectionMOC object with sum applied to its data and the indicated dimension(s) removed.

Return type

AdvectionMOC

tracking
var(dim=None, skipna=None, **kwargs)

Reduce this AdvectionMOC’s data by applying var along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply var. By default var is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating var on this object’s data.

Returns

reduced – New AdvectionMOC object with var applied to its data and the indicated dimension(s) removed.

Return type

AdvectionMOC

weighting_factor
class imod.wq.AdvectionModifiedMOC(courant=1.0, tracking='hybrid', weighting_factor=0.5, dconcentration_epsilon=1e-05, sink_particle_placement=2, sink_nparticles=40)[source]

Bases: xarray.core.common.DataWithCoords, xarray.core.arithmetic.DatasetArithmetic, Mapping

Solve the advention term using the Modified Method of Characteristics (MIXELM = 2) Courant number (PERCEL) is the number of cells (or a fraction of a cell) advection will be allowed in any direction in one transport step.

courant

Courant number (PERCEL) is the number of cells (or a fraction of a cell) advection will be allowed in any direction in one transport step. For implicit finite-difference or particle tracking based schemes, there is no limit on PERCEL, but for accuracy reasons, it is generally not set much greater than one. Note, however, that the PERCEL limit is checked over the entire model grid. Thus, even if PERCEL > 1, advection may not be more than one cell’s length at most model locations. For the explicit finite-difference, PERCEL is also a stability constraint, which must not exceed one and will be automatically reset to one if a value greater than one is specified.

Type

float

tracking

indicates which particle tracking algorithm is selected for the Eulerian-Lagrangian methods. ITRACK = 1, the first-order Euler algorithm is used; ITRACK = 2, the fourth-order Runge-Kutta algorithm is used; this option is computationally demanding and may be needed only when PERCEL is set greater than one. ITRACK = 3, the hybrid 1st and 4th order algorithm is used; the Runge- Kutta algorithm is used in sink/source cells and the cells next to sinks/sources while the Euler algorithm is used elsewhere.

Type

string, {“euler”, “runge-kutta”, “hybrid”}

weighting_factor

is a concentration weighting factor (WD) between 0.5 and 1. It is used for operator splitting in the particle tracking based methods. The value of 0.5 is generally adequate. The value may be adjusted to achieve better mass balance. Generally, it can be increased toward 1.0 as advection becomes more dominant.

Type

float

dconcentration_epsilon

is a small Relative Cell Concentration Gradient (DCEPS) below which advective transport is considered negligible. A value around 1.0e-5 is generally adequate. Default value: 1.0e-5.

Type

float, optional

sink_particle_placement

indicates whether the random or fixed pattern is selected for initial placement of particles to approximate sink cells in the MMOC scheme. (NLSINK)

Type

int

sink_nparticles

is the number of particles used to approximate sink cells in the MMOC scheme. (NPSINK)

Type

int

all(dim=None, **kwargs)

Reduce this AdvectionModifiedMOC’s data by applying all along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply all. By default all is applied over all dimensions.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating all on this object’s data.

Returns

reduced – New AdvectionModifiedMOC object with all applied to its data and the indicated dimension(s) removed.

Return type

AdvectionModifiedMOC

any(dim=None, **kwargs)

Reduce this AdvectionModifiedMOC’s data by applying any along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply any. By default any is applied over all dimensions.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating any on this object’s data.

Returns

reduced – New AdvectionModifiedMOC object with any applied to its data and the indicated dimension(s) removed.

Return type

AdvectionModifiedMOC

count(dim=None, **kwargs)

Reduce this AdvectionModifiedMOC’s data by applying count along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply count. By default count is applied over all dimensions.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating count on this object’s data.

Returns

reduced – New AdvectionModifiedMOC object with count applied to its data and the indicated dimension(s) removed.

Return type

AdvectionModifiedMOC

courant
cumprod(dim=None, skipna=None, **kwargs)

Apply cumprod along some dimension of AdvectionModifiedMOC.

Parameters
  • dim (str or sequence of str, optional) – Dimension over which to apply cumprod.

  • axis (int or sequence of int, optional) – Axis over which to apply cumprod. Only one of the ‘dim’ and ‘axis’ arguments can be supplied.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to cumprod.

Returns

cumvalue – New AdvectionModifiedMOC object with cumprod applied to its data along the indicated dimension.

Return type

AdvectionModifiedMOC

cumsum(dim=None, skipna=None, **kwargs)

Apply cumsum along some dimension of AdvectionModifiedMOC.

Parameters
  • dim (str or sequence of str, optional) – Dimension over which to apply cumsum.

  • axis (int or sequence of int, optional) – Axis over which to apply cumsum. Only one of the ‘dim’ and ‘axis’ arguments can be supplied.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to cumsum.

Returns

cumvalue – New AdvectionModifiedMOC object with cumsum applied to its data along the indicated dimension.

Return type

AdvectionModifiedMOC

dconcentration_epsilon
max(dim=None, skipna=None, **kwargs)

Reduce this AdvectionModifiedMOC’s data by applying max along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply max. By default max is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating max on this object’s data.

Returns

reduced – New AdvectionModifiedMOC object with max applied to its data and the indicated dimension(s) removed.

Return type

AdvectionModifiedMOC

mean(dim=None, skipna=None, **kwargs)

Reduce this AdvectionModifiedMOC’s data by applying mean along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply mean. By default mean is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating mean on this object’s data.

Returns

reduced – New AdvectionModifiedMOC object with mean applied to its data and the indicated dimension(s) removed.

Return type

AdvectionModifiedMOC

median(dim=None, skipna=None, **kwargs)

Reduce this AdvectionModifiedMOC’s data by applying median along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply median. By default median is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating median on this object’s data.

Returns

reduced – New AdvectionModifiedMOC object with median applied to its data and the indicated dimension(s) removed.

Return type

AdvectionModifiedMOC

min(dim=None, skipna=None, **kwargs)

Reduce this AdvectionModifiedMOC’s data by applying min along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply min. By default min is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating min on this object’s data.

Returns

reduced – New AdvectionModifiedMOC object with min applied to its data and the indicated dimension(s) removed.

Return type

AdvectionModifiedMOC

prod(dim=None, skipna=None, **kwargs)

Reduce this AdvectionModifiedMOC’s data by applying prod along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply prod. By default prod is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • min_count (int, default: None) – The required number of valid values to perform the operation. If fewer than min_count non-NA values are present the result will be NA. Only used if skipna is set to True or defaults to True for the array’s dtype. New in version 0.10.8: Added with the default being None. Changed in version 0.17.0: if specified on an integer array and skipna=True, the result will be a float array.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating prod on this object’s data.

Returns

reduced – New AdvectionModifiedMOC object with prod applied to its data and the indicated dimension(s) removed.

Return type

AdvectionModifiedMOC

sink_nparticles
sink_particle_placement
std(dim=None, skipna=None, **kwargs)

Reduce this AdvectionModifiedMOC’s data by applying std along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply std. By default std is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating std on this object’s data.

Returns

reduced – New AdvectionModifiedMOC object with std applied to its data and the indicated dimension(s) removed.

Return type

AdvectionModifiedMOC

sum(dim=None, skipna=None, **kwargs)

Reduce this AdvectionModifiedMOC’s data by applying sum along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply sum. By default sum is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • min_count (int, default: None) – The required number of valid values to perform the operation. If fewer than min_count non-NA values are present the result will be NA. Only used if skipna is set to True or defaults to True for the array’s dtype. New in version 0.10.8: Added with the default being None. Changed in version 0.17.0: if specified on an integer array and skipna=True, the result will be a float array.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating sum on this object’s data.

Returns

reduced – New AdvectionModifiedMOC object with sum applied to its data and the indicated dimension(s) removed.

Return type

AdvectionModifiedMOC

tracking
var(dim=None, skipna=None, **kwargs)

Reduce this AdvectionModifiedMOC’s data by applying var along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply var. By default var is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating var on this object’s data.

Returns

reduced – New AdvectionModifiedMOC object with var applied to its data and the indicated dimension(s) removed.

Return type

AdvectionModifiedMOC

weighting_factor
class imod.wq.AdvectionTVD(courant=0.75)[source]

Bases: xarray.core.common.DataWithCoords, xarray.core.arithmetic.DatasetArithmetic, Mapping

Total Variation Diminishing (TVD) formulation (ULTIMATE, MIXELM = -1).

courant

Courant number (PERCEL) is the number of cells (or a fraction of a cell) advection will be allowed in any direction in one transport step. For implicit finite-difference or particle tracking based schemes, there is no limit on PERCEL, but for accuracy reasons, it is generally not set much greater than one. Note, however, that the PERCEL limit is checked over the entire model grid. Thus, even if PERCEL > 1, advection may not be more than one cell’s length at most model locations. For the explicit finite-difference, PERCEL is also a stability constraint, which must not exceed one and will be automatically reset to one if a value greater than one is specified.

Type

float

all(dim=None, **kwargs)

Reduce this AdvectionTVD’s data by applying all along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply all. By default all is applied over all dimensions.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating all on this object’s data.

Returns

reduced – New AdvectionTVD object with all applied to its data and the indicated dimension(s) removed.

Return type

AdvectionTVD

any(dim=None, **kwargs)

Reduce this AdvectionTVD’s data by applying any along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply any. By default any is applied over all dimensions.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating any on this object’s data.

Returns

reduced – New AdvectionTVD object with any applied to its data and the indicated dimension(s) removed.

Return type

AdvectionTVD

count(dim=None, **kwargs)

Reduce this AdvectionTVD’s data by applying count along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply count. By default count is applied over all dimensions.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating count on this object’s data.

Returns

reduced – New AdvectionTVD object with count applied to its data and the indicated dimension(s) removed.

Return type

AdvectionTVD

courant
cumprod(dim=None, skipna=None, **kwargs)

Apply cumprod along some dimension of AdvectionTVD.

Parameters
  • dim (str or sequence of str, optional) – Dimension over which to apply cumprod.

  • axis (int or sequence of int, optional) – Axis over which to apply cumprod. Only one of the ‘dim’ and ‘axis’ arguments can be supplied.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to cumprod.

Returns

cumvalue – New AdvectionTVD object with cumprod applied to its data along the indicated dimension.

Return type

AdvectionTVD

cumsum(dim=None, skipna=None, **kwargs)

Apply cumsum along some dimension of AdvectionTVD.

Parameters
  • dim (str or sequence of str, optional) – Dimension over which to apply cumsum.

  • axis (int or sequence of int, optional) – Axis over which to apply cumsum. Only one of the ‘dim’ and ‘axis’ arguments can be supplied.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to cumsum.

Returns

cumvalue – New AdvectionTVD object with cumsum applied to its data along the indicated dimension.

Return type

AdvectionTVD

max(dim=None, skipna=None, **kwargs)

Reduce this AdvectionTVD’s data by applying max along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply max. By default max is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating max on this object’s data.

Returns

reduced – New AdvectionTVD object with max applied to its data and the indicated dimension(s) removed.

Return type

AdvectionTVD

mean(dim=None, skipna=None, **kwargs)

Reduce this AdvectionTVD’s data by applying mean along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply mean. By default mean is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating mean on this object’s data.

Returns

reduced – New AdvectionTVD object with mean applied to its data and the indicated dimension(s) removed.

Return type

AdvectionTVD

median(dim=None, skipna=None, **kwargs)

Reduce this AdvectionTVD’s data by applying median along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply median. By default median is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating median on this object’s data.

Returns

reduced – New AdvectionTVD object with median applied to its data and the indicated dimension(s) removed.

Return type

AdvectionTVD

min(dim=None, skipna=None, **kwargs)

Reduce this AdvectionTVD’s data by applying min along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply min. By default min is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating min on this object’s data.

Returns

reduced – New AdvectionTVD object with min applied to its data and the indicated dimension(s) removed.

Return type

AdvectionTVD

prod(dim=None, skipna=None, **kwargs)

Reduce this AdvectionTVD’s data by applying prod along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply prod. By default prod is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • min_count (int, default: None) – The required number of valid values to perform the operation. If fewer than min_count non-NA values are present the result will be NA. Only used if skipna is set to True or defaults to True for the array’s dtype. New in version 0.10.8: Added with the default being None. Changed in version 0.17.0: if specified on an integer array and skipna=True, the result will be a float array.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating prod on this object’s data.

Returns

reduced – New AdvectionTVD object with prod applied to its data and the indicated dimension(s) removed.

Return type

AdvectionTVD

std(dim=None, skipna=None, **kwargs)

Reduce this AdvectionTVD’s data by applying std along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply std. By default std is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating std on this object’s data.

Returns

reduced – New AdvectionTVD object with std applied to its data and the indicated dimension(s) removed.

Return type

AdvectionTVD

sum(dim=None, skipna=None, **kwargs)

Reduce this AdvectionTVD’s data by applying sum along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply sum. By default sum is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • min_count (int, default: None) – The required number of valid values to perform the operation. If fewer than min_count non-NA values are present the result will be NA. Only used if skipna is set to True or defaults to True for the array’s dtype. New in version 0.10.8: Added with the default being None. Changed in version 0.17.0: if specified on an integer array and skipna=True, the result will be a float array.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating sum on this object’s data.

Returns

reduced – New AdvectionTVD object with sum applied to its data and the indicated dimension(s) removed.

Return type

AdvectionTVD

var(dim=None, skipna=None, **kwargs)

Reduce this AdvectionTVD’s data by applying var along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply var. By default var is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating var on this object’s data.

Returns

reduced – New AdvectionTVD object with var applied to its data and the indicated dimension(s) removed.

Return type

AdvectionTVD

class imod.wq.BasicFlow(ibound, top, bottom, starting_head, inactive_head=1e+30)[source]

Bases: xarray.core.common.DataWithCoords, xarray.core.arithmetic.DatasetArithmetic, Mapping

The Basic package is used to specify certain data used in all models. These include:

  1. the locations of acitve, inactive, and specified head in cells,

  2. the head stored in inactive cells,

  3. the initial head in all cells, and

  4. the top and bottom of the aquifer

The number of layers (NLAY) is automatically calculated using the IBOUND. Thickness is calculated using the specified tops en bottoms. The Basic package input file is required in all models.

Parameters
  • ibound (xr.DataArray of integers) – is the boundary variable. If IBOUND(J,I,K) < 0, cell J,I,K has a constant head. If IBOUND(J,I,K) = 0, cell J,I,K is inactive. If IBOUND(J,I,K) > 0, cell J,I,K is active.

  • top (float or xr.DataArray of floats) – is the top elevation of layer 1. For the common situation in which the top layer represents a water-table aquifer, it may be reasonable to set top equal to land-surface elevation.

  • bottom (xr.DataArray of floats) – is the bottom elevation of model layers or Quasi-3d confining beds. The DataArray should at least include the layer dimension.

  • starting_head (float or xr.DataArray of floats) – is initial (starting) head—that is, head at the beginning of the simulation (STRT). starting_head must be specified for all simulations, including steady-state simulations. One value is read for every model cell. Usually, these values are read a layer at a time.

  • inactive_head (float, optional) – is the value of head to be assigned to all inactive (no flow) cells (IBOUND = 0) throughout the simulation (HNOFLO). Because head at inactive cells is unused in model calculations, this does not affect model results but serves to identify inactive cells when head is printed. This value is also used as drawdown at inactive cells if the drawdown option is used. Even if the user does not anticipate having inactive cells, a value for inactive_head must be entered. Default value is 1.0e30.

all(dim=None, **kwargs)

Reduce this BasicFlow’s data by applying all along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply all. By default all is applied over all dimensions.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating all on this object’s data.

Returns

reduced – New BasicFlow object with all applied to its data and the indicated dimension(s) removed.

Return type

BasicFlow

any(dim=None, **kwargs)

Reduce this BasicFlow’s data by applying any along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply any. By default any is applied over all dimensions.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating any on this object’s data.

Returns

reduced – New BasicFlow object with any applied to its data and the indicated dimension(s) removed.

Return type

BasicFlow

bottom
count(dim=None, **kwargs)

Reduce this BasicFlow’s data by applying count along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply count. By default count is applied over all dimensions.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating count on this object’s data.

Returns

reduced – New BasicFlow object with count applied to its data and the indicated dimension(s) removed.

Return type

BasicFlow

cumprod(dim=None, skipna=None, **kwargs)

Apply cumprod along some dimension of BasicFlow.

Parameters
  • dim (str or sequence of str, optional) – Dimension over which to apply cumprod.

  • axis (int or sequence of int, optional) – Axis over which to apply cumprod. Only one of the ‘dim’ and ‘axis’ arguments can be supplied.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to cumprod.

Returns

cumvalue – New BasicFlow object with cumprod applied to its data along the indicated dimension.

Return type

BasicFlow

cumsum(dim=None, skipna=None, **kwargs)

Apply cumsum along some dimension of BasicFlow.

Parameters
  • dim (str or sequence of str, optional) – Dimension over which to apply cumsum.

  • axis (int or sequence of int, optional) – Axis over which to apply cumsum. Only one of the ‘dim’ and ‘axis’ arguments can be supplied.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to cumsum.

Returns

cumvalue – New BasicFlow object with cumsum applied to its data along the indicated dimension.

Return type

BasicFlow

ibound
inactive_head
max(dim=None, skipna=None, **kwargs)

Reduce this BasicFlow’s data by applying max along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply max. By default max is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating max on this object’s data.

Returns

reduced – New BasicFlow object with max applied to its data and the indicated dimension(s) removed.

Return type

BasicFlow

mean(dim=None, skipna=None, **kwargs)

Reduce this BasicFlow’s data by applying mean along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply mean. By default mean is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating mean on this object’s data.

Returns

reduced – New BasicFlow object with mean applied to its data and the indicated dimension(s) removed.

Return type

BasicFlow

median(dim=None, skipna=None, **kwargs)

Reduce this BasicFlow’s data by applying median along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply median. By default median is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating median on this object’s data.

Returns

reduced – New BasicFlow object with median applied to its data and the indicated dimension(s) removed.

Return type

BasicFlow

min(dim=None, skipna=None, **kwargs)

Reduce this BasicFlow’s data by applying min along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply min. By default min is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating min on this object’s data.

Returns

reduced – New BasicFlow object with min applied to its data and the indicated dimension(s) removed.

Return type

BasicFlow

prod(dim=None, skipna=None, **kwargs)

Reduce this BasicFlow’s data by applying prod along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply prod. By default prod is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • min_count (int, default: None) – The required number of valid values to perform the operation. If fewer than min_count non-NA values are present the result will be NA. Only used if skipna is set to True or defaults to True for the array’s dtype. New in version 0.10.8: Added with the default being None. Changed in version 0.17.0: if specified on an integer array and skipna=True, the result will be a float array.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating prod on this object’s data.

Returns

reduced – New BasicFlow object with prod applied to its data and the indicated dimension(s) removed.

Return type

BasicFlow

starting_head
std(dim=None, skipna=None, **kwargs)

Reduce this BasicFlow’s data by applying std along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply std. By default std is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating std on this object’s data.

Returns

reduced – New BasicFlow object with std applied to its data and the indicated dimension(s) removed.

Return type

BasicFlow

sum(dim=None, skipna=None, **kwargs)

Reduce this BasicFlow’s data by applying sum along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply sum. By default sum is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • min_count (int, default: None) – The required number of valid values to perform the operation. If fewer than min_count non-NA values are present the result will be NA. Only used if skipna is set to True or defaults to True for the array’s dtype. New in version 0.10.8: Added with the default being None. Changed in version 0.17.0: if specified on an integer array and skipna=True, the result will be a float array.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating sum on this object’s data.

Returns

reduced – New BasicFlow object with sum applied to its data and the indicated dimension(s) removed.

Return type

BasicFlow

thickness()[source]

Computes layer thickness from top and bottom data.

Returns

thickness

Return type

xr.DataArray

top
var(dim=None, skipna=None, **kwargs)

Reduce this BasicFlow’s data by applying var along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply var. By default var is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating var on this object’s data.

Returns

reduced – New BasicFlow object with var applied to its data and the indicated dimension(s) removed.

Return type

BasicFlow

class imod.wq.BasicTransport(icbund, starting_concentration, porosity=0.35, n_species=1, inactive_concentration=1e+30, minimum_active_thickness=0.01)[source]

Bases: xarray.core.common.DataWithCoords, xarray.core.arithmetic.DatasetArithmetic, Mapping

Handles basic tasks that are required by the entire transport model. Among these tasks are definition of the problem, specification of the boundary and initial conditions, determination of the stepsize, preparation of mass balance information, and printout of the simulation results.

Parameters
  • icbund (xr.DataArray of int) – is an integer array specifying the boundary condition type (inactive, constant-concentration, or active) for every model cell. For multi-species simulation, ICBUND defines the boundary condition type shared by all species. Note that different species are allowed to have different constant-concentration conditions through an option in the Source and Sink Mixing Package. ICBUND=0, the cell is an inactive concentration cell for all species. Note that no-flow or “dry” cells are automatically converted into inactive concentration cells. Furthermore, active cells in terms of flow can be treated as inactive concentration cells to minimize the area needed for transport simulation, as long as the solute transport is insignificant near those cells. ICBUND<0, the cell is a constant-concentration cell for all species. The starting concentration of each species remains the same at the cell throughout the simulation. (To define different constantconcentration conditions for different species at the same cell location, refer to the Sink/Source Mixing Package.) Also note that unless explicitly defined as a constant-concentration cell, a constant-head cell in the flow model is not treated as a constantconcentration cell. If ICBUND>0, the cell is an active (variable) concentration cell where the concentration value will be calculated.

  • starting_concentration (float or xr.DataArray of floats) – is the starting concentration (initial condition) at the beginning of the simulation (unit: ML-3) (SCONC). For multispecies simulation, the starting concentration must be specified for all species, one species at a time.

  • porosity (float, optional) – is the “effective” porosity of the porous medium in a single porosity system (PRSITY). Default value is 0.35.

  • n_species (int, optional) – is the total number of chemical species included in the current simulation (NCOMP). For single-species simulation, set n_species = 1. Default value is 1.

  • inactive_concentration (float, optional) – is the value for indicating an inactive concentration cell (ICBUND=0) (CINACT). Even if it is not anticipated to have inactive cells in the model, a value for inactive_concentration still must be submitted. Default value is 1.0e30

  • minimum_active_thickness (float, optional) – is the minimum saturated thickness in a cell (THKMIN), expressed as the decimal fraction of the model layer thickness, below which the cell is considered inactive. Default value is 0.01 (i.e., 1% of the model layer thickness).

all(dim=None, **kwargs)

Reduce this BasicTransport’s data by applying all along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply all. By default all is applied over all dimensions.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating all on this object’s data.

Returns

reduced – New BasicTransport object with all applied to its data and the indicated dimension(s) removed.

Return type

BasicTransport

any(dim=None, **kwargs)

Reduce this BasicTransport’s data by applying any along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply any. By default any is applied over all dimensions.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating any on this object’s data.

Returns

reduced – New BasicTransport object with any applied to its data and the indicated dimension(s) removed.

Return type

BasicTransport

count(dim=None, **kwargs)

Reduce this BasicTransport’s data by applying count along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply count. By default count is applied over all dimensions.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating count on this object’s data.

Returns

reduced – New BasicTransport object with count applied to its data and the indicated dimension(s) removed.

Return type

BasicTransport

cumprod(dim=None, skipna=None, **kwargs)

Apply cumprod along some dimension of BasicTransport.

Parameters
  • dim (str or sequence of str, optional) – Dimension over which to apply cumprod.

  • axis (int or sequence of int, optional) – Axis over which to apply cumprod. Only one of the ‘dim’ and ‘axis’ arguments can be supplied.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to cumprod.

Returns

cumvalue – New BasicTransport object with cumprod applied to its data along the indicated dimension.

Return type

BasicTransport

cumsum(dim=None, skipna=None, **kwargs)

Apply cumsum along some dimension of BasicTransport.

Parameters
  • dim (str or sequence of str, optional) – Dimension over which to apply cumsum.

  • axis (int or sequence of int, optional) – Axis over which to apply cumsum. Only one of the ‘dim’ and ‘axis’ arguments can be supplied.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to cumsum.

Returns

cumvalue – New BasicTransport object with cumsum applied to its data along the indicated dimension.

Return type

BasicTransport

icbund
inactive_concentration
max(dim=None, skipna=None, **kwargs)

Reduce this BasicTransport’s data by applying max along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply max. By default max is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating max on this object’s data.

Returns

reduced – New BasicTransport object with max applied to its data and the indicated dimension(s) removed.

Return type

BasicTransport

mean(dim=None, skipna=None, **kwargs)

Reduce this BasicTransport’s data by applying mean along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply mean. By default mean is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating mean on this object’s data.

Returns

reduced – New BasicTransport object with mean applied to its data and the indicated dimension(s) removed.

Return type

BasicTransport

median(dim=None, skipna=None, **kwargs)

Reduce this BasicTransport’s data by applying median along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply median. By default median is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating median on this object’s data.

Returns

reduced – New BasicTransport object with median applied to its data and the indicated dimension(s) removed.

Return type

BasicTransport

min(dim=None, skipna=None, **kwargs)

Reduce this BasicTransport’s data by applying min along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply min. By default min is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating min on this object’s data.

Returns

reduced – New BasicTransport object with min applied to its data and the indicated dimension(s) removed.

Return type

BasicTransport

minimum_active_thickness
n_species
porosity
prod(dim=None, skipna=None, **kwargs)

Reduce this BasicTransport’s data by applying prod along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply prod. By default prod is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • min_count (int, default: None) – The required number of valid values to perform the operation. If fewer than min_count non-NA values are present the result will be NA. Only used if skipna is set to True or defaults to True for the array’s dtype. New in version 0.10.8: Added with the default being None. Changed in version 0.17.0: if specified on an integer array and skipna=True, the result will be a float array.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating prod on this object’s data.

Returns

reduced – New BasicTransport object with prod applied to its data and the indicated dimension(s) removed.

Return type

BasicTransport

starting_concentration
std(dim=None, skipna=None, **kwargs)

Reduce this BasicTransport’s data by applying std along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply std. By default std is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating std on this object’s data.

Returns

reduced – New BasicTransport object with std applied to its data and the indicated dimension(s) removed.

Return type

BasicTransport

sum(dim=None, skipna=None, **kwargs)

Reduce this BasicTransport’s data by applying sum along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply sum. By default sum is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • min_count (int, default: None) – The required number of valid values to perform the operation. If fewer than min_count non-NA values are present the result will be NA. Only used if skipna is set to True or defaults to True for the array’s dtype. New in version 0.10.8: Added with the default being None. Changed in version 0.17.0: if specified on an integer array and skipna=True, the result will be a float array.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating sum on this object’s data.

Returns

reduced – New BasicTransport object with sum applied to its data and the indicated dimension(s) removed.

Return type

BasicTransport

thickness
var(dim=None, skipna=None, **kwargs)

Reduce this BasicTransport’s data by applying var along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply var. By default var is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating var on this object’s data.

Returns

reduced – New BasicTransport object with var applied to its data and the indicated dimension(s) removed.

Return type

BasicTransport

class imod.wq.ConstantHead(head_start, head_end, concentration, save_budget=False)[source]

Bases: xarray.core.common.DataWithCoords, xarray.core.arithmetic.DatasetArithmetic, Mapping

The Constant Head package. The Time-Variant Specified-Head package is used to simulate specified head boundaries that can change within or between stress periods.

Parameters
  • head_start (xr.DataArray of floats) – is the head at the boundary at the start of the stress period.

  • head_end (xr.DataArray of floats) – is the head at the boundary at the end of the stress period.

  • concentration (xr.DataArray of floats) – concentrations for the constant heads. It gets automatically written to the SSM package.

  • save_budget (bool, optional) – is a flag indicating if the budget should be saved (ICHDCB). Default is False.

all(dim=None, **kwargs)

Reduce this ConstantHead’s data by applying all along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply all. By default all is applied over all dimensions.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating all on this object’s data.

Returns

reduced – New ConstantHead object with all applied to its data and the indicated dimension(s) removed.

Return type

ConstantHead

any(dim=None, **kwargs)

Reduce this ConstantHead’s data by applying any along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply any. By default any is applied over all dimensions.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating any on this object’s data.

Returns

reduced – New ConstantHead object with any applied to its data and the indicated dimension(s) removed.

Return type

ConstantHead

concentration
count(dim=None, **kwargs)

Reduce this ConstantHead’s data by applying count along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply count. By default count is applied over all dimensions.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating count on this object’s data.

Returns

reduced – New ConstantHead object with count applied to its data and the indicated dimension(s) removed.

Return type

ConstantHead

cumprod(dim=None, skipna=None, **kwargs)

Apply cumprod along some dimension of ConstantHead.

Parameters
  • dim (str or sequence of str, optional) – Dimension over which to apply cumprod.

  • axis (int or sequence of int, optional) – Axis over which to apply cumprod. Only one of the ‘dim’ and ‘axis’ arguments can be supplied.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to cumprod.

Returns

cumvalue – New ConstantHead object with cumprod applied to its data along the indicated dimension.

Return type

ConstantHead

cumsum(dim=None, skipna=None, **kwargs)

Apply cumsum along some dimension of ConstantHead.

Parameters
  • dim (str or sequence of str, optional) – Dimension over which to apply cumsum.

  • axis (int or sequence of int, optional) – Axis over which to apply cumsum. Only one of the ‘dim’ and ‘axis’ arguments can be supplied.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to cumsum.

Returns

cumvalue – New ConstantHead object with cumsum applied to its data along the indicated dimension.

Return type

ConstantHead

head_end
head_start
max(dim=None, skipna=None, **kwargs)

Reduce this ConstantHead’s data by applying max along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply max. By default max is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating max on this object’s data.

Returns

reduced – New ConstantHead object with max applied to its data and the indicated dimension(s) removed.

Return type

ConstantHead

mean(dim=None, skipna=None, **kwargs)

Reduce this ConstantHead’s data by applying mean along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply mean. By default mean is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating mean on this object’s data.

Returns

reduced – New ConstantHead object with mean applied to its data and the indicated dimension(s) removed.

Return type

ConstantHead

median(dim=None, skipna=None, **kwargs)

Reduce this ConstantHead’s data by applying median along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply median. By default median is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating median on this object’s data.

Returns

reduced – New ConstantHead object with median applied to its data and the indicated dimension(s) removed.

Return type

ConstantHead

min(dim=None, skipna=None, **kwargs)

Reduce this ConstantHead’s data by applying min along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply min. By default min is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating min on this object’s data.

Returns

reduced – New ConstantHead object with min applied to its data and the indicated dimension(s) removed.

Return type

ConstantHead

prod(dim=None, skipna=None, **kwargs)

Reduce this ConstantHead’s data by applying prod along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply prod. By default prod is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • min_count (int, default: None) – The required number of valid values to perform the operation. If fewer than min_count non-NA values are present the result will be NA. Only used if skipna is set to True or defaults to True for the array’s dtype. New in version 0.10.8: Added with the default being None. Changed in version 0.17.0: if specified on an integer array and skipna=True, the result will be a float array.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating prod on this object’s data.

Returns

reduced – New ConstantHead object with prod applied to its data and the indicated dimension(s) removed.

Return type

ConstantHead

repeat_stress(head_start=None, head_end=None, use_cftime=False)[source]
save_budget
std(dim=None, skipna=None, **kwargs)

Reduce this ConstantHead’s data by applying std along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply std. By default std is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating std on this object’s data.

Returns

reduced – New ConstantHead object with std applied to its data and the indicated dimension(s) removed.

Return type

ConstantHead

sum(dim=None, skipna=None, **kwargs)

Reduce this ConstantHead’s data by applying sum along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply sum. By default sum is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • min_count (int, default: None) – The required number of valid values to perform the operation. If fewer than min_count non-NA values are present the result will be NA. Only used if skipna is set to True or defaults to True for the array’s dtype. New in version 0.10.8: Added with the default being None. Changed in version 0.17.0: if specified on an integer array and skipna=True, the result will be a float array.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating sum on this object’s data.

Returns

reduced – New ConstantHead object with sum applied to its data and the indicated dimension(s) removed.

Return type

ConstantHead

var(dim=None, skipna=None, **kwargs)

Reduce this ConstantHead’s data by applying var along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply var. By default var is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating var on this object’s data.

Returns

reduced – New ConstantHead object with var applied to its data and the indicated dimension(s) removed.

Return type

ConstantHead

class imod.wq.Dispersion(longitudinal=1.0, ratio_horizontal=0.1, ratio_vertical=0.1, diffusion_coefficient=8.64e-05)[source]

Bases: xarray.core.common.DataWithCoords, xarray.core.arithmetic.DatasetArithmetic, Mapping

Solves the concentration change due to dispersion explicitly or formulates the coefficient matrix of the dispersion term for the matrix solver.

Parameters
  • longitudinal (float) – is the longitudinal dispersivity (AL), for every cell of the model grid (unit: L). Default value is 1.0 m. Nota bene: this is for regional applications.

  • ratio_horizontal (float) – is a 1D real array defining the ratio of the horizontal transverse dispersivity (TRPT), to the longitudinal dispersivity. Each value in the array corresponds to one model layer. Some recent field studies suggest that ratio_horizontal is generally not greater than 0.1.

  • ratio_vertical (float) – (TRPV) is the ratio of the vertical transverse dispersivity to the longitudinal dispersivity. Each value in the array corresponds to one model layer. Some recent field studies suggest that ratio_vertical is generally not greater than 0.01. Set ratio_vertical equal to ratio_horizontal to use the standard isotropic dispersion model. Otherwise, the modified isotropic dispersion model is used.

  • diffusion_coefficient (float) –

    is the effective molecular diffusion coefficient (unit: L2T-1). Set diffusion_coefficient = 0 if the effect of molecular diffusion is considered unimportant. Each value in the array corresponds to one model layer.

    iMOD-wq always uses meters and days.

all(dim=None, **kwargs)

Reduce this Dispersion’s data by applying all along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply all. By default all is applied over all dimensions.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating all on this object’s data.

Returns

reduced – New Dispersion object with all applied to its data and the indicated dimension(s) removed.

Return type

Dispersion

any(dim=None, **kwargs)

Reduce this Dispersion’s data by applying any along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply any. By default any is applied over all dimensions.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating any on this object’s data.

Returns

reduced – New Dispersion object with any applied to its data and the indicated dimension(s) removed.

Return type

Dispersion

count(dim=None, **kwargs)

Reduce this Dispersion’s data by applying count along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply count. By default count is applied over all dimensions.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating count on this object’s data.

Returns

reduced – New Dispersion object with count applied to its data and the indicated dimension(s) removed.

Return type

Dispersion

cumprod(dim=None, skipna=None, **kwargs)

Apply cumprod along some dimension of Dispersion.

Parameters
  • dim (str or sequence of str, optional) – Dimension over which to apply cumprod.

  • axis (int or sequence of int, optional) – Axis over which to apply cumprod. Only one of the ‘dim’ and ‘axis’ arguments can be supplied.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to cumprod.

Returns

cumvalue – New Dispersion object with cumprod applied to its data along the indicated dimension.

Return type

Dispersion

cumsum(dim=None, skipna=None, **kwargs)

Apply cumsum along some dimension of Dispersion.

Parameters
  • dim (str or sequence of str, optional) – Dimension over which to apply cumsum.

  • axis (int or sequence of int, optional) – Axis over which to apply cumsum. Only one of the ‘dim’ and ‘axis’ arguments can be supplied.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to cumsum.

Returns

cumvalue – New Dispersion object with cumsum applied to its data along the indicated dimension.

Return type

Dispersion

diffusion_coefficient
longitudinal
max(dim=None, skipna=None, **kwargs)

Reduce this Dispersion’s data by applying max along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply max. By default max is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating max on this object’s data.

Returns

reduced – New Dispersion object with max applied to its data and the indicated dimension(s) removed.

Return type

Dispersion

mean(dim=None, skipna=None, **kwargs)

Reduce this Dispersion’s data by applying mean along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply mean. By default mean is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating mean on this object’s data.

Returns

reduced – New Dispersion object with mean applied to its data and the indicated dimension(s) removed.

Return type

Dispersion

median(dim=None, skipna=None, **kwargs)

Reduce this Dispersion’s data by applying median along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply median. By default median is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating median on this object’s data.

Returns

reduced – New Dispersion object with median applied to its data and the indicated dimension(s) removed.

Return type

Dispersion

min(dim=None, skipna=None, **kwargs)

Reduce this Dispersion’s data by applying min along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply min. By default min is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating min on this object’s data.

Returns

reduced – New Dispersion object with min applied to its data and the indicated dimension(s) removed.

Return type

Dispersion

prod(dim=None, skipna=None, **kwargs)

Reduce this Dispersion’s data by applying prod along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply prod. By default prod is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • min_count (int, default: None) – The required number of valid values to perform the operation. If fewer than min_count non-NA values are present the result will be NA. Only used if skipna is set to True or defaults to True for the array’s dtype. New in version 0.10.8: Added with the default being None. Changed in version 0.17.0: if specified on an integer array and skipna=True, the result will be a float array.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating prod on this object’s data.

Returns

reduced – New Dispersion object with prod applied to its data and the indicated dimension(s) removed.

Return type

Dispersion

ratio_horizontal
ratio_vertical
std(dim=None, skipna=None, **kwargs)

Reduce this Dispersion’s data by applying std along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply std. By default std is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating std on this object’s data.

Returns

reduced – New Dispersion object with std applied to its data and the indicated dimension(s) removed.

Return type

Dispersion

sum(dim=None, skipna=None, **kwargs)

Reduce this Dispersion’s data by applying sum along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply sum. By default sum is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • min_count (int, default: None) – The required number of valid values to perform the operation. If fewer than min_count non-NA values are present the result will be NA. Only used if skipna is set to True or defaults to True for the array’s dtype. New in version 0.10.8: Added with the default being None. Changed in version 0.17.0: if specified on an integer array and skipna=True, the result will be a float array.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating sum on this object’s data.

Returns

reduced – New Dispersion object with sum applied to its data and the indicated dimension(s) removed.

Return type

Dispersion

var(dim=None, skipna=None, **kwargs)

Reduce this Dispersion’s data by applying var along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply var. By default var is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating var on this object’s data.

Returns

reduced – New Dispersion object with var applied to its data and the indicated dimension(s) removed.

Return type

Dispersion

class imod.wq.Drainage(elevation, conductance, save_budget=False)[source]

Bases: xarray.core.common.DataWithCoords, xarray.core.arithmetic.DatasetArithmetic, Mapping

The Drain package is used to simulate head-dependent flux boundaries. In the Drain package if the head in the cell falls below a certain threshold, the flux from the drain to the model cell drops to zero.

Parameters
  • elevation (float or xr.DataArray of floats) – elevation of the drain.

  • conductance (float or xr.DataArray of floats) – is the conductance of the drain.

  • save_budget (bool, optional) – A flag that is used to determine if cell-by-cell budget data should be saved. If save_budget is True cell-by-cell budget data will be saved. Default is False.

all(dim=None, **kwargs)

Reduce this Drainage’s data by applying all along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply all. By default all is applied over all dimensions.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating all on this object’s data.

Returns

reduced – New Drainage object with all applied to its data and the indicated dimension(s) removed.

Return type

Drainage

any(dim=None, **kwargs)

Reduce this Drainage’s data by applying any along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply any. By default any is applied over all dimensions.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating any on this object’s data.

Returns

reduced – New Drainage object with any applied to its data and the indicated dimension(s) removed.

Return type

Drainage

conductance
count(dim=None, **kwargs)

Reduce this Drainage’s data by applying count along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply count. By default count is applied over all dimensions.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating count on this object’s data.

Returns

reduced – New Drainage object with count applied to its data and the indicated dimension(s) removed.

Return type

Drainage

cumprod(dim=None, skipna=None, **kwargs)

Apply cumprod along some dimension of Drainage.

Parameters
  • dim (str or sequence of str, optional) – Dimension over which to apply cumprod.

  • axis (int or sequence of int, optional) – Axis over which to apply cumprod. Only one of the ‘dim’ and ‘axis’ arguments can be supplied.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to cumprod.

Returns

cumvalue – New Drainage object with cumprod applied to its data along the indicated dimension.

Return type

Drainage

cumsum(dim=None, skipna=None, **kwargs)

Apply cumsum along some dimension of Drainage.

Parameters
  • dim (str or sequence of str, optional) – Dimension over which to apply cumsum.

  • axis (int or sequence of int, optional) – Axis over which to apply cumsum. Only one of the ‘dim’ and ‘axis’ arguments can be supplied.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to cumsum.

Returns

cumvalue – New Drainage object with cumsum applied to its data along the indicated dimension.

Return type

Drainage

elevation
max(dim=None, skipna=None, **kwargs)

Reduce this Drainage’s data by applying max along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply max. By default max is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating max on this object’s data.

Returns

reduced – New Drainage object with max applied to its data and the indicated dimension(s) removed.

Return type

Drainage

mean(dim=None, skipna=None, **kwargs)

Reduce this Drainage’s data by applying mean along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply mean. By default mean is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating mean on this object’s data.

Returns

reduced – New Drainage object with mean applied to its data and the indicated dimension(s) removed.

Return type

Drainage

median(dim=None, skipna=None, **kwargs)

Reduce this Drainage’s data by applying median along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply median. By default median is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating median on this object’s data.

Returns

reduced – New Drainage object with median applied to its data and the indicated dimension(s) removed.

Return type

Drainage

min(dim=None, skipna=None, **kwargs)

Reduce this Drainage’s data by applying min along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply min. By default min is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating min on this object’s data.

Returns

reduced – New Drainage object with min applied to its data and the indicated dimension(s) removed.

Return type

Drainage

prod(dim=None, skipna=None, **kwargs)

Reduce this Drainage’s data by applying prod along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply prod. By default prod is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • min_count (int, default: None) – The required number of valid values to perform the operation. If fewer than min_count non-NA values are present the result will be NA. Only used if skipna is set to True or defaults to True for the array’s dtype. New in version 0.10.8: Added with the default being None. Changed in version 0.17.0: if specified on an integer array and skipna=True, the result will be a float array.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating prod on this object’s data.

Returns

reduced – New Drainage object with prod applied to its data and the indicated dimension(s) removed.

Return type

Drainage

repeat_stress(elevation=None, conductance=None, use_cftime=False)[source]
save_budget
std(dim=None, skipna=None, **kwargs)

Reduce this Drainage’s data by applying std along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply std. By default std is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating std on this object’s data.

Returns

reduced – New Drainage object with std applied to its data and the indicated dimension(s) removed.

Return type

Drainage

sum(dim=None, skipna=None, **kwargs)

Reduce this Drainage’s data by applying sum along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply sum. By default sum is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • min_count (int, default: None) – The required number of valid values to perform the operation. If fewer than min_count non-NA values are present the result will be NA. Only used if skipna is set to True or defaults to True for the array’s dtype. New in version 0.10.8: Added with the default being None. Changed in version 0.17.0: if specified on an integer array and skipna=True, the result will be a float array.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating sum on this object’s data.

Returns

reduced – New Drainage object with sum applied to its data and the indicated dimension(s) removed.

Return type

Drainage

var(dim=None, skipna=None, **kwargs)

Reduce this Drainage’s data by applying var along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply var. By default var is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating var on this object’s data.

Returns

reduced – New Drainage object with var applied to its data and the indicated dimension(s) removed.

Return type

Drainage

class imod.wq.EvapotranspirationHighestActive(maximum_rate, surface, extinction_depth, concentration=0.0, save_budget=False)[source]

Bases: xarray.core.common.DataWithCoords, xarray.core.arithmetic.DatasetArithmetic, Mapping

all(dim=None, **kwargs)

Reduce this EvapotranspirationHighestActive’s data by applying all along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply all. By default all is applied over all dimensions.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating all on this object’s data.

Returns

reduced – New EvapotranspirationHighestActive object with all applied to its data and the indicated dimension(s) removed.

Return type

EvapotranspirationHighestActive

any(dim=None, **kwargs)

Reduce this EvapotranspirationHighestActive’s data by applying any along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply any. By default any is applied over all dimensions.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating any on this object’s data.

Returns

reduced – New EvapotranspirationHighestActive object with any applied to its data and the indicated dimension(s) removed.

Return type

EvapotranspirationHighestActive

count(dim=None, **kwargs)

Reduce this EvapotranspirationHighestActive’s data by applying count along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply count. By default count is applied over all dimensions.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating count on this object’s data.

Returns

reduced – New EvapotranspirationHighestActive object with count applied to its data and the indicated dimension(s) removed.

Return type

EvapotranspirationHighestActive

cumprod(dim=None, skipna=None, **kwargs)

Apply cumprod along some dimension of EvapotranspirationHighestActive.

Parameters
  • dim (str or sequence of str, optional) – Dimension over which to apply cumprod.

  • axis (int or sequence of int, optional) – Axis over which to apply cumprod. Only one of the ‘dim’ and ‘axis’ arguments can be supplied.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to cumprod.

Returns

cumvalue – New EvapotranspirationHighestActive object with cumprod applied to its data along the indicated dimension.

Return type

EvapotranspirationHighestActive

cumsum(dim=None, skipna=None, **kwargs)

Apply cumsum along some dimension of EvapotranspirationHighestActive.

Parameters
  • dim (str or sequence of str, optional) – Dimension over which to apply cumsum.

  • axis (int or sequence of int, optional) – Axis over which to apply cumsum. Only one of the ‘dim’ and ‘axis’ arguments can be supplied.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to cumsum.

Returns

cumvalue – New EvapotranspirationHighestActive object with cumsum applied to its data along the indicated dimension.

Return type

EvapotranspirationHighestActive

max(dim=None, skipna=None, **kwargs)

Reduce this EvapotranspirationHighestActive’s data by applying max along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply max. By default max is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating max on this object’s data.

Returns

reduced – New EvapotranspirationHighestActive object with max applied to its data and the indicated dimension(s) removed.

Return type

EvapotranspirationHighestActive

mean(dim=None, skipna=None, **kwargs)

Reduce this EvapotranspirationHighestActive’s data by applying mean along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply mean. By default mean is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating mean on this object’s data.

Returns

reduced – New EvapotranspirationHighestActive object with mean applied to its data and the indicated dimension(s) removed.

Return type

EvapotranspirationHighestActive

median(dim=None, skipna=None, **kwargs)

Reduce this EvapotranspirationHighestActive’s data by applying median along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply median. By default median is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating median on this object’s data.

Returns

reduced – New EvapotranspirationHighestActive object with median applied to its data and the indicated dimension(s) removed.

Return type

EvapotranspirationHighestActive

min(dim=None, skipna=None, **kwargs)

Reduce this EvapotranspirationHighestActive’s data by applying min along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply min. By default min is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating min on this object’s data.

Returns

reduced – New EvapotranspirationHighestActive object with min applied to its data and the indicated dimension(s) removed.

Return type

EvapotranspirationHighestActive

prod(dim=None, skipna=None, **kwargs)

Reduce this EvapotranspirationHighestActive’s data by applying prod along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply prod. By default prod is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • min_count (int, default: None) – The required number of valid values to perform the operation. If fewer than min_count non-NA values are present the result will be NA. Only used if skipna is set to True or defaults to True for the array’s dtype. New in version 0.10.8: Added with the default being None. Changed in version 0.17.0: if specified on an integer array and skipna=True, the result will be a float array.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating prod on this object’s data.

Returns

reduced – New EvapotranspirationHighestActive object with prod applied to its data and the indicated dimension(s) removed.

Return type

EvapotranspirationHighestActive

std(dim=None, skipna=None, **kwargs)

Reduce this EvapotranspirationHighestActive’s data by applying std along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply std. By default std is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating std on this object’s data.

Returns

reduced – New EvapotranspirationHighestActive object with std applied to its data and the indicated dimension(s) removed.

Return type

EvapotranspirationHighestActive

sum(dim=None, skipna=None, **kwargs)

Reduce this EvapotranspirationHighestActive’s data by applying sum along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply sum. By default sum is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • min_count (int, default: None) – The required number of valid values to perform the operation. If fewer than min_count non-NA values are present the result will be NA. Only used if skipna is set to True or defaults to True for the array’s dtype. New in version 0.10.8: Added with the default being None. Changed in version 0.17.0: if specified on an integer array and skipna=True, the result will be a float array.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating sum on this object’s data.

Returns

reduced – New EvapotranspirationHighestActive object with sum applied to its data and the indicated dimension(s) removed.

Return type

EvapotranspirationHighestActive

var(dim=None, skipna=None, **kwargs)

Reduce this EvapotranspirationHighestActive’s data by applying var along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply var. By default var is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating var on this object’s data.

Returns

reduced – New EvapotranspirationHighestActive object with var applied to its data and the indicated dimension(s) removed.

Return type

EvapotranspirationHighestActive

class imod.wq.EvapotranspirationLayers(maximum_rate, surface, extinction_depth, evapotranspiration_layer, concentration=0.0, save_budget=False)[source]

Bases: xarray.core.common.DataWithCoords, xarray.core.arithmetic.DatasetArithmetic, Mapping

all(dim=None, **kwargs)

Reduce this EvapotranspirationLayers’s data by applying all along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply all. By default all is applied over all dimensions.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating all on this object’s data.

Returns

reduced – New EvapotranspirationLayers object with all applied to its data and the indicated dimension(s) removed.

Return type

EvapotranspirationLayers

any(dim=None, **kwargs)

Reduce this EvapotranspirationLayers’s data by applying any along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply any. By default any is applied over all dimensions.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating any on this object’s data.

Returns

reduced – New EvapotranspirationLayers object with any applied to its data and the indicated dimension(s) removed.

Return type

EvapotranspirationLayers

count(dim=None, **kwargs)

Reduce this EvapotranspirationLayers’s data by applying count along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply count. By default count is applied over all dimensions.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating count on this object’s data.

Returns

reduced – New EvapotranspirationLayers object with count applied to its data and the indicated dimension(s) removed.

Return type

EvapotranspirationLayers

cumprod(dim=None, skipna=None, **kwargs)

Apply cumprod along some dimension of EvapotranspirationLayers.

Parameters
  • dim (str or sequence of str, optional) – Dimension over which to apply cumprod.

  • axis (int or sequence of int, optional) – Axis over which to apply cumprod. Only one of the ‘dim’ and ‘axis’ arguments can be supplied.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to cumprod.

Returns

cumvalue – New EvapotranspirationLayers object with cumprod applied to its data along the indicated dimension.

Return type

EvapotranspirationLayers

cumsum(dim=None, skipna=None, **kwargs)

Apply cumsum along some dimension of EvapotranspirationLayers.

Parameters
  • dim (str or sequence of str, optional) – Dimension over which to apply cumsum.

  • axis (int or sequence of int, optional) – Axis over which to apply cumsum. Only one of the ‘dim’ and ‘axis’ arguments can be supplied.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to cumsum.

Returns

cumvalue – New EvapotranspirationLayers object with cumsum applied to its data along the indicated dimension.

Return type

EvapotranspirationLayers

max(dim=None, skipna=None, **kwargs)

Reduce this EvapotranspirationLayers’s data by applying max along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply max. By default max is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating max on this object’s data.

Returns

reduced – New EvapotranspirationLayers object with max applied to its data and the indicated dimension(s) removed.

Return type

EvapotranspirationLayers

mean(dim=None, skipna=None, **kwargs)

Reduce this EvapotranspirationLayers’s data by applying mean along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply mean. By default mean is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating mean on this object’s data.

Returns

reduced – New EvapotranspirationLayers object with mean applied to its data and the indicated dimension(s) removed.

Return type

EvapotranspirationLayers

median(dim=None, skipna=None, **kwargs)

Reduce this EvapotranspirationLayers’s data by applying median along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply median. By default median is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating median on this object’s data.

Returns

reduced – New EvapotranspirationLayers object with median applied to its data and the indicated dimension(s) removed.

Return type

EvapotranspirationLayers

min(dim=None, skipna=None, **kwargs)

Reduce this EvapotranspirationLayers’s data by applying min along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply min. By default min is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating min on this object’s data.

Returns

reduced – New EvapotranspirationLayers object with min applied to its data and the indicated dimension(s) removed.

Return type

EvapotranspirationLayers

prod(dim=None, skipna=None, **kwargs)

Reduce this EvapotranspirationLayers’s data by applying prod along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply prod. By default prod is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • min_count (int, default: None) – The required number of valid values to perform the operation. If fewer than min_count non-NA values are present the result will be NA. Only used if skipna is set to True or defaults to True for the array’s dtype. New in version 0.10.8: Added with the default being None. Changed in version 0.17.0: if specified on an integer array and skipna=True, the result will be a float array.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating prod on this object’s data.

Returns

reduced – New EvapotranspirationLayers object with prod applied to its data and the indicated dimension(s) removed.

Return type

EvapotranspirationLayers

std(dim=None, skipna=None, **kwargs)

Reduce this EvapotranspirationLayers’s data by applying std along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply std. By default std is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating std on this object’s data.

Returns

reduced – New EvapotranspirationLayers object with std applied to its data and the indicated dimension(s) removed.

Return type

EvapotranspirationLayers

sum(dim=None, skipna=None, **kwargs)

Reduce this EvapotranspirationLayers’s data by applying sum along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply sum. By default sum is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • min_count (int, default: None) – The required number of valid values to perform the operation. If fewer than min_count non-NA values are present the result will be NA. Only used if skipna is set to True or defaults to True for the array’s dtype. New in version 0.10.8: Added with the default being None. Changed in version 0.17.0: if specified on an integer array and skipna=True, the result will be a float array.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating sum on this object’s data.

Returns

reduced – New EvapotranspirationLayers object with sum applied to its data and the indicated dimension(s) removed.

Return type

EvapotranspirationLayers

var(dim=None, skipna=None, **kwargs)

Reduce this EvapotranspirationLayers’s data by applying var along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply var. By default var is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating var on this object’s data.

Returns

reduced – New EvapotranspirationLayers object with var applied to its data and the indicated dimension(s) removed.

Return type

EvapotranspirationLayers

class imod.wq.EvapotranspirationTopLayer(maximum_rate, surface, extinction_depth, concentration=0.0, save_budget=False)[source]

Bases: xarray.core.common.DataWithCoords, xarray.core.arithmetic.DatasetArithmetic, Mapping

all(dim=None, **kwargs)

Reduce this EvapotranspirationTopLayer’s data by applying all along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply all. By default all is applied over all dimensions.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating all on this object’s data.

Returns

reduced – New EvapotranspirationTopLayer object with all applied to its data and the indicated dimension(s) removed.

Return type

EvapotranspirationTopLayer

any(dim=None, **kwargs)

Reduce this EvapotranspirationTopLayer’s data by applying any along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply any. By default any is applied over all dimensions.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating any on this object’s data.

Returns

reduced – New EvapotranspirationTopLayer object with any applied to its data and the indicated dimension(s) removed.

Return type

EvapotranspirationTopLayer

count(dim=None, **kwargs)

Reduce this EvapotranspirationTopLayer’s data by applying count along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply count. By default count is applied over all dimensions.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating count on this object’s data.

Returns

reduced – New EvapotranspirationTopLayer object with count applied to its data and the indicated dimension(s) removed.

Return type

EvapotranspirationTopLayer

cumprod(dim=None, skipna=None, **kwargs)

Apply cumprod along some dimension of EvapotranspirationTopLayer.

Parameters
  • dim (str or sequence of str, optional) – Dimension over which to apply cumprod.

  • axis (int or sequence of int, optional) – Axis over which to apply cumprod. Only one of the ‘dim’ and ‘axis’ arguments can be supplied.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to cumprod.

Returns

cumvalue – New EvapotranspirationTopLayer object with cumprod applied to its data along the indicated dimension.

Return type

EvapotranspirationTopLayer

cumsum(dim=None, skipna=None, **kwargs)

Apply cumsum along some dimension of EvapotranspirationTopLayer.

Parameters
  • dim (str or sequence of str, optional) – Dimension over which to apply cumsum.

  • axis (int or sequence of int, optional) – Axis over which to apply cumsum. Only one of the ‘dim’ and ‘axis’ arguments can be supplied.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to cumsum.

Returns

cumvalue – New EvapotranspirationTopLayer object with cumsum applied to its data along the indicated dimension.

Return type

EvapotranspirationTopLayer

max(dim=None, skipna=None, **kwargs)

Reduce this EvapotranspirationTopLayer’s data by applying max along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply max. By default max is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating max on this object’s data.

Returns

reduced – New EvapotranspirationTopLayer object with max applied to its data and the indicated dimension(s) removed.

Return type

EvapotranspirationTopLayer

mean(dim=None, skipna=None, **kwargs)

Reduce this EvapotranspirationTopLayer’s data by applying mean along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply mean. By default mean is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating mean on this object’s data.

Returns

reduced – New EvapotranspirationTopLayer object with mean applied to its data and the indicated dimension(s) removed.

Return type

EvapotranspirationTopLayer

median(dim=None, skipna=None, **kwargs)

Reduce this EvapotranspirationTopLayer’s data by applying median along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply median. By default median is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating median on this object’s data.

Returns

reduced – New EvapotranspirationTopLayer object with median applied to its data and the indicated dimension(s) removed.

Return type

EvapotranspirationTopLayer

min(dim=None, skipna=None, **kwargs)

Reduce this EvapotranspirationTopLayer’s data by applying min along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply min. By default min is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating min on this object’s data.

Returns

reduced – New EvapotranspirationTopLayer object with min applied to its data and the indicated dimension(s) removed.

Return type

EvapotranspirationTopLayer

prod(dim=None, skipna=None, **kwargs)

Reduce this EvapotranspirationTopLayer’s data by applying prod along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply prod. By default prod is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • min_count (int, default: None) – The required number of valid values to perform the operation. If fewer than min_count non-NA values are present the result will be NA. Only used if skipna is set to True or defaults to True for the array’s dtype. New in version 0.10.8: Added with the default being None. Changed in version 0.17.0: if specified on an integer array and skipna=True, the result will be a float array.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating prod on this object’s data.

Returns

reduced – New EvapotranspirationTopLayer object with prod applied to its data and the indicated dimension(s) removed.

Return type

EvapotranspirationTopLayer

std(dim=None, skipna=None, **kwargs)

Reduce this EvapotranspirationTopLayer’s data by applying std along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply std. By default std is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating std on this object’s data.

Returns

reduced – New EvapotranspirationTopLayer object with std applied to its data and the indicated dimension(s) removed.

Return type

EvapotranspirationTopLayer

sum(dim=None, skipna=None, **kwargs)

Reduce this EvapotranspirationTopLayer’s data by applying sum along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply sum. By default sum is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • min_count (int, default: None) – The required number of valid values to perform the operation. If fewer than min_count non-NA values are present the result will be NA. Only used if skipna is set to True or defaults to True for the array’s dtype. New in version 0.10.8: Added with the default being None. Changed in version 0.17.0: if specified on an integer array and skipna=True, the result will be a float array.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating sum on this object’s data.

Returns

reduced – New EvapotranspirationTopLayer object with sum applied to its data and the indicated dimension(s) removed.

Return type

EvapotranspirationTopLayer

var(dim=None, skipna=None, **kwargs)

Reduce this EvapotranspirationTopLayer’s data by applying var along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply var. By default var is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating var on this object’s data.

Returns

reduced – New EvapotranspirationTopLayer object with var applied to its data and the indicated dimension(s) removed.

Return type

EvapotranspirationTopLayer

class imod.wq.GeneralHeadBoundary(head, conductance, density, concentration=None, save_budget=False)[source]

Bases: xarray.core.common.DataWithCoords, xarray.core.arithmetic.DatasetArithmetic, Mapping

The General-Head Boundary package is used to simulate head-dependent flux boundaries. In the General-Head Boundary package the flux is always proportional to the difference in head.

Parameters
  • head (float or xr.DataArray of floats) – head value for the GHB (BHEAD).

  • conductance (float or xr.DataArray of floats) – the conductance of the GHB (COND).

  • density (float or xr.DataArray of floats) – is the density used to convert the point head to the freshwater head (GHBSSMDENS).

  • concentration ("None" or xr.DataArray of floats, optional) – concentration of the GHB (CGHB), get automatically inserted into the SSM package. Default is “None”.

  • save_budget (bool, optional) – is a flag indicating if the budget should be saved (IGHBCB). Default is False.

all(dim=None, **kwargs)

Reduce this GeneralHeadBoundary’s data by applying all along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply all. By default all is applied over all dimensions.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating all on this object’s data.

Returns

reduced – New GeneralHeadBoundary object with all applied to its data and the indicated dimension(s) removed.

Return type

GeneralHeadBoundary

any(dim=None, **kwargs)

Reduce this GeneralHeadBoundary’s data by applying any along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply any. By default any is applied over all dimensions.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating any on this object’s data.

Returns

reduced – New GeneralHeadBoundary object with any applied to its data and the indicated dimension(s) removed.

Return type

GeneralHeadBoundary

concentration
conductance
count(dim=None, **kwargs)

Reduce this GeneralHeadBoundary’s data by applying count along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply count. By default count is applied over all dimensions.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating count on this object’s data.

Returns

reduced – New GeneralHeadBoundary object with count applied to its data and the indicated dimension(s) removed.

Return type

GeneralHeadBoundary

cumprod(dim=None, skipna=None, **kwargs)

Apply cumprod along some dimension of GeneralHeadBoundary.

Parameters
  • dim (str or sequence of str, optional) – Dimension over which to apply cumprod.

  • axis (int or sequence of int, optional) – Axis over which to apply cumprod. Only one of the ‘dim’ and ‘axis’ arguments can be supplied.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to cumprod.

Returns

cumvalue – New GeneralHeadBoundary object with cumprod applied to its data along the indicated dimension.

Return type

GeneralHeadBoundary

cumsum(dim=None, skipna=None, **kwargs)

Apply cumsum along some dimension of GeneralHeadBoundary.

Parameters
  • dim (str or sequence of str, optional) – Dimension over which to apply cumsum.

  • axis (int or sequence of int, optional) – Axis over which to apply cumsum. Only one of the ‘dim’ and ‘axis’ arguments can be supplied.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to cumsum.

Returns

cumvalue – New GeneralHeadBoundary object with cumsum applied to its data along the indicated dimension.

Return type

GeneralHeadBoundary

density
head
max(dim=None, skipna=None, **kwargs)

Reduce this GeneralHeadBoundary’s data by applying max along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply max. By default max is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating max on this object’s data.

Returns

reduced – New GeneralHeadBoundary object with max applied to its data and the indicated dimension(s) removed.

Return type

GeneralHeadBoundary

mean(dim=None, skipna=None, **kwargs)

Reduce this GeneralHeadBoundary’s data by applying mean along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply mean. By default mean is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating mean on this object’s data.

Returns

reduced – New GeneralHeadBoundary object with mean applied to its data and the indicated dimension(s) removed.

Return type

GeneralHeadBoundary

median(dim=None, skipna=None, **kwargs)

Reduce this GeneralHeadBoundary’s data by applying median along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply median. By default median is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating median on this object’s data.

Returns

reduced – New GeneralHeadBoundary object with median applied to its data and the indicated dimension(s) removed.

Return type

GeneralHeadBoundary

min(dim=None, skipna=None, **kwargs)

Reduce this GeneralHeadBoundary’s data by applying min along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply min. By default min is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating min on this object’s data.

Returns

reduced – New GeneralHeadBoundary object with min applied to its data and the indicated dimension(s) removed.

Return type

GeneralHeadBoundary

prod(dim=None, skipna=None, **kwargs)

Reduce this GeneralHeadBoundary’s data by applying prod along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply prod. By default prod is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • min_count (int, default: None) – The required number of valid values to perform the operation. If fewer than min_count non-NA values are present the result will be NA. Only used if skipna is set to True or defaults to True for the array’s dtype. New in version 0.10.8: Added with the default being None. Changed in version 0.17.0: if specified on an integer array and skipna=True, the result will be a float array.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating prod on this object’s data.

Returns

reduced – New GeneralHeadBoundary object with prod applied to its data and the indicated dimension(s) removed.

Return type

GeneralHeadBoundary

repeat_stress(head=None, conductance=None, density=None, concentration=None, use_cftime=False)[source]
save_budget
std(dim=None, skipna=None, **kwargs)

Reduce this GeneralHeadBoundary’s data by applying std along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply std. By default std is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating std on this object’s data.

Returns

reduced – New GeneralHeadBoundary object with std applied to its data and the indicated dimension(s) removed.

Return type

GeneralHeadBoundary

sum(dim=None, skipna=None, **kwargs)

Reduce this GeneralHeadBoundary’s data by applying sum along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply sum. By default sum is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • min_count (int, default: None) – The required number of valid values to perform the operation. If fewer than min_count non-NA values are present the result will be NA. Only used if skipna is set to True or defaults to True for the array’s dtype. New in version 0.10.8: Added with the default being None. Changed in version 0.17.0: if specified on an integer array and skipna=True, the result will be a float array.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating sum on this object’s data.

Returns

reduced – New GeneralHeadBoundary object with sum applied to its data and the indicated dimension(s) removed.

Return type

GeneralHeadBoundary

var(dim=None, skipna=None, **kwargs)

Reduce this GeneralHeadBoundary’s data by applying var along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply var. By default var is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating var on this object’s data.

Returns

reduced – New GeneralHeadBoundary object with var applied to its data and the indicated dimension(s) removed.

Return type

GeneralHeadBoundary

class imod.wq.GeneralizedConjugateGradientSolver(max_iter=1, inner_iter=50, cclose=1e-06, preconditioner='mic', lump_dispersion=True)[source]

Bases: xarray.core.common.DataWithCoords, xarray.core.arithmetic.DatasetArithmetic, Mapping

The Generalized Conjugate Gradient Solver solves the matrix equations resulting from the implicit solution of the transport equation.

Parameters
  • max_iter (int) – is the maximum number of outer iterations (MXITER); it should be set to an integer greater than one (1) only when a nonlinear sorption isotherm is included in simulation.

  • iter1 (int) – is the maximum number of inner iterations (iter1); a value of 30-50 should be adequate for most problems.

  • isolve (int) – is the type of preconditioners to be used with the Lanczos/ORTHOMIN acceleration scheme: isolve = 1: Jacobi isolve = 2: SSOR isolve = 3: Modified Incomplete Cholesky (MIC) (MIC usually converges faster, but it needs significantly more memory)

  • lump_dispersion (bool) – is an integer flag for treatment of dispersion tensor cross terms: ncrs = 0: lump all dispersion cross terms to the right-hand-side (approximate but highly efficient). ncrs = 1: include full dispersion tensor (memory intensive).

  • cclose (float) – is the convergence criterion in terms of relative concentration; a real value between 10-4 and 10-6 is generally adequate.

all(dim=None, **kwargs)

Reduce this GeneralizedConjugateGradientSolver’s data by applying all along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply all. By default all is applied over all dimensions.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating all on this object’s data.

Returns

reduced – New GeneralizedConjugateGradientSolver object with all applied to its data and the indicated dimension(s) removed.

Return type

GeneralizedConjugateGradientSolver

any(dim=None, **kwargs)

Reduce this GeneralizedConjugateGradientSolver’s data by applying any along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply any. By default any is applied over all dimensions.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating any on this object’s data.

Returns

reduced – New GeneralizedConjugateGradientSolver object with any applied to its data and the indicated dimension(s) removed.

Return type

GeneralizedConjugateGradientSolver

cclose
count(dim=None, **kwargs)

Reduce this GeneralizedConjugateGradientSolver’s data by applying count along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply count. By default count is applied over all dimensions.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating count on this object’s data.

Returns

reduced – New GeneralizedConjugateGradientSolver object with count applied to its data and the indicated dimension(s) removed.

Return type

GeneralizedConjugateGradientSolver

cumprod(dim=None, skipna=None, **kwargs)

Apply cumprod along some dimension of GeneralizedConjugateGradientSolver.

Parameters
  • dim (str or sequence of str, optional) – Dimension over which to apply cumprod.

  • axis (int or sequence of int, optional) – Axis over which to apply cumprod. Only one of the ‘dim’ and ‘axis’ arguments can be supplied.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to cumprod.

Returns

cumvalue – New GeneralizedConjugateGradientSolver object with cumprod applied to its data along the indicated dimension.

Return type

GeneralizedConjugateGradientSolver

cumsum(dim=None, skipna=None, **kwargs)

Apply cumsum along some dimension of GeneralizedConjugateGradientSolver.

Parameters
  • dim (str or sequence of str, optional) – Dimension over which to apply cumsum.

  • axis (int or sequence of int, optional) – Axis over which to apply cumsum. Only one of the ‘dim’ and ‘axis’ arguments can be supplied.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to cumsum.

Returns

cumvalue – New GeneralizedConjugateGradientSolver object with cumsum applied to its data along the indicated dimension.

Return type

GeneralizedConjugateGradientSolver

inner_iter
lump_dispersion
max(dim=None, skipna=None, **kwargs)

Reduce this GeneralizedConjugateGradientSolver’s data by applying max along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply max. By default max is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating max on this object’s data.

Returns

reduced – New GeneralizedConjugateGradientSolver object with max applied to its data and the indicated dimension(s) removed.

Return type

GeneralizedConjugateGradientSolver

max_iter
mean(dim=None, skipna=None, **kwargs)

Reduce this GeneralizedConjugateGradientSolver’s data by applying mean along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply mean. By default mean is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating mean on this object’s data.

Returns

reduced – New GeneralizedConjugateGradientSolver object with mean applied to its data and the indicated dimension(s) removed.

Return type

GeneralizedConjugateGradientSolver

median(dim=None, skipna=None, **kwargs)

Reduce this GeneralizedConjugateGradientSolver’s data by applying median along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply median. By default median is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating median on this object’s data.

Returns

reduced – New GeneralizedConjugateGradientSolver object with median applied to its data and the indicated dimension(s) removed.

Return type

GeneralizedConjugateGradientSolver

min(dim=None, skipna=None, **kwargs)

Reduce this GeneralizedConjugateGradientSolver’s data by applying min along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply min. By default min is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating min on this object’s data.

Returns

reduced – New GeneralizedConjugateGradientSolver object with min applied to its data and the indicated dimension(s) removed.

Return type

GeneralizedConjugateGradientSolver

preconditioner
prod(dim=None, skipna=None, **kwargs)

Reduce this GeneralizedConjugateGradientSolver’s data by applying prod along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply prod. By default prod is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • min_count (int, default: None) – The required number of valid values to perform the operation. If fewer than min_count non-NA values are present the result will be NA. Only used if skipna is set to True or defaults to True for the array’s dtype. New in version 0.10.8: Added with the default being None. Changed in version 0.17.0: if specified on an integer array and skipna=True, the result will be a float array.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating prod on this object’s data.

Returns

reduced – New GeneralizedConjugateGradientSolver object with prod applied to its data and the indicated dimension(s) removed.

Return type

GeneralizedConjugateGradientSolver

std(dim=None, skipna=None, **kwargs)

Reduce this GeneralizedConjugateGradientSolver’s data by applying std along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply std. By default std is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating std on this object’s data.

Returns

reduced – New GeneralizedConjugateGradientSolver object with std applied to its data and the indicated dimension(s) removed.

Return type

GeneralizedConjugateGradientSolver

sum(dim=None, skipna=None, **kwargs)

Reduce this GeneralizedConjugateGradientSolver’s data by applying sum along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply sum. By default sum is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • min_count (int, default: None) – The required number of valid values to perform the operation. If fewer than min_count non-NA values are present the result will be NA. Only used if skipna is set to True or defaults to True for the array’s dtype. New in version 0.10.8: Added with the default being None. Changed in version 0.17.0: if specified on an integer array and skipna=True, the result will be a float array.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating sum on this object’s data.

Returns

reduced – New GeneralizedConjugateGradientSolver object with sum applied to its data and the indicated dimension(s) removed.

Return type

GeneralizedConjugateGradientSolver

var(dim=None, skipna=None, **kwargs)

Reduce this GeneralizedConjugateGradientSolver’s data by applying var along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply var. By default var is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating var on this object’s data.

Returns

reduced – New GeneralizedConjugateGradientSolver object with var applied to its data and the indicated dimension(s) removed.

Return type

GeneralizedConjugateGradientSolver

class imod.wq.LayerPropertyFlow(k_horizontal, k_vertical, horizontal_anisotropy=1.0, interblock=0, layer_type=0, specific_storage=0.0001, specific_yield=0.15, save_budget=False, layer_wet=0, interval_wet=0.001, method_wet='wetfactor', head_dry=1e+20)[source]

Bases: xarray.core.common.DataWithCoords, xarray.core.arithmetic.DatasetArithmetic, Mapping

The Layer-Property Flow (LPF) package is used to specify properties controlling flow between cells.

Parameters
  • k_horizontal (float or xr.DataArray of floats) – is the hydraulic conductivity along rows (HK). HK is multiplied by horizontal anisotropy (see horizontal_anisotropy) to obtain hydraulic conductivity along columns.

  • k_vertical (float or xr.DataArray of floats) – is the vertical hydraulic conductivity (VKA).

  • horizontal_anisotropy (float or xr.DataArray of floats) – contains a value for each layer that is the horizontal anisotropy (CHANI). Use as many records as needed to enter a value of CHANI for each layer. The horizontal anisotropy is the ratio of the hydraulic conductivity along columns (the Y direction) to the hydraulic conductivity along rows (the X direction).

  • interblock (int) – contains a flag for each layer that defines the method of calculating interblock transmissivity (LAYAVG). Use as many records needed to enter a value for each layer. 0 = harmonic mean (This is most appropriate for confined and unconfined aquifers with abrupt boundaries in transmissivity at the cell boundaries or for confined aquifers with uniform hydraulic conductivity). 1 = logarithmic mean (This is most appropriate for confined aquifers with gradually varying transmissivities). 2 = arithmetic mean of saturated thickness and logarithmic-mean hydraulic conductivity. (This is most appropriate for unconfined aquifers with gradually varying transmissivities).

  • layer_type (int) – contains a flag for each layer that specifies the layer type (LAYTYP). Use as many records needed to enter a value for each layer. 0 = confined not 0 = convertible

  • specific_storage (float or xr.DataArray of floats) – is specific storage (SS). Read only for a transient simulation (at least one transient stress period). Include only if at least one stress period is transient. Specific storage is the amount of water released when the head in an aquifer drops by 1 m, in one meter of the aquifer (or model layer). The unit is: ((m3 / m2) / m head change) / m aquifer = m-1

  • specific_yield (float or xr.DataArray of floats) – is specific yield (SY). Read only for a transient simulation (at least one transient stress period) and if the layer is convertible (layer_type is not 0). Include only if at least one stress period is transient. The specific yield is the volume of water released from (or added to) the pore matrix for one meter of head change. The unit is: (m3 / m2) / m head change = dimensionless

  • save_budget (int) – is a flag and a unit number (ILPFCB). If save_budget > 0, it is the unit number to which cell-by-cell flow terms will be written when “SAVE BUDGET” or a non-zero value for save_budget is specified in Output Control. The terms that are saved are storage, constant-head flow, and flow between adjacent cells. If save_budget = 0, cell-by-cell flow terms will not be written. If save_budget < 0, cell-by-cell flow for constant-head cells will be written in the listing file when “SAVE BUDGET” or a non-zero value for ICBCFL is specified in Output Control. Cell-by-cell flow to storage and between adjacent cells will not be written to any file. The flow terms that will be saved are the flows through the right, front, and lower cell face. Positive values represent flows toward higher column, row, or layer numbers.

  • layer_wet (int) – contains a flag for each layer that indicates if wetting is active. Use as many records as needed to enter a value for each layer. 0 = wetting is inactive not 0 = wetting is active

  • interval_wet (int) – is the iteration interval for attempting to wet cells. Wetting is attempted every interval_wet iteration (IWETIT). If using the PCG solver (Hill, 1990), this applies to outer iterations, not inner iterations. If interval_wet less than or equal to 0, it is changed to 1.

  • method_wet (int) – is a flag that determines which equation is used to define the initial head at cells that become wet (IHDWET). If method_wet = 0, this equation is used: h = BOT + WETFCT (hn - BOT). (hn is the head in the neighboring cell that is causing the dry cell to convert to an active cell.) If method_wet is not 0, this equation is used: h = BOT + WETFCT(THRESH). WETFCT is a factor that is included in the calculation of the head that is initially established at a cell when it is converted from dry to wet.

  • head_dry (float, optional) – is the head that is assigned to cells that are converted to dry during a simulation (HDRY). Although this value plays no role in the model calculations, it is useful as an indicator when looking at the resulting heads that are output from the model. HDRY is thus similar to HNOFLO in the Basic Package, which is the value assigned to cells that are no-flow cells at the start of a model simulation. Default value: 1.0e20.

all(dim=None, **kwargs)

Reduce this LayerPropertyFlow’s data by applying all along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply all. By default all is applied over all dimensions.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating all on this object’s data.

Returns

reduced – New LayerPropertyFlow object with all applied to its data and the indicated dimension(s) removed.

Return type

LayerPropertyFlow

any(dim=None, **kwargs)

Reduce this LayerPropertyFlow’s data by applying any along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply any. By default any is applied over all dimensions.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating any on this object’s data.

Returns

reduced – New LayerPropertyFlow object with any applied to its data and the indicated dimension(s) removed.

Return type

LayerPropertyFlow

count(dim=None, **kwargs)

Reduce this LayerPropertyFlow’s data by applying count along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply count. By default count is applied over all dimensions.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating count on this object’s data.

Returns

reduced – New LayerPropertyFlow object with count applied to its data and the indicated dimension(s) removed.

Return type

LayerPropertyFlow

cumprod(dim=None, skipna=None, **kwargs)

Apply cumprod along some dimension of LayerPropertyFlow.

Parameters
  • dim (str or sequence of str, optional) – Dimension over which to apply cumprod.

  • axis (int or sequence of int, optional) – Axis over which to apply cumprod. Only one of the ‘dim’ and ‘axis’ arguments can be supplied.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to cumprod.

Returns

cumvalue – New LayerPropertyFlow object with cumprod applied to its data along the indicated dimension.

Return type

LayerPropertyFlow

cumsum(dim=None, skipna=None, **kwargs)

Apply cumsum along some dimension of LayerPropertyFlow.

Parameters
  • dim (str or sequence of str, optional) – Dimension over which to apply cumsum.

  • axis (int or sequence of int, optional) – Axis over which to apply cumsum. Only one of the ‘dim’ and ‘axis’ arguments can be supplied.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to cumsum.

Returns

cumvalue – New LayerPropertyFlow object with cumsum applied to its data along the indicated dimension.

Return type

LayerPropertyFlow

head_dry
horizontal_anisotropy
interblock
interval_wet
k_horizontal
k_vertical
layer_type
layer_wet
max(dim=None, skipna=None, **kwargs)

Reduce this LayerPropertyFlow’s data by applying max along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply max. By default max is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating max on this object’s data.

Returns

reduced – New LayerPropertyFlow object with max applied to its data and the indicated dimension(s) removed.

Return type

LayerPropertyFlow

mean(dim=None, skipna=None, **kwargs)

Reduce this LayerPropertyFlow’s data by applying mean along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply mean. By default mean is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating mean on this object’s data.

Returns

reduced – New LayerPropertyFlow object with mean applied to its data and the indicated dimension(s) removed.

Return type

LayerPropertyFlow

median(dim=None, skipna=None, **kwargs)

Reduce this LayerPropertyFlow’s data by applying median along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply median. By default median is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating median on this object’s data.

Returns

reduced – New LayerPropertyFlow object with median applied to its data and the indicated dimension(s) removed.

Return type

LayerPropertyFlow

method_wet
min(dim=None, skipna=None, **kwargs)

Reduce this LayerPropertyFlow’s data by applying min along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply min. By default min is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating min on this object’s data.

Returns

reduced – New LayerPropertyFlow object with min applied to its data and the indicated dimension(s) removed.

Return type

LayerPropertyFlow

prod(dim=None, skipna=None, **kwargs)

Reduce this LayerPropertyFlow’s data by applying prod along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply prod. By default prod is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • min_count (int, default: None) – The required number of valid values to perform the operation. If fewer than min_count non-NA values are present the result will be NA. Only used if skipna is set to True or defaults to True for the array’s dtype. New in version 0.10.8: Added with the default being None. Changed in version 0.17.0: if specified on an integer array and skipna=True, the result will be a float array.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating prod on this object’s data.

Returns

reduced – New LayerPropertyFlow object with prod applied to its data and the indicated dimension(s) removed.

Return type

LayerPropertyFlow

save_budget
specific_storage
specific_yield
std(dim=None, skipna=None, **kwargs)

Reduce this LayerPropertyFlow’s data by applying std along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply std. By default std is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating std on this object’s data.

Returns

reduced – New LayerPropertyFlow object with std applied to its data and the indicated dimension(s) removed.

Return type

LayerPropertyFlow

sum(dim=None, skipna=None, **kwargs)

Reduce this LayerPropertyFlow’s data by applying sum along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply sum. By default sum is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • min_count (int, default: None) – The required number of valid values to perform the operation. If fewer than min_count non-NA values are present the result will be NA. Only used if skipna is set to True or defaults to True for the array’s dtype. New in version 0.10.8: Added with the default being None. Changed in version 0.17.0: if specified on an integer array and skipna=True, the result will be a float array.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating sum on this object’s data.

Returns

reduced – New LayerPropertyFlow object with sum applied to its data and the indicated dimension(s) removed.

Return type

LayerPropertyFlow

var(dim=None, skipna=None, **kwargs)

Reduce this LayerPropertyFlow’s data by applying var along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply var. By default var is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating var on this object’s data.

Returns

reduced – New LayerPropertyFlow object with var applied to its data and the indicated dimension(s) removed.

Return type

LayerPropertyFlow

class imod.wq.MassLoading(concentration)[source]

Bases: xarray.core.common.DataWithCoords, xarray.core.arithmetic.DatasetArithmetic, Mapping

Mass loading package. Has no direct effect on groundwater flow, is only included via MT3DMS source and sinks. (SSM ITYPE 15)

Parameters

concentration (xr.DataArray of floats) –

all(dim=None, **kwargs)

Reduce this MassLoading’s data by applying all along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply all. By default all is applied over all dimensions.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating all on this object’s data.

Returns

reduced – New MassLoading object with all applied to its data and the indicated dimension(s) removed.

Return type

MassLoading

any(dim=None, **kwargs)

Reduce this MassLoading’s data by applying any along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply any. By default any is applied over all dimensions.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating any on this object’s data.

Returns

reduced – New MassLoading object with any applied to its data and the indicated dimension(s) removed.

Return type

MassLoading

concentration
count(dim=None, **kwargs)

Reduce this MassLoading’s data by applying count along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply count. By default count is applied over all dimensions.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating count on this object’s data.

Returns

reduced – New MassLoading object with count applied to its data and the indicated dimension(s) removed.

Return type

MassLoading

cumprod(dim=None, skipna=None, **kwargs)

Apply cumprod along some dimension of MassLoading.

Parameters
  • dim (str or sequence of str, optional) – Dimension over which to apply cumprod.

  • axis (int or sequence of int, optional) – Axis over which to apply cumprod. Only one of the ‘dim’ and ‘axis’ arguments can be supplied.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to cumprod.

Returns

cumvalue – New MassLoading object with cumprod applied to its data along the indicated dimension.

Return type

MassLoading

cumsum(dim=None, skipna=None, **kwargs)

Apply cumsum along some dimension of MassLoading.

Parameters
  • dim (str or sequence of str, optional) – Dimension over which to apply cumsum.

  • axis (int or sequence of int, optional) – Axis over which to apply cumsum. Only one of the ‘dim’ and ‘axis’ arguments can be supplied.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to cumsum.

Returns

cumvalue – New MassLoading object with cumsum applied to its data along the indicated dimension.

Return type

MassLoading

max(dim=None, skipna=None, **kwargs)

Reduce this MassLoading’s data by applying max along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply max. By default max is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating max on this object’s data.

Returns

reduced – New MassLoading object with max applied to its data and the indicated dimension(s) removed.

Return type

MassLoading

mean(dim=None, skipna=None, **kwargs)

Reduce this MassLoading’s data by applying mean along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply mean. By default mean is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating mean on this object’s data.

Returns

reduced – New MassLoading object with mean applied to its data and the indicated dimension(s) removed.

Return type

MassLoading

median(dim=None, skipna=None, **kwargs)

Reduce this MassLoading’s data by applying median along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply median. By default median is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating median on this object’s data.

Returns

reduced – New MassLoading object with median applied to its data and the indicated dimension(s) removed.

Return type

MassLoading

min(dim=None, skipna=None, **kwargs)

Reduce this MassLoading’s data by applying min along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply min. By default min is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating min on this object’s data.

Returns

reduced – New MassLoading object with min applied to its data and the indicated dimension(s) removed.

Return type

MassLoading

prod(dim=None, skipna=None, **kwargs)

Reduce this MassLoading’s data by applying prod along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply prod. By default prod is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • min_count (int, default: None) – The required number of valid values to perform the operation. If fewer than min_count non-NA values are present the result will be NA. Only used if skipna is set to True or defaults to True for the array’s dtype. New in version 0.10.8: Added with the default being None. Changed in version 0.17.0: if specified on an integer array and skipna=True, the result will be a float array.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating prod on this object’s data.

Returns

reduced – New MassLoading object with prod applied to its data and the indicated dimension(s) removed.

Return type

MassLoading

repeat_stress(concentration, use_cftime=False)[source]
std(dim=None, skipna=None, **kwargs)

Reduce this MassLoading’s data by applying std along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply std. By default std is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating std on this object’s data.

Returns

reduced – New MassLoading object with std applied to its data and the indicated dimension(s) removed.

Return type

MassLoading

sum(dim=None, skipna=None, **kwargs)

Reduce this MassLoading’s data by applying sum along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply sum. By default sum is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • min_count (int, default: None) – The required number of valid values to perform the operation. If fewer than min_count non-NA values are present the result will be NA. Only used if skipna is set to True or defaults to True for the array’s dtype. New in version 0.10.8: Added with the default being None. Changed in version 0.17.0: if specified on an integer array and skipna=True, the result will be a float array.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating sum on this object’s data.

Returns

reduced – New MassLoading object with sum applied to its data and the indicated dimension(s) removed.

Return type

MassLoading

var(dim=None, skipna=None, **kwargs)

Reduce this MassLoading’s data by applying var along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply var. By default var is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating var on this object’s data.

Returns

reduced – New MassLoading object with var applied to its data and the indicated dimension(s) removed.

Return type

MassLoading

class imod.wq.OutputControl(save_head_idf=False, save_concentration_idf=False, save_budget_idf=False, save_head_tec=False, save_concentration_tec=False, save_budget_tec=False, save_head_vtk=False, save_concentration_vtk=False, save_budget_vtk=False)[source]

Bases: xarray.core.common.DataWithCoords, xarray.core.arithmetic.DatasetArithmetic, Mapping

The Output Control Option is used to specify if head, drawdown, or budget data should be saved and in which format.

Parameters
  • save_head_idf (bool, optional) – Save calculated head values in IDF format. Default value is False.

  • save_concentration_idf (bool, optional) – Save calculated concentration values in IDF format. Default value is False.

  • save_budget_idf (bool, optional) – Save calculated budget in IDF format. Default value is False.

  • save_head_tec (bool, optional) – Save calculated head values in a format compatible with Tecplot. Default value is False.

  • save_concentration_tec (bool, optional) – Save calculated concentration values in a format compatible with Tecplot. Default value is False.

  • save_budget_tec (bool, optional) – Save calculated budget in a format compatible with Tecplot. Default value is False.

  • save_head_vtk (bool, optional) – Save calculated head values in a format compatible with ParaView (VTK). Default value is False.

  • save_concentration_vtk (bool, optional) – Save calculated concentration values in a format compatible with ParaView (VTK). Default value is False.

  • save_budget_vtk (bool, optional) – Save calculated budget in a format compatible with ParaView (VTK). Default value is False.

all(dim=None, **kwargs)

Reduce this OutputControl’s data by applying all along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply all. By default all is applied over all dimensions.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating all on this object’s data.

Returns

reduced – New OutputControl object with all applied to its data and the indicated dimension(s) removed.

Return type

OutputControl

any(dim=None, **kwargs)

Reduce this OutputControl’s data by applying any along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply any. By default any is applied over all dimensions.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating any on this object’s data.

Returns

reduced – New OutputControl object with any applied to its data and the indicated dimension(s) removed.

Return type

OutputControl

count(dim=None, **kwargs)

Reduce this OutputControl’s data by applying count along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply count. By default count is applied over all dimensions.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating count on this object’s data.

Returns

reduced – New OutputControl object with count applied to its data and the indicated dimension(s) removed.

Return type

OutputControl

cumprod(dim=None, skipna=None, **kwargs)

Apply cumprod along some dimension of OutputControl.

Parameters
  • dim (str or sequence of str, optional) – Dimension over which to apply cumprod.

  • axis (int or sequence of int, optional) – Axis over which to apply cumprod. Only one of the ‘dim’ and ‘axis’ arguments can be supplied.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to cumprod.

Returns

cumvalue – New OutputControl object with cumprod applied to its data along the indicated dimension.

Return type

OutputControl

cumsum(dim=None, skipna=None, **kwargs)

Apply cumsum along some dimension of OutputControl.

Parameters
  • dim (str or sequence of str, optional) – Dimension over which to apply cumsum.

  • axis (int or sequence of int, optional) – Axis over which to apply cumsum. Only one of the ‘dim’ and ‘axis’ arguments can be supplied.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to cumsum.

Returns

cumvalue – New OutputControl object with cumsum applied to its data along the indicated dimension.

Return type

OutputControl

max(dim=None, skipna=None, **kwargs)

Reduce this OutputControl’s data by applying max along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply max. By default max is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating max on this object’s data.

Returns

reduced – New OutputControl object with max applied to its data and the indicated dimension(s) removed.

Return type

OutputControl

mean(dim=None, skipna=None, **kwargs)

Reduce this OutputControl’s data by applying mean along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply mean. By default mean is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating mean on this object’s data.

Returns

reduced – New OutputControl object with mean applied to its data and the indicated dimension(s) removed.

Return type

OutputControl

median(dim=None, skipna=None, **kwargs)

Reduce this OutputControl’s data by applying median along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply median. By default median is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating median on this object’s data.

Returns

reduced – New OutputControl object with median applied to its data and the indicated dimension(s) removed.

Return type

OutputControl

min(dim=None, skipna=None, **kwargs)

Reduce this OutputControl’s data by applying min along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply min. By default min is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating min on this object’s data.

Returns

reduced – New OutputControl object with min applied to its data and the indicated dimension(s) removed.

Return type

OutputControl

prod(dim=None, skipna=None, **kwargs)

Reduce this OutputControl’s data by applying prod along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply prod. By default prod is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • min_count (int, default: None) – The required number of valid values to perform the operation. If fewer than min_count non-NA values are present the result will be NA. Only used if skipna is set to True or defaults to True for the array’s dtype. New in version 0.10.8: Added with the default being None. Changed in version 0.17.0: if specified on an integer array and skipna=True, the result will be a float array.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating prod on this object’s data.

Returns

reduced – New OutputControl object with prod applied to its data and the indicated dimension(s) removed.

Return type

OutputControl

save_budget_idf
save_budget_tec
save_budget_vtk
save_concentration_idf
save_concentration_tec
save_concentration_vtk
save_head_idf
save_head_tec
save_head_vtk
std(dim=None, skipna=None, **kwargs)

Reduce this OutputControl’s data by applying std along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply std. By default std is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating std on this object’s data.

Returns

reduced – New OutputControl object with std applied to its data and the indicated dimension(s) removed.

Return type

OutputControl

sum(dim=None, skipna=None, **kwargs)

Reduce this OutputControl’s data by applying sum along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply sum. By default sum is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • min_count (int, default: None) – The required number of valid values to perform the operation. If fewer than min_count non-NA values are present the result will be NA. Only used if skipna is set to True or defaults to True for the array’s dtype. New in version 0.10.8: Added with the default being None. Changed in version 0.17.0: if specified on an integer array and skipna=True, the result will be a float array.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating sum on this object’s data.

Returns

reduced – New OutputControl object with sum applied to its data and the indicated dimension(s) removed.

Return type

OutputControl

var(dim=None, skipna=None, **kwargs)

Reduce this OutputControl’s data by applying var along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply var. By default var is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating var on this object’s data.

Returns

reduced – New OutputControl object with var applied to its data and the indicated dimension(s) removed.

Return type

OutputControl

class imod.wq.ParallelKrylovFlowSolver(max_iter=150, inner_iter=100, hclose=0.0001, rclose=1000.0, relax=0.98, h_fstrict=1.0, r_fstrict=1.0, partition='uniform', solver='pcg', preconditioner='ilu', deflate=False, debug=False, load_balance_weight=None)[source]

Bases: xarray.core.common.DataWithCoords, xarray.core.arithmetic.DatasetArithmetic, Mapping

The Parallel Krylov Flow Solver is used for parallel solving of the flow model.

Parameters
  • max_iter (int) – is the maximum number of outer iterations (MXITER); it should be set to an integer greater than one (1) only when a nonlinear sorption isotherm is included in simulation.

  • inner_iter (int) – is the maximum number of inner iterations (INNERIT); a value of 30-50 should be adequate for most problems.

  • hclose (float) – is the head change criterion for convergence (HCLOSEPKS), in units of length. When the maximum absolute value of head change from all nodes during an iteration is less than or equal to HCLOSE, and the criterion for RCLOSE is also satisfied (see below), iteration stops.

  • rclose (float) – is the residual criterion for convergence (RCLOSEPKS), in units of cubic length per time. The units for length and time are the same as established for all model data. When the maximum absolute value of the residual at all nodes during an iteration is less than or equal to RCLOSE, and the criterion for HCLOSE is also satisfied (see above), iteration stops.

  • relax (float) – is the relaxation parameter used. Usually, RELAX = 1.0, but for some problems a value of 0.99, 0.98, or 0.97 will reduce the number of iterations required for convergence.

  • h_fstrict (float, optional) – is a factor to apply to HCLOSE to set a stricter hclose for the linear inner iterations (H_FSTRICTPKS). HCLOSE_inner is calculated as follows: HCLOSEPKS * H_FSTRICTPKS.

  • r_fstrict (float, optional) – is a factor to apply to RCLOSE to set a stricter rclose for the linear inner iterations (R_FSTRICTPKS). RCLOSE_inner is calculated as follows: RCLOSEPKS * R_FSTRICTPKS.

  • partition ({"uniform", "rcb"}, optional) – Partitioning option (PARTOPT). “uniform” partitions the model domain into equally sized subdomains. “rcb” (Recursive Coordinate Bisection) uses a 2D pointer grid with weights to partition the model domain. Default value: “uniform”

  • solver ({"pcg"}, optional) – Flag indicating the linear solver to be used (ISOLVER). Default value: “pcg”

  • preconditioner ({"ilu"}, optional) – Flag inicating the preconditioner to be used (NPC). Devault value: “ilu”

  • deflate ({True, False}, optional) – Flag for deflation preconditioner. Default value: False

  • debug ({True, False}, optional) – Debug option. Default value: False

  • load_balance_weight (xarray.DataArray, optional) –

    2D grid with load balance weights, used when partition = “rcb” (Recursive Coordinate Bisection). If None (default), then the module will create a load balance grid by summing active cells over layers: (ibound != 0).sum(“layer”)

    Note that even though the iMOD-SEAWAT helpfile states .idf is accepted, it is not. This load balance grid should be a .asc file (without a header). Formatting is done as follows: pd.DataFrame(load_balance_weight.values).to_csv(path, sep=’t’, header=False, index=False, float_format = “%8.2f”)

all(dim=None, **kwargs)

Reduce this ParallelKrylovFlowSolver’s data by applying all along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply all. By default all is applied over all dimensions.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating all on this object’s data.

Returns

reduced – New ParallelKrylovFlowSolver object with all applied to its data and the indicated dimension(s) removed.

Return type

ParallelKrylovFlowSolver

any(dim=None, **kwargs)

Reduce this ParallelKrylovFlowSolver’s data by applying any along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply any. By default any is applied over all dimensions.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating any on this object’s data.

Returns

reduced – New ParallelKrylovFlowSolver object with any applied to its data and the indicated dimension(s) removed.

Return type

ParallelKrylovFlowSolver

count(dim=None, **kwargs)

Reduce this ParallelKrylovFlowSolver’s data by applying count along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply count. By default count is applied over all dimensions.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating count on this object’s data.

Returns

reduced – New ParallelKrylovFlowSolver object with count applied to its data and the indicated dimension(s) removed.

Return type

ParallelKrylovFlowSolver

cumprod(dim=None, skipna=None, **kwargs)

Apply cumprod along some dimension of ParallelKrylovFlowSolver.

Parameters
  • dim (str or sequence of str, optional) – Dimension over which to apply cumprod.

  • axis (int or sequence of int, optional) – Axis over which to apply cumprod. Only one of the ‘dim’ and ‘axis’ arguments can be supplied.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to cumprod.

Returns

cumvalue – New ParallelKrylovFlowSolver object with cumprod applied to its data along the indicated dimension.

Return type

ParallelKrylovFlowSolver

cumsum(dim=None, skipna=None, **kwargs)

Apply cumsum along some dimension of ParallelKrylovFlowSolver.

Parameters
  • dim (str or sequence of str, optional) – Dimension over which to apply cumsum.

  • axis (int or sequence of int, optional) – Axis over which to apply cumsum. Only one of the ‘dim’ and ‘axis’ arguments can be supplied.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to cumsum.

Returns

cumvalue – New ParallelKrylovFlowSolver object with cumsum applied to its data along the indicated dimension.

Return type

ParallelKrylovFlowSolver

max(dim=None, skipna=None, **kwargs)

Reduce this ParallelKrylovFlowSolver’s data by applying max along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply max. By default max is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating max on this object’s data.

Returns

reduced – New ParallelKrylovFlowSolver object with max applied to its data and the indicated dimension(s) removed.

Return type

ParallelKrylovFlowSolver

mean(dim=None, skipna=None, **kwargs)

Reduce this ParallelKrylovFlowSolver’s data by applying mean along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply mean. By default mean is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating mean on this object’s data.

Returns

reduced – New ParallelKrylovFlowSolver object with mean applied to its data and the indicated dimension(s) removed.

Return type

ParallelKrylovFlowSolver

median(dim=None, skipna=None, **kwargs)

Reduce this ParallelKrylovFlowSolver’s data by applying median along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply median. By default median is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating median on this object’s data.

Returns

reduced – New ParallelKrylovFlowSolver object with median applied to its data and the indicated dimension(s) removed.

Return type

ParallelKrylovFlowSolver

min(dim=None, skipna=None, **kwargs)

Reduce this ParallelKrylovFlowSolver’s data by applying min along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply min. By default min is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating min on this object’s data.

Returns

reduced – New ParallelKrylovFlowSolver object with min applied to its data and the indicated dimension(s) removed.

Return type

ParallelKrylovFlowSolver

prod(dim=None, skipna=None, **kwargs)

Reduce this ParallelKrylovFlowSolver’s data by applying prod along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply prod. By default prod is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • min_count (int, default: None) – The required number of valid values to perform the operation. If fewer than min_count non-NA values are present the result will be NA. Only used if skipna is set to True or defaults to True for the array’s dtype. New in version 0.10.8: Added with the default being None. Changed in version 0.17.0: if specified on an integer array and skipna=True, the result will be a float array.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating prod on this object’s data.

Returns

reduced – New ParallelKrylovFlowSolver object with prod applied to its data and the indicated dimension(s) removed.

Return type

ParallelKrylovFlowSolver

std(dim=None, skipna=None, **kwargs)

Reduce this ParallelKrylovFlowSolver’s data by applying std along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply std. By default std is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating std on this object’s data.

Returns

reduced – New ParallelKrylovFlowSolver object with std applied to its data and the indicated dimension(s) removed.

Return type

ParallelKrylovFlowSolver

sum(dim=None, skipna=None, **kwargs)

Reduce this ParallelKrylovFlowSolver’s data by applying sum along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply sum. By default sum is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • min_count (int, default: None) – The required number of valid values to perform the operation. If fewer than min_count non-NA values are present the result will be NA. Only used if skipna is set to True or defaults to True for the array’s dtype. New in version 0.10.8: Added with the default being None. Changed in version 0.17.0: if specified on an integer array and skipna=True, the result will be a float array.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating sum on this object’s data.

Returns

reduced – New ParallelKrylovFlowSolver object with sum applied to its data and the indicated dimension(s) removed.

Return type

ParallelKrylovFlowSolver

var(dim=None, skipna=None, **kwargs)

Reduce this ParallelKrylovFlowSolver’s data by applying var along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply var. By default var is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating var on this object’s data.

Returns

reduced – New ParallelKrylovFlowSolver object with var applied to its data and the indicated dimension(s) removed.

Return type

ParallelKrylovFlowSolver

class imod.wq.ParallelKrylovTransportSolver(max_iter=1, inner_iter=50, cclose=1e-06, relax=0.98, partition='uniform', solver='bicgstab', preconditioner='ilu', debug=False, load_balance_weight=None)[source]

Bases: xarray.core.common.DataWithCoords, xarray.core.arithmetic.DatasetArithmetic, Mapping

The Parallel Krylov Transport Solver is used for parallel solving of the transport model.

Parameters
  • max_iter (int) – is the maximum number of outer iterations (MXITER); it should be set to an integer greater than one (1) only when a nonlinear sorption isotherm is included in simulation.

  • inner_iter (int) – is the maximum number of inner iterations (INNERIT); a value of 30-50 should be adequate for most problems.

  • cclose (float, optional) – is the convergence criterion in terms of relative concentration; a real value between 10-4 and 10-6 is generally adequate. Default value: 1.0e-6.

  • relax (float, optional) – is the relaxation parameter used. Usually, RELAX = 1.0, but for some problems a value of 0.99, 0.98, or 0.97 will reduce the number of iterations required for convergence. Default value: 0.98.

  • partition ({"uniform", "rcb"}, optional) – Partitioning option (PARTOPT). “uniform” partitions the model domain into equally sized subdomains. “rcb” (Recursive Coordinate Bisection) uses a 2D pointer grid with weights to partition the model domain. Default value: “uniform”.

  • solver ({"bicgstab", "gmres", "gcr"}, optional) – Flag indicating the linear solver to be used (ISOLVER). Default value: “bicgstab”

  • preconditioner ({"ilu"}, optional) – Flag inicating the preconditioner to be used (NPC). Devault value: “ilu”.

  • debug ({True, False}, optional) – Debug option. Default value: False

  • load_balance_weight (xarray.DataArray, optional) –

    2D grid with load balance weights, used when partition = “rcb” (Recursive Coordinate Bisection). If None (default), then the module will create a load balance grid by summing active cells over layers: (ibound != 0).sum(“layer”)

    Note that even though the iMOD-SEAWAT helpfile states .idf is accepted, it is not. This load balance grid should be a .asc file (without a header). Formatting is done as follows: pd.DataFrame(load_balance_weight.values).to_csv(path, sep=’t’, header=False, index=False, float_format = “%8.2f”)

all(dim=None, **kwargs)

Reduce this ParallelKrylovTransportSolver’s data by applying all along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply all. By default all is applied over all dimensions.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating all on this object’s data.

Returns

reduced – New ParallelKrylovTransportSolver object with all applied to its data and the indicated dimension(s) removed.

Return type

ParallelKrylovTransportSolver

any(dim=None, **kwargs)

Reduce this ParallelKrylovTransportSolver’s data by applying any along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply any. By default any is applied over all dimensions.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating any on this object’s data.

Returns

reduced – New ParallelKrylovTransportSolver object with any applied to its data and the indicated dimension(s) removed.

Return type

ParallelKrylovTransportSolver

count(dim=None, **kwargs)

Reduce this ParallelKrylovTransportSolver’s data by applying count along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply count. By default count is applied over all dimensions.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating count on this object’s data.

Returns

reduced – New ParallelKrylovTransportSolver object with count applied to its data and the indicated dimension(s) removed.

Return type

ParallelKrylovTransportSolver

cumprod(dim=None, skipna=None, **kwargs)

Apply cumprod along some dimension of ParallelKrylovTransportSolver.

Parameters
  • dim (str or sequence of str, optional) – Dimension over which to apply cumprod.

  • axis (int or sequence of int, optional) – Axis over which to apply cumprod. Only one of the ‘dim’ and ‘axis’ arguments can be supplied.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to cumprod.

Returns

cumvalue – New ParallelKrylovTransportSolver object with cumprod applied to its data along the indicated dimension.

Return type

ParallelKrylovTransportSolver

cumsum(dim=None, skipna=None, **kwargs)

Apply cumsum along some dimension of ParallelKrylovTransportSolver.

Parameters
  • dim (str or sequence of str, optional) – Dimension over which to apply cumsum.

  • axis (int or sequence of int, optional) – Axis over which to apply cumsum. Only one of the ‘dim’ and ‘axis’ arguments can be supplied.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to cumsum.

Returns

cumvalue – New ParallelKrylovTransportSolver object with cumsum applied to its data along the indicated dimension.

Return type

ParallelKrylovTransportSolver

max(dim=None, skipna=None, **kwargs)

Reduce this ParallelKrylovTransportSolver’s data by applying max along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply max. By default max is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating max on this object’s data.

Returns

reduced – New ParallelKrylovTransportSolver object with max applied to its data and the indicated dimension(s) removed.

Return type

ParallelKrylovTransportSolver

mean(dim=None, skipna=None, **kwargs)

Reduce this ParallelKrylovTransportSolver’s data by applying mean along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply mean. By default mean is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating mean on this object’s data.

Returns

reduced – New ParallelKrylovTransportSolver object with mean applied to its data and the indicated dimension(s) removed.

Return type

ParallelKrylovTransportSolver

median(dim=None, skipna=None, **kwargs)

Reduce this ParallelKrylovTransportSolver’s data by applying median along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply median. By default median is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating median on this object’s data.

Returns

reduced – New ParallelKrylovTransportSolver object with median applied to its data and the indicated dimension(s) removed.

Return type

ParallelKrylovTransportSolver

min(dim=None, skipna=None, **kwargs)

Reduce this ParallelKrylovTransportSolver’s data by applying min along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply min. By default min is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating min on this object’s data.

Returns

reduced – New ParallelKrylovTransportSolver object with min applied to its data and the indicated dimension(s) removed.

Return type

ParallelKrylovTransportSolver

prod(dim=None, skipna=None, **kwargs)

Reduce this ParallelKrylovTransportSolver’s data by applying prod along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply prod. By default prod is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • min_count (int, default: None) – The required number of valid values to perform the operation. If fewer than min_count non-NA values are present the result will be NA. Only used if skipna is set to True or defaults to True for the array’s dtype. New in version 0.10.8: Added with the default being None. Changed in version 0.17.0: if specified on an integer array and skipna=True, the result will be a float array.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating prod on this object’s data.

Returns

reduced – New ParallelKrylovTransportSolver object with prod applied to its data and the indicated dimension(s) removed.

Return type

ParallelKrylovTransportSolver

std(dim=None, skipna=None, **kwargs)

Reduce this ParallelKrylovTransportSolver’s data by applying std along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply std. By default std is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating std on this object’s data.

Returns

reduced – New ParallelKrylovTransportSolver object with std applied to its data and the indicated dimension(s) removed.

Return type

ParallelKrylovTransportSolver

sum(dim=None, skipna=None, **kwargs)

Reduce this ParallelKrylovTransportSolver’s data by applying sum along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply sum. By default sum is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • min_count (int, default: None) – The required number of valid values to perform the operation. If fewer than min_count non-NA values are present the result will be NA. Only used if skipna is set to True or defaults to True for the array’s dtype. New in version 0.10.8: Added with the default being None. Changed in version 0.17.0: if specified on an integer array and skipna=True, the result will be a float array.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating sum on this object’s data.

Returns

reduced – New ParallelKrylovTransportSolver object with sum applied to its data and the indicated dimension(s) removed.

Return type

ParallelKrylovTransportSolver

var(dim=None, skipna=None, **kwargs)

Reduce this ParallelKrylovTransportSolver’s data by applying var along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply var. By default var is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating var on this object’s data.

Returns

reduced – New ParallelKrylovTransportSolver object with var applied to its data and the indicated dimension(s) removed.

Return type

ParallelKrylovTransportSolver

class imod.wq.PreconditionedConjugateGradientSolver(max_iter=150, inner_iter=100, rclose=1000.0, hclose=0.0001, relax=0.98, damp=1.0)[source]

Bases: xarray.core.common.DataWithCoords, xarray.core.arithmetic.DatasetArithmetic, Mapping

The Preconditioned Conjugate Gradient Solver is used to solve the finite difference equations in each step of a MODFLOW stress period.

Parameters
  • max_iter (int) – is the maximum number of outer iterations - that is, calss to the solutions routine (MXITER). For a linear problem max_iter should be 1, unless more than 50 inner iterations are required, when max_iter could be as large as 10. A larger number (generally less than 100) is required for a nonlinear problem.

  • inner_iter (int) – is the number of inner iterations (iter1). For nonlinear problems, inner_iter usually ranges from 10 to 30; a value of 30 will be sufficient for most linear problems.

  • rclose (float) –

    is the residual criterion for convergence, in units of cubic length per time. The units for length and time are the same as established for all model data. When the maximum absolute value of the residual at all nodes during an iteration is less than or equal to RCLOSE, and the criterion for HCLOSE is also satisfied (see below), iteration stops.

    Default value: 100.0. Nota bene: this is aimed at regional modelling. For detailed studies (e.g. lab experiments) much smaller values can be required. Very general rule of thumb: should be less than 10% of smallest cell volume.

  • hclose (float) – is the head change criterion for convergence, in units of length. When the maximum absolute value of head change from all nodes during an iteration is less than or equal to HCLOSE, and the criterion for RCLOSE is also satisfied (see above), iteration stops. Default value: 1.0e-4. Nota bene: This is aimed at regional modelling, ` for detailed studies (e.g. lab experiments) much smaller values can be required.

  • relax (float, optional) – is the relaxation parameter used. Usually, RELAX = 1.0, but for some problems a value of 0.99, 0.98, or 0.97 will reduce the number of iterations required for convergence. Default value: 0.98.

  • damp (float, optional) – is the damping factor. It is typically set equal to one, which indicates no damping. A value less than 1 and greater than 0 causes damping. DAMP does not affect inner iterations; instead, it affects outer iterations. Default value: 1.0.

all(dim=None, **kwargs)

Reduce this PreconditionedConjugateGradientSolver’s data by applying all along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply all. By default all is applied over all dimensions.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating all on this object’s data.

Returns

reduced – New PreconditionedConjugateGradientSolver object with all applied to its data and the indicated dimension(s) removed.

Return type

PreconditionedConjugateGradientSolver

any(dim=None, **kwargs)

Reduce this PreconditionedConjugateGradientSolver’s data by applying any along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply any. By default any is applied over all dimensions.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating any on this object’s data.

Returns

reduced – New PreconditionedConjugateGradientSolver object with any applied to its data and the indicated dimension(s) removed.

Return type

PreconditionedConjugateGradientSolver

count(dim=None, **kwargs)

Reduce this PreconditionedConjugateGradientSolver’s data by applying count along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply count. By default count is applied over all dimensions.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating count on this object’s data.

Returns

reduced – New PreconditionedConjugateGradientSolver object with count applied to its data and the indicated dimension(s) removed.

Return type

PreconditionedConjugateGradientSolver

cumprod(dim=None, skipna=None, **kwargs)

Apply cumprod along some dimension of PreconditionedConjugateGradientSolver.

Parameters
  • dim (str or sequence of str, optional) – Dimension over which to apply cumprod.

  • axis (int or sequence of int, optional) – Axis over which to apply cumprod. Only one of the ‘dim’ and ‘axis’ arguments can be supplied.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to cumprod.

Returns

cumvalue – New PreconditionedConjugateGradientSolver object with cumprod applied to its data along the indicated dimension.

Return type

PreconditionedConjugateGradientSolver

cumsum(dim=None, skipna=None, **kwargs)

Apply cumsum along some dimension of PreconditionedConjugateGradientSolver.

Parameters
  • dim (str or sequence of str, optional) – Dimension over which to apply cumsum.

  • axis (int or sequence of int, optional) – Axis over which to apply cumsum. Only one of the ‘dim’ and ‘axis’ arguments can be supplied.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to cumsum.

Returns

cumvalue – New PreconditionedConjugateGradientSolver object with cumsum applied to its data along the indicated dimension.

Return type

PreconditionedConjugateGradientSolver

damp
hclose
inner_iter
max(dim=None, skipna=None, **kwargs)

Reduce this PreconditionedConjugateGradientSolver’s data by applying max along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply max. By default max is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating max on this object’s data.

Returns

reduced – New PreconditionedConjugateGradientSolver object with max applied to its data and the indicated dimension(s) removed.

Return type

PreconditionedConjugateGradientSolver

max_iter
mean(dim=None, skipna=None, **kwargs)

Reduce this PreconditionedConjugateGradientSolver’s data by applying mean along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply mean. By default mean is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating mean on this object’s data.

Returns

reduced – New PreconditionedConjugateGradientSolver object with mean applied to its data and the indicated dimension(s) removed.

Return type

PreconditionedConjugateGradientSolver

median(dim=None, skipna=None, **kwargs)

Reduce this PreconditionedConjugateGradientSolver’s data by applying median along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply median. By default median is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating median on this object’s data.

Returns

reduced – New PreconditionedConjugateGradientSolver object with median applied to its data and the indicated dimension(s) removed.

Return type

PreconditionedConjugateGradientSolver

min(dim=None, skipna=None, **kwargs)

Reduce this PreconditionedConjugateGradientSolver’s data by applying min along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply min. By default min is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating min on this object’s data.

Returns

reduced – New PreconditionedConjugateGradientSolver object with min applied to its data and the indicated dimension(s) removed.

Return type

PreconditionedConjugateGradientSolver

prod(dim=None, skipna=None, **kwargs)

Reduce this PreconditionedConjugateGradientSolver’s data by applying prod along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply prod. By default prod is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • min_count (int, default: None) – The required number of valid values to perform the operation. If fewer than min_count non-NA values are present the result will be NA. Only used if skipna is set to True or defaults to True for the array’s dtype. New in version 0.10.8: Added with the default being None. Changed in version 0.17.0: if specified on an integer array and skipna=True, the result will be a float array.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating prod on this object’s data.

Returns

reduced – New PreconditionedConjugateGradientSolver object with prod applied to its data and the indicated dimension(s) removed.

Return type

PreconditionedConjugateGradientSolver

rclose
relax
std(dim=None, skipna=None, **kwargs)

Reduce this PreconditionedConjugateGradientSolver’s data by applying std along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply std. By default std is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating std on this object’s data.

Returns

reduced – New PreconditionedConjugateGradientSolver object with std applied to its data and the indicated dimension(s) removed.

Return type

PreconditionedConjugateGradientSolver

sum(dim=None, skipna=None, **kwargs)

Reduce this PreconditionedConjugateGradientSolver’s data by applying sum along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply sum. By default sum is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • min_count (int, default: None) – The required number of valid values to perform the operation. If fewer than min_count non-NA values are present the result will be NA. Only used if skipna is set to True or defaults to True for the array’s dtype. New in version 0.10.8: Added with the default being None. Changed in version 0.17.0: if specified on an integer array and skipna=True, the result will be a float array.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating sum on this object’s data.

Returns

reduced – New PreconditionedConjugateGradientSolver object with sum applied to its data and the indicated dimension(s) removed.

Return type

PreconditionedConjugateGradientSolver

var(dim=None, skipna=None, **kwargs)

Reduce this PreconditionedConjugateGradientSolver’s data by applying var along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply var. By default var is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating var on this object’s data.

Returns

reduced – New PreconditionedConjugateGradientSolver object with var applied to its data and the indicated dimension(s) removed.

Return type

PreconditionedConjugateGradientSolver

class imod.wq.RechargeHighestActive(rate, concentration, save_budget=False)[source]

Bases: xarray.core.common.DataWithCoords, xarray.core.arithmetic.DatasetArithmetic, Mapping

The Recharge package is used to simulate a specified flux distributed over the top of the model and specified in units of length/time (usually m/d). Within MODFLOW, these rates are multiplied by the horizontal area of the cells to which they are applied to calculate the volumetric flux rates. In this class the Recharge gets applied to the highest active cell in each vertical column (NRCHOP=3).

Parameters
  • rate (float or xr.DataArray of floats) – is the amount of recharge.

  • concentration (float or xr.DataArray of floats) – is the concentration of the recharge

  • save_budget (bool, optional) – flag indicating if the budget needs to be saved. Default is False.

all(dim=None, **kwargs)

Reduce this RechargeHighestActive’s data by applying all along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply all. By default all is applied over all dimensions.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating all on this object’s data.

Returns

reduced – New RechargeHighestActive object with all applied to its data and the indicated dimension(s) removed.

Return type

RechargeHighestActive

any(dim=None, **kwargs)

Reduce this RechargeHighestActive’s data by applying any along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply any. By default any is applied over all dimensions.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating any on this object’s data.

Returns

reduced – New RechargeHighestActive object with any applied to its data and the indicated dimension(s) removed.

Return type

RechargeHighestActive

count(dim=None, **kwargs)

Reduce this RechargeHighestActive’s data by applying count along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply count. By default count is applied over all dimensions.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating count on this object’s data.

Returns

reduced – New RechargeHighestActive object with count applied to its data and the indicated dimension(s) removed.

Return type

RechargeHighestActive

cumprod(dim=None, skipna=None, **kwargs)

Apply cumprod along some dimension of RechargeHighestActive.

Parameters
  • dim (str or sequence of str, optional) – Dimension over which to apply cumprod.

  • axis (int or sequence of int, optional) – Axis over which to apply cumprod. Only one of the ‘dim’ and ‘axis’ arguments can be supplied.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to cumprod.

Returns

cumvalue – New RechargeHighestActive object with cumprod applied to its data along the indicated dimension.

Return type

RechargeHighestActive

cumsum(dim=None, skipna=None, **kwargs)

Apply cumsum along some dimension of RechargeHighestActive.

Parameters
  • dim (str or sequence of str, optional) – Dimension over which to apply cumsum.

  • axis (int or sequence of int, optional) – Axis over which to apply cumsum. Only one of the ‘dim’ and ‘axis’ arguments can be supplied.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to cumsum.

Returns

cumvalue – New RechargeHighestActive object with cumsum applied to its data along the indicated dimension.

Return type

RechargeHighestActive

max(dim=None, skipna=None, **kwargs)

Reduce this RechargeHighestActive’s data by applying max along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply max. By default max is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating max on this object’s data.

Returns

reduced – New RechargeHighestActive object with max applied to its data and the indicated dimension(s) removed.

Return type

RechargeHighestActive

mean(dim=None, skipna=None, **kwargs)

Reduce this RechargeHighestActive’s data by applying mean along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply mean. By default mean is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating mean on this object’s data.

Returns

reduced – New RechargeHighestActive object with mean applied to its data and the indicated dimension(s) removed.

Return type

RechargeHighestActive

median(dim=None, skipna=None, **kwargs)

Reduce this RechargeHighestActive’s data by applying median along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply median. By default median is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating median on this object’s data.

Returns

reduced – New RechargeHighestActive object with median applied to its data and the indicated dimension(s) removed.

Return type

RechargeHighestActive

min(dim=None, skipna=None, **kwargs)

Reduce this RechargeHighestActive’s data by applying min along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply min. By default min is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating min on this object’s data.

Returns

reduced – New RechargeHighestActive object with min applied to its data and the indicated dimension(s) removed.

Return type

RechargeHighestActive

prod(dim=None, skipna=None, **kwargs)

Reduce this RechargeHighestActive’s data by applying prod along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply prod. By default prod is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • min_count (int, default: None) – The required number of valid values to perform the operation. If fewer than min_count non-NA values are present the result will be NA. Only used if skipna is set to True or defaults to True for the array’s dtype. New in version 0.10.8: Added with the default being None. Changed in version 0.17.0: if specified on an integer array and skipna=True, the result will be a float array.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating prod on this object’s data.

Returns

reduced – New RechargeHighestActive object with prod applied to its data and the indicated dimension(s) removed.

Return type

RechargeHighestActive

repeat_stress(rate=None, concentration=None, use_cftime=False)[source]
std(dim=None, skipna=None, **kwargs)

Reduce this RechargeHighestActive’s data by applying std along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply std. By default std is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating std on this object’s data.

Returns

reduced – New RechargeHighestActive object with std applied to its data and the indicated dimension(s) removed.

Return type

RechargeHighestActive

sum(dim=None, skipna=None, **kwargs)

Reduce this RechargeHighestActive’s data by applying sum along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply sum. By default sum is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • min_count (int, default: None) – The required number of valid values to perform the operation. If fewer than min_count non-NA values are present the result will be NA. Only used if skipna is set to True or defaults to True for the array’s dtype. New in version 0.10.8: Added with the default being None. Changed in version 0.17.0: if specified on an integer array and skipna=True, the result will be a float array.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating sum on this object’s data.

Returns

reduced – New RechargeHighestActive object with sum applied to its data and the indicated dimension(s) removed.

Return type

RechargeHighestActive

var(dim=None, skipna=None, **kwargs)

Reduce this RechargeHighestActive’s data by applying var along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply var. By default var is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating var on this object’s data.

Returns

reduced – New RechargeHighestActive object with var applied to its data and the indicated dimension(s) removed.

Return type

RechargeHighestActive

class imod.wq.RechargeLayers(rate, recharge_layer, concentration, save_budget=False)[source]

Bases: xarray.core.common.DataWithCoords, xarray.core.arithmetic.DatasetArithmetic, Mapping

The Recharge package is used to simulate a specified flux distributed over the top of the model and specified in units of length/time (usually m/d). Within MODFLOW, these rates are multiplied by the horizontal area of the cells to which they are applied to calculate the volumetric flux rates. In this class the Recharge gets applied to a specific, specified, layer (NRCHOP=2).

Parameters
  • rate (float or xr.DataArray of floats) – is the amount of recharge.

  • recharge_layer (int or xr.DataArray of integers) – layer number variable that defines the layer in each vertical column where recharge is applied

  • concentration (float or xr.DataArray of floats) – is the concentration of the recharge

  • save_budget (bool, optional) – flag indicating if the budget needs to be saved. Default is False.

all(dim=None, **kwargs)

Reduce this RechargeLayers’s data by applying all along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply all. By default all is applied over all dimensions.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating all on this object’s data.

Returns

reduced – New RechargeLayers object with all applied to its data and the indicated dimension(s) removed.

Return type

RechargeLayers

any(dim=None, **kwargs)

Reduce this RechargeLayers’s data by applying any along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply any. By default any is applied over all dimensions.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating any on this object’s data.

Returns

reduced – New RechargeLayers object with any applied to its data and the indicated dimension(s) removed.

Return type

RechargeLayers

count(dim=None, **kwargs)

Reduce this RechargeLayers’s data by applying count along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply count. By default count is applied over all dimensions.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating count on this object’s data.

Returns

reduced – New RechargeLayers object with count applied to its data and the indicated dimension(s) removed.

Return type

RechargeLayers

cumprod(dim=None, skipna=None, **kwargs)

Apply cumprod along some dimension of RechargeLayers.

Parameters
  • dim (str or sequence of str, optional) – Dimension over which to apply cumprod.

  • axis (int or sequence of int, optional) – Axis over which to apply cumprod. Only one of the ‘dim’ and ‘axis’ arguments can be supplied.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to cumprod.

Returns

cumvalue – New RechargeLayers object with cumprod applied to its data along the indicated dimension.

Return type

RechargeLayers

cumsum(dim=None, skipna=None, **kwargs)

Apply cumsum along some dimension of RechargeLayers.

Parameters
  • dim (str or sequence of str, optional) – Dimension over which to apply cumsum.

  • axis (int or sequence of int, optional) – Axis over which to apply cumsum. Only one of the ‘dim’ and ‘axis’ arguments can be supplied.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to cumsum.

Returns

cumvalue – New RechargeLayers object with cumsum applied to its data along the indicated dimension.

Return type

RechargeLayers

max(dim=None, skipna=None, **kwargs)

Reduce this RechargeLayers’s data by applying max along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply max. By default max is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating max on this object’s data.

Returns

reduced – New RechargeLayers object with max applied to its data and the indicated dimension(s) removed.

Return type

RechargeLayers

mean(dim=None, skipna=None, **kwargs)

Reduce this RechargeLayers’s data by applying mean along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply mean. By default mean is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating mean on this object’s data.

Returns

reduced – New RechargeLayers object with mean applied to its data and the indicated dimension(s) removed.

Return type

RechargeLayers

median(dim=None, skipna=None, **kwargs)

Reduce this RechargeLayers’s data by applying median along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply median. By default median is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating median on this object’s data.

Returns

reduced – New RechargeLayers object with median applied to its data and the indicated dimension(s) removed.

Return type

RechargeLayers

min(dim=None, skipna=None, **kwargs)

Reduce this RechargeLayers’s data by applying min along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply min. By default min is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating min on this object’s data.

Returns

reduced – New RechargeLayers object with min applied to its data and the indicated dimension(s) removed.

Return type

RechargeLayers

prod(dim=None, skipna=None, **kwargs)

Reduce this RechargeLayers’s data by applying prod along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply prod. By default prod is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • min_count (int, default: None) – The required number of valid values to perform the operation. If fewer than min_count non-NA values are present the result will be NA. Only used if skipna is set to True or defaults to True for the array’s dtype. New in version 0.10.8: Added with the default being None. Changed in version 0.17.0: if specified on an integer array and skipna=True, the result will be a float array.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating prod on this object’s data.

Returns

reduced – New RechargeLayers object with prod applied to its data and the indicated dimension(s) removed.

Return type

RechargeLayers

std(dim=None, skipna=None, **kwargs)

Reduce this RechargeLayers’s data by applying std along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply std. By default std is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating std on this object’s data.

Returns

reduced – New RechargeLayers object with std applied to its data and the indicated dimension(s) removed.

Return type

RechargeLayers

sum(dim=None, skipna=None, **kwargs)

Reduce this RechargeLayers’s data by applying sum along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply sum. By default sum is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • min_count (int, default: None) – The required number of valid values to perform the operation. If fewer than min_count non-NA values are present the result will be NA. Only used if skipna is set to True or defaults to True for the array’s dtype. New in version 0.10.8: Added with the default being None. Changed in version 0.17.0: if specified on an integer array and skipna=True, the result will be a float array.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating sum on this object’s data.

Returns

reduced – New RechargeLayers object with sum applied to its data and the indicated dimension(s) removed.

Return type

RechargeLayers

var(dim=None, skipna=None, **kwargs)

Reduce this RechargeLayers’s data by applying var along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply var. By default var is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating var on this object’s data.

Returns

reduced – New RechargeLayers object with var applied to its data and the indicated dimension(s) removed.

Return type

RechargeLayers

class imod.wq.RechargeTopLayer(rate, concentration, save_budget=False)[source]

Bases: xarray.core.common.DataWithCoords, xarray.core.arithmetic.DatasetArithmetic, Mapping

The Recharge package is used to simulate a specified flux distributed over the top of the model and specified in units of length/time (usually m/d). Within MODFLOW, these rates are multiplied by the horizontal area of the cells to which they are applied to calculate the volumetric flux rates. In this class the Recharge gets applied to the top grid layer (NRCHOP=1).

Parameters
  • rate (float or xr.DataArray of floats) – is the amount of recharge.

  • concentration (float or xr.DataArray of floats) – is the concentration of the recharge

  • save_budget (bool, optional) – flag indicating if the budget needs to be saved. Default is False.

all(dim=None, **kwargs)

Reduce this RechargeTopLayer’s data by applying all along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply all. By default all is applied over all dimensions.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating all on this object’s data.

Returns

reduced – New RechargeTopLayer object with all applied to its data and the indicated dimension(s) removed.

Return type

RechargeTopLayer

any(dim=None, **kwargs)

Reduce this RechargeTopLayer’s data by applying any along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply any. By default any is applied over all dimensions.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating any on this object’s data.

Returns

reduced – New RechargeTopLayer object with any applied to its data and the indicated dimension(s) removed.

Return type

RechargeTopLayer

count(dim=None, **kwargs)

Reduce this RechargeTopLayer’s data by applying count along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply count. By default count is applied over all dimensions.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating count on this object’s data.

Returns

reduced – New RechargeTopLayer object with count applied to its data and the indicated dimension(s) removed.

Return type

RechargeTopLayer

cumprod(dim=None, skipna=None, **kwargs)

Apply cumprod along some dimension of RechargeTopLayer.

Parameters
  • dim (str or sequence of str, optional) – Dimension over which to apply cumprod.

  • axis (int or sequence of int, optional) – Axis over which to apply cumprod. Only one of the ‘dim’ and ‘axis’ arguments can be supplied.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to cumprod.

Returns

cumvalue – New RechargeTopLayer object with cumprod applied to its data along the indicated dimension.

Return type

RechargeTopLayer

cumsum(dim=None, skipna=None, **kwargs)

Apply cumsum along some dimension of RechargeTopLayer.

Parameters
  • dim (str or sequence of str, optional) – Dimension over which to apply cumsum.

  • axis (int or sequence of int, optional) – Axis over which to apply cumsum. Only one of the ‘dim’ and ‘axis’ arguments can be supplied.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to cumsum.

Returns

cumvalue – New RechargeTopLayer object with cumsum applied to its data along the indicated dimension.

Return type

RechargeTopLayer

max(dim=None, skipna=None, **kwargs)

Reduce this RechargeTopLayer’s data by applying max along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply max. By default max is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating max on this object’s data.

Returns

reduced – New RechargeTopLayer object with max applied to its data and the indicated dimension(s) removed.

Return type

RechargeTopLayer

mean(dim=None, skipna=None, **kwargs)

Reduce this RechargeTopLayer’s data by applying mean along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply mean. By default mean is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating mean on this object’s data.

Returns

reduced – New RechargeTopLayer object with mean applied to its data and the indicated dimension(s) removed.

Return type

RechargeTopLayer

median(dim=None, skipna=None, **kwargs)

Reduce this RechargeTopLayer’s data by applying median along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply median. By default median is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating median on this object’s data.

Returns

reduced – New RechargeTopLayer object with median applied to its data and the indicated dimension(s) removed.

Return type

RechargeTopLayer

min(dim=None, skipna=None, **kwargs)

Reduce this RechargeTopLayer’s data by applying min along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply min. By default min is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating min on this object’s data.

Returns

reduced – New RechargeTopLayer object with min applied to its data and the indicated dimension(s) removed.

Return type

RechargeTopLayer

prod(dim=None, skipna=None, **kwargs)

Reduce this RechargeTopLayer’s data by applying prod along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply prod. By default prod is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • min_count (int, default: None) – The required number of valid values to perform the operation. If fewer than min_count non-NA values are present the result will be NA. Only used if skipna is set to True or defaults to True for the array’s dtype. New in version 0.10.8: Added with the default being None. Changed in version 0.17.0: if specified on an integer array and skipna=True, the result will be a float array.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating prod on this object’s data.

Returns

reduced – New RechargeTopLayer object with prod applied to its data and the indicated dimension(s) removed.

Return type

RechargeTopLayer

std(dim=None, skipna=None, **kwargs)

Reduce this RechargeTopLayer’s data by applying std along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply std. By default std is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating std on this object’s data.

Returns

reduced – New RechargeTopLayer object with std applied to its data and the indicated dimension(s) removed.

Return type

RechargeTopLayer

sum(dim=None, skipna=None, **kwargs)

Reduce this RechargeTopLayer’s data by applying sum along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply sum. By default sum is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • min_count (int, default: None) – The required number of valid values to perform the operation. If fewer than min_count non-NA values are present the result will be NA. Only used if skipna is set to True or defaults to True for the array’s dtype. New in version 0.10.8: Added with the default being None. Changed in version 0.17.0: if specified on an integer array and skipna=True, the result will be a float array.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating sum on this object’s data.

Returns

reduced – New RechargeTopLayer object with sum applied to its data and the indicated dimension(s) removed.

Return type

RechargeTopLayer

var(dim=None, skipna=None, **kwargs)

Reduce this RechargeTopLayer’s data by applying var along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply var. By default var is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating var on this object’s data.

Returns

reduced – New RechargeTopLayer object with var applied to its data and the indicated dimension(s) removed.

Return type

RechargeTopLayer

class imod.wq.River(stage, conductance, bottom_elevation, density, concentration=None, save_budget=False)[source]

Bases: xarray.core.common.DataWithCoords, xarray.core.arithmetic.DatasetArithmetic, Mapping

The River package is used to simulate head-dependent flux boundaries. In the River package if the head in the cell falls below a certain threshold, the flux from the river to the model cell is set to a specified lower bound.

Parameters
  • stage (float or xr.DataArray of floats) – is the head in the river (STAGE).

  • bottom_elevation (float or xr.DataArray of floats) – is the bottom of the riverbed (RBOT).

  • conductance (float or xr.DataArray of floats) – is the conductance of the river.

  • density (float or xr.DataArray of floats) – is the density used to convert the point head to the freshwater head (RIVSSMDENS).

  • concentration ("None", float or xr.DataArray of floats, optional) – is the concentration in the river. Default is None.

  • save_budget (bool, optional) – is a flag indicating if the budget should be saved (IRIVCB). Default is False.

all(dim=None, **kwargs)

Reduce this River’s data by applying all along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply all. By default all is applied over all dimensions.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating all on this object’s data.

Returns

reduced – New River object with all applied to its data and the indicated dimension(s) removed.

Return type

River

any(dim=None, **kwargs)

Reduce this River’s data by applying any along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply any. By default any is applied over all dimensions.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating any on this object’s data.

Returns

reduced – New River object with any applied to its data and the indicated dimension(s) removed.

Return type

River

bottom_elevation
concentration
conductance
count(dim=None, **kwargs)

Reduce this River’s data by applying count along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply count. By default count is applied over all dimensions.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating count on this object’s data.

Returns

reduced – New River object with count applied to its data and the indicated dimension(s) removed.

Return type

River

cumprod(dim=None, skipna=None, **kwargs)

Apply cumprod along some dimension of River.

Parameters
  • dim (str or sequence of str, optional) – Dimension over which to apply cumprod.

  • axis (int or sequence of int, optional) – Axis over which to apply cumprod. Only one of the ‘dim’ and ‘axis’ arguments can be supplied.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to cumprod.

Returns

cumvalue – New River object with cumprod applied to its data along the indicated dimension.

Return type

River

cumsum(dim=None, skipna=None, **kwargs)

Apply cumsum along some dimension of River.

Parameters
  • dim (str or sequence of str, optional) – Dimension over which to apply cumsum.

  • axis (int or sequence of int, optional) – Axis over which to apply cumsum. Only one of the ‘dim’ and ‘axis’ arguments can be supplied.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to cumsum.

Returns

cumvalue – New River object with cumsum applied to its data along the indicated dimension.

Return type

River

density
max(dim=None, skipna=None, **kwargs)

Reduce this River’s data by applying max along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply max. By default max is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating max on this object’s data.

Returns

reduced – New River object with max applied to its data and the indicated dimension(s) removed.

Return type

River

mean(dim=None, skipna=None, **kwargs)

Reduce this River’s data by applying mean along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply mean. By default mean is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating mean on this object’s data.

Returns

reduced – New River object with mean applied to its data and the indicated dimension(s) removed.

Return type

River

median(dim=None, skipna=None, **kwargs)

Reduce this River’s data by applying median along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply median. By default median is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating median on this object’s data.

Returns

reduced – New River object with median applied to its data and the indicated dimension(s) removed.

Return type

River

min(dim=None, skipna=None, **kwargs)

Reduce this River’s data by applying min along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply min. By default min is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating min on this object’s data.

Returns

reduced – New River object with min applied to its data and the indicated dimension(s) removed.

Return type

River

prod(dim=None, skipna=None, **kwargs)

Reduce this River’s data by applying prod along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply prod. By default prod is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • min_count (int, default: None) – The required number of valid values to perform the operation. If fewer than min_count non-NA values are present the result will be NA. Only used if skipna is set to True or defaults to True for the array’s dtype. New in version 0.10.8: Added with the default being None. Changed in version 0.17.0: if specified on an integer array and skipna=True, the result will be a float array.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating prod on this object’s data.

Returns

reduced – New River object with prod applied to its data and the indicated dimension(s) removed.

Return type

River

repeat_stress(stage=None, conductance=None, bottom_elevation=None, concentration=None, density=None, use_cftime=False)[source]
save_budget
stage
std(dim=None, skipna=None, **kwargs)

Reduce this River’s data by applying std along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply std. By default std is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating std on this object’s data.

Returns

reduced – New River object with std applied to its data and the indicated dimension(s) removed.

Return type

River

sum(dim=None, skipna=None, **kwargs)

Reduce this River’s data by applying sum along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply sum. By default sum is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • min_count (int, default: None) – The required number of valid values to perform the operation. If fewer than min_count non-NA values are present the result will be NA. Only used if skipna is set to True or defaults to True for the array’s dtype. New in version 0.10.8: Added with the default being None. Changed in version 0.17.0: if specified on an integer array and skipna=True, the result will be a float array.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating sum on this object’s data.

Returns

reduced – New River object with sum applied to its data and the indicated dimension(s) removed.

Return type

River

var(dim=None, skipna=None, **kwargs)

Reduce this River’s data by applying var along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply var. By default var is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating var on this object’s data.

Returns

reduced – New River object with var applied to its data and the indicated dimension(s) removed.

Return type

River

class imod.wq.SeawatModel(modelname, check='defer')[source]

Bases: imod.wq.model.Model

modelname
Type

str

check

When to perform model checks {None, “defer”, “eager”}. Defaults to “defer”.

Type

str, optional

Examples

>>> m = SeawatModel("example")
>>> m["riv"] = River(...)
>>> # ...etc.
>>> m.time_discretization(endtime)
>>> m.write()
clip(extent, heads_boundary=None, concentration_boundary=None, delete_empty_pkg=False)[source]

Method to clip the model to a certain extent. The spatial resolution of the clipped model is unchanged. Boundary conditions of clipped model can be derived from parent model calculation results and are applied along the edge of extent (CHD and TVC). Packages from parent that have no data within extent are optionally removed.

Parameters
  • extent (tuple, geopandas.GeoDataFrame, xarray.DataArray) – Extent of the clipped model. Tuple must be in the form of (xmin,`xmax`,`ymin`,`ymax`). If a GeoDataFrame, all polygons are included in the model extent. If a DataArray, non-null/non-zero values are taken as the new extent.

  • heads_boundary (xarray.DataArray, optional.) – Heads to be applied as a Constant Head boundary condition along the edge of the model extent. These heads are assumed to be derived from calculations with the parent model. Timestamp of boundary condition is shifted to correct for difference between ‘end of period’ timestamp of results and ‘start of period’ timestamp of boundary condition. If None (default), no constant heads boundary condition is applied.

  • concentration_boundary (xarray.DataArray, optional.) –

    Concentration to be applied as a Time Varying Concentration boundary condition along the edge of the model extent. These concentrations can be derived from calculations with the parent model. Timestamp of boundary condition is shifted to correct for difference between ‘end of period’ timestamp of results and ‘start of period’ timestamp of boundary condition. If None (default), no time varying concentration boundary condition is applied.

    Note that the Time Varying Concentration boundary sets a constant concentration for the entire stress period, unlike the linearly varying Constant Head. This will inevitably cause a time shift in concentrations along the boundary. This shift becomes more significant when stress periods are longer. If necessary, consider interpolating concentrations along the time axis, to reduce the length of stress periods (see examples).

  • delete_empty_pkg (bool, optional.) – Set to True to delete packages that contain no data in the clipped model. Defaults to False.

Examples

Given a full model, clip a 1 x 1 km rectangular submodel without boundary conditions along its edge:

>>> extent = (1000., 2000., 5000., 6000.)  # xmin, xmax, ymin, ymax
>>> clipped = ml.clip(extent)

Load heads and concentrations from full model results:

>>> heads = imod.idf.open("head/head_*.idf")
>>> conc = imod.idf.open("conc/conc_*.idf")
>>> clipped = ml.clip(extent, heads, conc)

Use a shape of a model area:

>>> extent = geopandas.read_file("clipped_model_area.shp")
>>> clipped = ml.clip(extent, heads, conc)

Interpolate concentration results to annual results using xarray.interp(), to improve time resolution of concentration boundary:

>>> conc = imod.idf.open("conc/conc_*.idf")
>>> dates = pd.date_range(conc.time.values[0], conc.time.values[-1], freq="AS")
>>> conc_interpolated = conc.load().interp(time=dates, method="linear")
>>> clipped = ml.clip(extent, heads, conc_interpolated)
package_check()[source]
render(directory, result_dir, writehelp)[source]

Render the runfile as a string, package by package.

time_discretization(times)[source]

Collect all unique times from model packages and additional given times. These unique times are used as stress periods in the model. All stress packages must have the same starting time.

The time discretization in imod-python works as follows:

  • The datetimes of all packages you send in are always respected

  • Subsequently, the input data you use is always included fully as well

  • All times are treated as starting times for the stress: a stress is always applied until the next specified date

  • For this reason, a final time is required to determine the length of the last stress period

  • Additional times can be provided to force shorter stress periods & more detailed output

  • Every stress has to be defined on the first stress period (this is a modflow requirement)

Or visually (every letter a date in the time axes):

recharge a - b - c - d - e - f
river    g - - - - h - - - - j
times    - - - - - - - - - - - i

model    a - b - c h d - e - f i

with the stress periods defined between these dates. I.e. the model times are the set of all times you include in the model.

Parameters

times (str, datetime; or iterable of str, datetimes.) – Times to add to the time discretization. At least one single time should be given, which will be used as the ending time of the simulation.

Examples

Add a single time:

>>> m.time_discretization("2001-01-01")

Add a daterange:

>>> m.time_discretization(pd.daterange("2000-01-01", "2001-01-01"))

Add a list of times:

>>> m.time_discretization(["2000-01-01", "2001-01-01"])
write(directory=PosixPath('.'), result_dir=None, resultdir_is_workdir=False)[source]

Writes model input files.

Parameters
  • directory (str, pathlib.Path) – Directory into which the model input will be written. The model input will be written into a directory called modelname.

  • result_dir (str, pathlib.Path) –

    Path to directory in which output will be written when running the model. Is written as the value of the result_dir key in the runfile.

    See the examples.

  • resultdir_is_workdir (boolean, optional) – Wether the set all input paths in the runfile relative to the output directory. Because iMOD-wq generates a number of files in its working directory, it may be advantageous to set the working directory to a different path than the runfile location.

Returns

Return type

None

Examples

Say we wish to write the model input to a file called input, and we desire that when running the model, the results end up in a directory called output. We may run:

>>> model.write(directory="input", result_dir="output")

And in the runfile, a value of ../../output will be written for result_dir.

class imod.wq.TimeDiscretization(timestep_duration, n_timesteps=1, transient=True, timestep_multiplier=1.0, max_n_transport_timestep=50000, transport_timestep_multiplier=None, transport_initial_timestep=0.0)[source]

Bases: xarray.core.common.DataWithCoords, xarray.core.arithmetic.DatasetArithmetic, Mapping

Time discretisation package class.

Parameters
  • timestep_duration (float) – is the length of the current stress period (PERLEN). If the flow solution is transient, timestep_duration specified here must be equal to that specified for the flow model. If the flow solution is steady-state, timestep_duration can be set to any desired length.

  • n_timesteps (int, optional) – is the number of time steps for the transient flow solution in the current stress period (NSTP). If the flow solution is steady-state, n_timestep=1. Default value is 1.

  • transient (bool, optional) – Flag indicating wether the flow simulation is transient (True) or False (Steady State). Default is True.

  • timestep_multiplier (float, optional) – is the multiplier for the length of successive time steps used in the transient flow solution (TSMULT); it is used only if n_timesteps>1. timestep_multiplier>0, the length of each flow time step within the current stress period is calculated using the geometric progression as in MODFLOW. Note that both n_timesteps and timestep_multiplier specified here must be identical to those specified in the flow model if the flow model is transient. timestep_multiplier ≤ 0, the length of each flow time step within the current stress period is read from the record TSLNGH. This option is needed in case the length of time steps for the flow solution is not based on a geometric progression in a flow model, unlike MODFLOW. Default is 1.0.

  • max_n_transport_timestep (int, optional) – is the maximum number of transport steps allowed within one time step of the flow solution (mxstrn). If the number of transport steps within a flow time step exceeds max_n_transport_timestep, the simulation is terminated. Default is 50_000.

  • transport_timestep_multiplier (float or {"None"}, optional) – is the multiplier for successive transport steps within a flow time step (TTSMULT). If the Generalized Conjugate Gradient (GCG) solver is used and the solution option for the advection term is the standard finite difference method. A value between 1.0 and 2.0 is generally adequate. If the GCG package is not used, the transport solution is solved explicitly as in the original MT3D code, and transport_timestep_multiplier is always set to 1.0 regardless of the user-specified input. Note that for the particle tracking based solution options and the 3rd-order TVD scheme, transport_timestep_multiplier does not apply. Default is {“None”}.

  • transport_initial_timestep (int, optional) – is the user-specified transport stepsize within each time step of the flow solution (DT0). transport_initial_timestep is interpreted differently depending on whether the solution option chosen is explicit or implicit: For explicit solutions (i.e., the GCG solver is not used), the program will always calculate a maximum transport stepsize which meets the various stability criteria. Setting transport_initial_timestep to zero causes the model calculated transport stepsize to be used in the simulation. However, the model-calculated transport_initial_timestep may not always be optimal. In this situation, transport_initial_timestep should be adjusted to find a value that leads to the best results. If transport_initial_timestep is given a value greater than the model-calculated stepsize, the model-calculated stepsize, instead of the user-specified value, will be used in the simulation. For implicit solutions (i.e., the GCG solver is used), transport_initial_timestep is the initial transport stepsize. If it is specified as zero, the model-calculated value of transport_initial_timestep, based on the user-specified Courant number in the Advection Package, will be used. The subsequent transport stepsize may increase or remain constant depending on the userspecified transport stepsize multiplier transport_timestep_multiplier and the solution scheme for the advection term. Default is 0.

all(dim=None, **kwargs)

Reduce this TimeDiscretization’s data by applying all along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply all. By default all is applied over all dimensions.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating all on this object’s data.

Returns

reduced – New TimeDiscretization object with all applied to its data and the indicated dimension(s) removed.

Return type

TimeDiscretization

any(dim=None, **kwargs)

Reduce this TimeDiscretization’s data by applying any along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply any. By default any is applied over all dimensions.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating any on this object’s data.

Returns

reduced – New TimeDiscretization object with any applied to its data and the indicated dimension(s) removed.

Return type

TimeDiscretization

count(dim=None, **kwargs)

Reduce this TimeDiscretization’s data by applying count along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply count. By default count is applied over all dimensions.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating count on this object’s data.

Returns

reduced – New TimeDiscretization object with count applied to its data and the indicated dimension(s) removed.

Return type

TimeDiscretization

cumprod(dim=None, skipna=None, **kwargs)

Apply cumprod along some dimension of TimeDiscretization.

Parameters
  • dim (str or sequence of str, optional) – Dimension over which to apply cumprod.

  • axis (int or sequence of int, optional) – Axis over which to apply cumprod. Only one of the ‘dim’ and ‘axis’ arguments can be supplied.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to cumprod.

Returns

cumvalue – New TimeDiscretization object with cumprod applied to its data along the indicated dimension.

Return type

TimeDiscretization

cumsum(dim=None, skipna=None, **kwargs)

Apply cumsum along some dimension of TimeDiscretization.

Parameters
  • dim (str or sequence of str, optional) – Dimension over which to apply cumsum.

  • axis (int or sequence of int, optional) – Axis over which to apply cumsum. Only one of the ‘dim’ and ‘axis’ arguments can be supplied.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to cumsum.

Returns

cumvalue – New TimeDiscretization object with cumsum applied to its data along the indicated dimension.

Return type

TimeDiscretization

max(dim=None, skipna=None, **kwargs)

Reduce this TimeDiscretization’s data by applying max along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply max. By default max is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating max on this object’s data.

Returns

reduced – New TimeDiscretization object with max applied to its data and the indicated dimension(s) removed.

Return type

TimeDiscretization

max_n_transport_timestep
mean(dim=None, skipna=None, **kwargs)

Reduce this TimeDiscretization’s data by applying mean along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply mean. By default mean is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating mean on this object’s data.

Returns

reduced – New TimeDiscretization object with mean applied to its data and the indicated dimension(s) removed.

Return type

TimeDiscretization

median(dim=None, skipna=None, **kwargs)

Reduce this TimeDiscretization’s data by applying median along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply median. By default median is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating median on this object’s data.

Returns

reduced – New TimeDiscretization object with median applied to its data and the indicated dimension(s) removed.

Return type

TimeDiscretization

min(dim=None, skipna=None, **kwargs)

Reduce this TimeDiscretization’s data by applying min along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply min. By default min is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating min on this object’s data.

Returns

reduced – New TimeDiscretization object with min applied to its data and the indicated dimension(s) removed.

Return type

TimeDiscretization

n_timesteps
prod(dim=None, skipna=None, **kwargs)

Reduce this TimeDiscretization’s data by applying prod along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply prod. By default prod is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • min_count (int, default: None) – The required number of valid values to perform the operation. If fewer than min_count non-NA values are present the result will be NA. Only used if skipna is set to True or defaults to True for the array’s dtype. New in version 0.10.8: Added with the default being None. Changed in version 0.17.0: if specified on an integer array and skipna=True, the result will be a float array.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating prod on this object’s data.

Returns

reduced – New TimeDiscretization object with prod applied to its data and the indicated dimension(s) removed.

Return type

TimeDiscretization

std(dim=None, skipna=None, **kwargs)

Reduce this TimeDiscretization’s data by applying std along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply std. By default std is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating std on this object’s data.

Returns

reduced – New TimeDiscretization object with std applied to its data and the indicated dimension(s) removed.

Return type

TimeDiscretization

sum(dim=None, skipna=None, **kwargs)

Reduce this TimeDiscretization’s data by applying sum along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply sum. By default sum is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • min_count (int, default: None) – The required number of valid values to perform the operation. If fewer than min_count non-NA values are present the result will be NA. Only used if skipna is set to True or defaults to True for the array’s dtype. New in version 0.10.8: Added with the default being None. Changed in version 0.17.0: if specified on an integer array and skipna=True, the result will be a float array.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating sum on this object’s data.

Returns

reduced – New TimeDiscretization object with sum applied to its data and the indicated dimension(s) removed.

Return type

TimeDiscretization

timestep_duration
timestep_multiplier
transient
transport_initial_timestep
transport_timestep_multiplier
var(dim=None, skipna=None, **kwargs)

Reduce this TimeDiscretization’s data by applying var along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply var. By default var is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating var on this object’s data.

Returns

reduced – New TimeDiscretization object with var applied to its data and the indicated dimension(s) removed.

Return type

TimeDiscretization

class imod.wq.TimeVaryingConstantConcentration(concentration)[source]

Bases: xarray.core.common.DataWithCoords, xarray.core.arithmetic.DatasetArithmetic, Mapping

Time varying constant concentration package. Has no direct effect on groundwater flow, is only included via MT3DMS source and sinks. (SSM ITYPE -1)

Parameters

concentration (xr.DataArray of floats) –

all(dim=None, **kwargs)

Reduce this TimeVaryingConstantConcentration’s data by applying all along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply all. By default all is applied over all dimensions.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating all on this object’s data.

Returns

reduced – New TimeVaryingConstantConcentration object with all applied to its data and the indicated dimension(s) removed.

Return type

TimeVaryingConstantConcentration

any(dim=None, **kwargs)

Reduce this TimeVaryingConstantConcentration’s data by applying any along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply any. By default any is applied over all dimensions.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating any on this object’s data.

Returns

reduced – New TimeVaryingConstantConcentration object with any applied to its data and the indicated dimension(s) removed.

Return type

TimeVaryingConstantConcentration

concentration
count(dim=None, **kwargs)

Reduce this TimeVaryingConstantConcentration’s data by applying count along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply count. By default count is applied over all dimensions.

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating count on this object’s data.

Returns

reduced – New TimeVaryingConstantConcentration object with count applied to its data and the indicated dimension(s) removed.

Return type

TimeVaryingConstantConcentration

cumprod(dim=None, skipna=None, **kwargs)

Apply cumprod along some dimension of TimeVaryingConstantConcentration.

Parameters
  • dim (str or sequence of str, optional) – Dimension over which to apply cumprod.

  • axis (int or sequence of int, optional) – Axis over which to apply cumprod. Only one of the ‘dim’ and ‘axis’ arguments can be supplied.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to cumprod.

Returns

cumvalue – New TimeVaryingConstantConcentration object with cumprod applied to its data along the indicated dimension.

Return type

TimeVaryingConstantConcentration

cumsum(dim=None, skipna=None, **kwargs)

Apply cumsum along some dimension of TimeVaryingConstantConcentration.

Parameters
  • dim (str or sequence of str, optional) – Dimension over which to apply cumsum.

  • axis (int or sequence of int, optional) – Axis over which to apply cumsum. Only one of the ‘dim’ and ‘axis’ arguments can be supplied.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to cumsum.

Returns

cumvalue – New TimeVaryingConstantConcentration object with cumsum applied to its data along the indicated dimension.

Return type

TimeVaryingConstantConcentration

max(dim=None, skipna=None, **kwargs)

Reduce this TimeVaryingConstantConcentration’s data by applying max along some dimension(s).

Parameters
  • dim (str or sequence of str, optional) – Dimension(s) over which to apply max. By default max is applied over all dimensions.

  • skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).

  • keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

  • **kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating max on this object’s data.

Returns

reduced – New TimeVaryingConstantConcentration object with max applied to its data and the indicated dimension(s) removed.

Return type

TimeVaryingConstantConcentration