gwsource.packages#
Read the budget files of advanced packages (SFR, LAK, MAW, UZF) and of the water mover (MVR).
Each enabled package gets one node per reach, lake, well or UZF cell (gwsource.network). Its own
budget file (BUDGET FILEOUT in the package OPTIONS) lists every flow of every package node as
IMETH = 6 records: ID1 = the package node (1-based), ID2 = the other end, q positive INTO the
package node. Record names and their role, checked with the MF6 6.9 nightly (test models 7-9):
| Package | Record | Role in the graph |
|---|---|---|
| SFR, LAK, UZF | FLOW-JA-FACE (ID2 = other node of the package) | package-package edge; listed from both ends (antisymmetric), counted once |
| SFR, LAK, MAW, UZF | GWF (ID2 = GWF cell, user node) | cell-package edge; replaces the aquifer-side record of the GWF budget (below) |
| SFR | RAINFALL, EVAPORATION, RUNOFF, EXT-INFLOW, EXT-OUTFLOW | source/sink terms of the reach |
| LAK | RAINFALL, EVAPORATION, RUNOFF, EXT-INFLOW, WITHDRAWAL, EXT-OUTFLOW, CONSTANT | source/sink terms of the lake |
| MAW | RATE, FW-RATE, CONSTANT | source/sink terms of the well (RATE: pumping or injection) |
| UZF | INFILTRATION, REJ-INF, UZET | source/sink terms of the UZF cell |
| all | STORAGE (auxiliary VOLUME) | storage term (positive = release), and the node's water volume |
| all | FROM-MVR | source term; becomes part of an MVR edge when the provider is in the graph |
| SFR, LAK | TO-MVR | sink term; becomes part of an MVR edge when the receiver is in the graph |
| MAW | RATE-TO-MVR, FW-RATE-TO-MVR | as TO-MVR |
| UZF | REJ-INF-TO-MVR | as TO-MVR |
| any | DATA-* | not flows; skipped |
Aquifer-side records in the GWF budget (ID1 = cell, ID2 = package node) that the GWF record of
the package budget replaces, so that the exchange is counted once, as an edge:
SFR (SFR), LAK (LAK), MAW (MAW), UZF (UZF-GWRCH). The other UZF records of the GWF budget stay
cell terms: UZF-GWD (groundwater seepage to land surface, a sink), UZF-GWET (groundwater ET, a
sink) and 'UZF-GWD TO-MVR' (seepage handed to the mover; a sink unless routed by MVR).
The MVR budget file (BUDGET FILEOUT in the MVR OPTIONS) has one MOVER-FLOW record per provider
and receiver package pair (PAKNAM = provider, PAKNAM2 = receiver), ID1 = provider bound or
package node, ID2 = receiver package node, q = minus the moved rate.
MF6 balances each package node itself, so the sum of all its records is the node's residual
(reported, as the FLOW-JA-FACE diagonal is for a cell).
- class gwsource.packages.PackageFiles(model, name, package_type, n, input_file, budget_file)[source]#
Bases:
objectOne advanced package of a GWF model: its name in the GWF budget, type, size, budget file.
- class gwsource.packages.PackageStep(files, internal, aquifer, terms, volume, residual)[source]#
Bases:
objectOne time step of one package budget, in 0-based package nodes and GWF user cells. internal: package-package edges (src, dst, q > 0); aquifer: (node, cell, q into node) per connection; terms: {record text: (node, q into node)}; volume: per node (NaN if the budget has no STORAGE VOLUME); residual: per-node sum of all records.
- class gwsource.packages.MoverTransfer(provider, provider_id, receiver, receiver_id, q=<factory>)[source]#
Bases:
objectWater moved by MVR in one step: provider package and bound, receiver package and node.
- gwsource.packages.find_package_files(nam_file, model, package_types)[source]#
Return the advanced packages of the given types in a model name file (BUDGET FILEOUT).
- Parameters:
- Return type:
- gwsource.packages.find_mover_budget(nam_file)[source]#
Return the MVR budget file of a model, or None if it has no MVR package.
- gwsource.packages.read_package_step(cbc, files, kstpkper)[source]#
Read one time step of a package budget file.
- Parameters:
cbc (CellBudgetFile)
files (PackageFiles)
- Return type: