flopy.utils.check Module

class flopy.utils.check.check(package, f=None, verbose=True, level=1, property_threshold_values={})

Check package for common errors

Parameters:

package : object

Instance of Package class.

verbose : bool

Boolean flag used to determine if check method results are written to the screen

level : int

Check method analysis level. If level=0, summary checks are performed. If level=1, full checks are performed.

property_threshold_values : dict

hk
: tuple

Reasonable minimum/maximum hydraulic conductivity value; values below this will be flagged. Default is (1e-11, 1e5), after Bear, 1972 (see https://en.wikipedia.org/wiki/Hydraulic_conductivity) and Schwartz and Zhang (2003, Table 4.4).

vka
: tuple

Reasonable minimum/maximum hydraulic conductivity value; Default is (1e-11, 1e5), after Bear, 1972 (see https://en.wikipedia.org/wiki/Hydraulic_conductivity) and Schwartz and Zhang (2003, Table 4.4).

vkcb
: tuple

Reasonable minimum/maximum hydraulic conductivity value for quasi-3D confining bed; Default is (1e-11, 1e5), after Bear, 1972 (see https://en.wikipedia.org/wiki/Hydraulic_conductivity) and Schwartz and Zhang (2003, Table 4.4).

sy
: tuple

Reasonable minimum/maximum specific yield values; Default is (0.01,0.5) after Anderson, Woessner and Hunt (2015, Table 5.2).

sy
: tuple

Reasonable minimum/maximum specific storage values; Default is (3.3e-6, 2e-2) after Anderson, Woessner and Hunt (2015, Table 5.2).

thin_cell_threshold : float

Minimum cell thickness in model units. Thicknesses below this value will be flagged (default 1.0).

Notes

Anderson, M.P, Woessner, W.W. and Hunt, R.J., 2015. Applied Groundwater Modeling: Simulation of Flow
and Advective Transport, Elsevier, 564p.

Bear, J., 1972. Dynamics of Fluids in Porous Media. Dover Publications. Schwartz, F.W. and Zhang, H., 2003. Fundamentals of Groundwater, Wiley, 583 p.

append_passed(message)

Add a check to the passed list if it isn’t already in there.

get_active(include_cbd=False)

Returns a boolean array of active cells for the model.

Parameters:

include_cbd : boolean

If True, active is of same dimmension as the thickness array in the DIS module (includes quasi 3-D confining beds). Default False.

Returns:

active : 3-D boolean array

True where active.

isvalid(inds)

Check that indices are valid for model grid

Parameters:

inds : tuple or lists or arrays; or a 1-D array

(k, i, j) for structured grids; (node) for unstructured.

Returns:

isvalid : 1-D boolean array

True for each index in inds that is valid for the model grid.

remove_passed(message)

Remove a check to the passed list if it failed in any stress period.

stress_period_data_values(stress_period_data, criteria, col=None, error_name='', error_type='Warning')

If criteria contains any true values, return the error_type, package name, k,i,j indicies, values, and description of error for each row in stress_period_data where criteria=True.

values(a, criteria, error_name='', error_type='Warning')

If criteria contains any true values, return the error_type, package name, indices, array values, and description of error for each True value in criteria.

flopy.utils.check.fields_view(arr, fields)

creates view of array that only contains the fields in fields. http://stackoverflow.com/questions/15182381/how-to-return-a-view-of-several-columns-in-numpy-structured-array

flopy.utils.check.get_neighbors(a)

Returns the 6 neighboring values for each value in a.

Parameters:

a : 3-D array

Model array in layer, row, column order.

Returns:

neighbors : 4-D array

Array of neighbors, where axis 0 contains the 6 neighboring values for each value in a, and subsequent axes are in layer, row, column order. Nan is returned for values at edges.