gwsource.trace#

Public entry points: backward (capture) and forward (fate) tracing of one FlowStep.
gwsource.trace.strong_sink_cells(step, strong_sinks)[source]#
Return the mask of cells with a sink term of a strong-sink package (None if none named).

strong_sinks is TraceConfig.strong_sinks: "all" (every sink term) or package selectors
matched as select(package=); each selector must match a package of the step.
Parameters:
Return type:

ndarray | None

gwsource.trace.backward(step, groups, config=None)[source]#
Trace backward from each destination group: fraction and volume of water reaching it.
Parameters:
Return type:

BackwardResult

gwsource.trace.forward(step, groups, config=None)[source]#
Trace forward from each source group: fraction of water in each cell that came from it.
Parameters:
Return type:

ForwardResult

gwsource.trace.net_fixed_cells(step, sel, sign)[source]#
Return the cells fixed at 1: sel.cells, or the cells where selected terms flow with sign.

A pure cell or zone selection keeps its cells. A selection with term criteria fixes a cell
if any selected entry in it flows in the traced direction: sign -1 (a sink) backward, +1 (a
source) forward, as term_flow is positive into the cell. A cell with selected entries of
both signs is fixed in both directions; a group with no such entry fixes no cell.
Parameters:
Return type:

ndarray

class gwsource.trace.NetSolution(fraction, s, throughflow, fixed, used, solvers, loops, absorbing=None)[source]#

Bases: object

Net-mode fractions, per-cell s and T and fixed cells (cells, groups), edges per group.
Parameters: