MODFLOW Model Reviewer
Documentation for modflow_review.py / mfreview 1.0.0 ·
modflow_reviewer · October 2026
1. Overview
The reviewer evaluates a MODFLOW simulation — both its input (grid, properties, boundary conditions, solver settings) and its output (listing file, heads, cell-by-cell budget) — and writes a self-contained HTML report with a map of every model layer showing where problems were found.
It was built for two uses: consulting model reviews, and fast triage of models sent to Groundwater Vistas technical support. A typical 35,000-cell model is reviewed in 2–6 seconds.
MODFLOW-2005, MODFLOW-NWT, MODFLOW-USG / USG-Transport, MODFLOW 6 (DIS, DISV, DISU). The version is detected from the name file.
Additional checks follow Reilly & Harbaugh (2004), USGS SIR 2004-5038, the review literature (Hill 1998, Reilly 2001, Konikow 2011) and common support issues.
One PNG map per layer embedded in the HTML; every table also exported to CSV.
Model files are only read. The optional MF6 re-run works on a copy in the output folder.
2. Installation
Requirements: Python 3.10 or newer with numpy, pandas and matplotlib (all present in the
esi_py26 Anaconda environment).
flopy does not need to be installed. Because MODFLOW-USG is not well supported by the official flopy, the
reviewer bundles Rodrigo Herrera's fork (github.com/roh-sgm/flopy,
develop branch, version 3.11.0.dev0) in vendor\flopy. The fork is a superset of flopy
3.11 and adds the USG-Transport packages (BCT, DDF, PCB, CLN, ...). It is put first on sys.path only
when the reviewer runs, so the flopy installed in your environment is never modified.
To update the fork, download the repository ZIP and replace vendor\flopy with its
flopy folder.
The bundled revision is recorded in vendor\FLOPY_SOURCE.txt and printed in every report's Model
information table. It is currently roh-sgm/flopy develop at commit 02e13e0
(3 June 2026), verified file by file against GitHub on 6 November 2026. The fork's newer work is on the branch
usgt/stage5-sync-20261030; when updating, record the new branch and commit in that file.
3. Usage
python modflow_review.py model.nam python modflow_review.py site_mf6 (folder containing mfsim.nam) python modflow_review.py site_mf6 --rerun (MF6: generate solver iteration output) python modflow_review.py model.nam -o site --top-hits 20 --set grid_ratio=2 --open
The argument can be a MODFLOW-2005/NWT/USG name file, mfsim.nam, or a folder. For a folder the
script uses mfsim.nam if present; otherwise it picks the *.nam file whose referenced files
exist (relative paths and the newest listing file are preferred). This matters for GWV folders that contain a
second name file with absolute paths from another machine, such as mfusgs.nam.
If no valid name file is found, the script prints ERROR: A valid name file could not be found. with
the reason and exits with code 1. An MF6 model name file can be given when mfsim.nam is beside it.
More than one name file. If a folder holds two or more name files whose package files all exist and that
list different package files, they describe different models. The choice is then ambiguous, so the script prints
ERROR: More than one model in the folder. with the file names and exits with code 1; pass the name file
to review instead of the folder. A second name file for the same package files is skipped, as is one whose files do
not exist (the comparison ignores LIST and DATA files, which writers label differently). Groundwater Vistas' batch
files mfusgs.nam, mf2005.nam and mfnwt.nam are such duplicates. The report
notes which name file was reviewed and which were skipped. Of the example folders, only the USGS NWT sample problems
in the Antelope Valley archive (MODFLOW-2005 and NWT variants side by side) are ambiguous.
Name-file unit 0. Groundwater Vistas writes NWT 0 file.nwt in a name file it does not run with.
FloPy's name-file parser fails on unit 0 for some packages; the reviewer loads such entries with a temporary unit
number and notes it in the report, since MODFLOW needs a positive unit for every file. A unit used by two files is
also noted, because only one of them is read. Verified by tests\test_conventions.py.
USGS model archives. In a USGS model archive the simulation runs in model\<sim> but the
outputs are stored in output\output.<sim>. Output files (listing, heads, budget, binary grid file,
mfsim.lst, ...) that are missing from the model folder are looked for there (and in
output\<sim>); the report notes the folder they were read from.
Output goes to <model folder>\model_review\ unless -o is given:
| Path | Contents |
|---|---|
<model>_review.html | The report (maps embedded, can be e-mailed alone) |
tables\*.csv | Full table for every finding (the HTML shows the first 200 rows) |
maps\layer_NN.png | Layer maps; budget_discrepancy.png when more than one budget is printed |
maps\layer_NN.shp (+ .shx, .dbf, .prj) | One polygon shapefile per layer for zooming in on problem cells in a GIS; see Shapefiles |
maps\grid_spacing_lines.shp | Row/column boundaries flagged by check 9 (structured grids only) |
_solver_rerun\ | Copy of the MF6 simulation, only with --rerun |
Command-line options
| Option | Meaning |
|---|---|
model | Name file, mfsim.nam, or model folder |
-o, --outdir | Output folder (default <model folder>\model_review) |
--model-name | MF6: GWF model to review when the simulation has several (default: first) |
--top-hits N | Number of solver-hit cells to report (default 10) |
--grid-ratio R | Maximum adjacent row/column width ratio (default 1.5) |
--k-orders N | K-contrast threshold in orders of magnitude (default 3) |
--set NAME=VALUE | Override any threshold (repeatable); see section 8 |
--config file.json | JSON object of threshold overrides, e.g. {"cond_ratio": 100, "thin_abs": 2} |
--rerun | MF6 only: re-run a copy with IMS PRINT_OPTION SUMMARY when mfsim.lst has no iteration table |
--exe PATH | Executable for --rerun (default: search GWV9, GWV8, bin, then PATH) |
--rerun-timeout S | Seconds before the re-run is stopped (default 3600) |
--no-maps | Skip the layer maps |
--no-shapefiles | Skip the layer shapefiles |
--checklist LIST | Review checklists to append, comma-separated: usgs (SIR 2004-5038, default), au (Australian guidelines), bc (BC Ministry of Environment), cl (Chile SEA), or all; see Guideline checks |
--open | Open the report in the default browser when done |
MF6 solver re-run
Groundwater Vistas writes PRINT_OPTION NONE in the IMS file by default, so mfsim.lst
contains no iteration history and solver hits cannot be counted. With --rerun the reviewer:
- copies the model folder to
<outdir>\_solver_rerun; - edits the copy's IMS OPTIONS block to
PRINT_OPTION SUMMARYandCSV_OUTER_OUTPUT FILEOUT review_outer.csv; - runs
mf6.exein the copy and parses itsmfsim.lst.
Everything else in the report (budgets, heads, local mass balance) still comes from the original run. For the
other versions the report tells you which print flag to enable: PCG MUTPCG 0 and
IPRPCG 1; NWT IPRNWT 1; SMS IPRSMS 1.
Running from Groundwater Vistas or a batch file
@echo off "python.exe" "modflow_review.py" "%~1" --open
Activating the conda environment is not required; see section 12.
4. Supported versions and how they are read
| Version | Detection | Reader | Grid / geometry for maps |
|---|---|---|---|
| MODFLOW-2005 | name file without DISU/SMS/UPW/NWT | flopy.modflow.Modflow.load | DIS; real-world coordinates from the #xll/yll name-file header |
| MODFLOW-NWT | UPW or NWT in the name file | same, version mfnwt | DIS |
| MODFLOW-USG / USG-T | DISU, SMS, CLN or BCT in the name file | flopy.mfusg.MfUsg.load (fork) | DISU with cell polygons from the GWV .gsf file (or points from nodes_xyz.csv); USG with DIS is treated as structured |
| MODFLOW 6 | mfsim.nam | flopy.mf6.MFSimulation.load | DIS, DISV (cell vertices) or DISU (VERTICES/CELL2D); connectivity from the .grb file |
Every loader converts its model into one version-independent ReviewModel: 0-based node numbers,
layer of each node, top/bottom/area, active flag, cell centres and polygons, a list of cell connections
(horizontal/vertical, distance, width), Kh and Kv, convertibility, storage, stress periods, a table of boundary
conditions, recharge per receiving node, solver settings and output files. The checks only ever see this common
form, which is why the same checks run on every version.
Notable details:
- MF6 DISU has no layers. They are inferred from the vertical connections (IHC = 0): a node with no node above it is layer 1, and each node is one layer below the deepest node connected above it.
- LPF/UPW with LAYVKA ≠ 0: VKA is the ratio Kh/Kv, so Kv = HK / VKA.
- MF6 NPF with
K33OVERK: the K33 input is the ratio K33/K, so K33 = K × input (the opposite direction to LPF VKA; for example K = 10 and an input of 0.1 give K33 = 1). Verified bytests\test_conventions.py. Rotated tensors (ANGLE1–3) are not handled: K33 is treated as vertical conductivity. - MF6 NPF with
K22OVERK: the K22 input is the ratio K22/K, so K22 = K × input. The single horizontal value the checks use is the scalar screening summary Kh = √(K · K22) (K when K22 is not given); it is not a substitute for the directional conductivity tensor, and rotated tensors are not handled. Verified bytests\test_conventions.py(K = 10, input 0.5 → K22 = 5, Kh = √50). - Cell-by-cell budget records are read by their exact name (
outputs.cbb_get). FloPy'sCellBudgetFile.get_data(text=...)returns the first record whose name contains the text, and MODFLOW-NWT with UZF writes the unsaturated-zoneSTORAGE CHANGErecord before the aquiferSTORAGErecord, so asking forSTORAGEreturned the UZF record. Until 13 November 2026 this gave false local mass-balance errors in about 2,900 Antelope Valley cells; no other test model has record names that overlap. UZF'sSTORAGE CHANGEandHORT+DUNNrecords are also left out of the cell and layer balances, since they are not aquifer flows. Verified bytests\test_conventions.py. - Every budget-record layout is read (
outputs.record_flows), and this one routine is used by the local mass balance, the layer balances, the model-inflow total and the boundary-flow maps. The layouts are:- node lists (IMETH 2, 5 and 6);
- full arrays (IMETH 0 and 1);
- top-layer arrays (IMETH 4);
- layer-indicator records (IMETH 3). MODFLOW writes recharge and ET this way when NRCHOP or NEVTOP is 3: two arrays with one value per column of the top layer, an indicator and the flow. In MODFLOW-2005/NWT, and in USG with DIS, the indicator is the layer number. In MODFLOW-USG with DISU it is the node number of the highest active cell, which need not be in layer 1.
- recharge and ET were left out of the layer balances, so layer 1 showed a large false discrepancy (in one USG model, the net of recharge and ET: −27 %);
- the same terms were left out of the cell balances;
- the indicator values were added to the model inflow used to scale local errors, which made those errors look too small.
tests\test_conventions.py(structured layer indicator and USG node indicator). - BCF: Kv is back-calculated from VCONT assuming equal Kv in adjacent layers (noted in the report).
- Quasi-3D confining beds (LAYCBD): model-layer bottoms are picked out of BOTM; bed thickness is ignored.
- IBOUND < 0 cells are added to the boundary table as CHD so they take part in the boundary checks.
- SFR conductance = Kbed · length · width / thickness (MF2005 reach/segment data; MF6 packagedata).
- MNW1, MNW2 and MF6 MAW are treated as wells; the rate is split evenly among the well's connected cells
(MNW1 continuation nodes marked
MNare grouped with their well). - UZF infiltration (FINF) is mapped to the receiving cell using NUZTOP and IUZFBND and added to the recharge table with source "UZF"; the UZF parameters are kept for the UZF check. SUB no-delay and delay interbed arrays are read for the SUB check.
- Formatted (ASCII) head files written by output control are read when the model saves no binary head file.
- Recharge is mapped to the cell that receives it: NRCHOP 1/2/3 and IRCH (MF2005/USG), or list RCH / array RCHA with IRCH and FIXED_CELL (MF6).
5. Requested checks (1–12)
Each check produces a finding with a severity: Error invalid result or input, Warning likely problem, Note worth a look, OK nothing found.
1. Cells with multiple boundary conditions of the same type
Counts RIV, DRN, GHB, CHD, STR, SFR, DRT and WEL entries per cell and stress period. Several MF6 packages of
one type (e.g. RIV-1 and RIV-2) count as the same type. The table shows the count, the
first stress period, the packages involved and the summed conductance or rate. Duplicate head-dependent
boundaries are a warning; duplicate wells only a note, because several wells in one cell is often intended.
A companion check flags head-dependent boundaries placed in constant-head cells, where they have no effect.
2. High contrast in hydraulic conductivity
For every connection between two active cells, the contrast is |log10(K1/K2)|
using Kh for horizontal connections and Kv for vertical ones. Connections at or above 3 orders of magnitude
(k_contrast_orders) are listed and both cells are written to the shapefiles (they are left off the maps).
Connections that touch a lake cell are not checked: a convertible cell with Sy = 1 whose median Kh is at least 10 times
that of the other convertible cells is taken as open water simulated without the Lake package, where a large K contrast
is intended. The finding states how many connections were skipped.
3. Wells pumping from low hydraulic-conductivity cells
For each extraction well cell (largest-magnitude rate over all stress periods) the drawdown in the cell is estimated with the Thiem equation using the Peaceman effective radius:
s = |Q| / (2πT) · ln(re / rw), re = 0.208 · √(cell area), T = Kh · b
where b is the saturated thickness (from simulated heads for convertible cells, otherwise the cell
thickness). A well is flagged when s > 0.5 · b, when Kh is in the lowest 10 % of the
model's active cells, when T = 0, or when the cell is dry. Injection wells (positive rates) are not checked,
since WEL is often used for specified boundary inflows; the finding states how many were skipped. Wells in
inactive cells are a separate error.
Automatic flow reduction is reported from the MF6 AUTO_FLOW_REDUCE_CSV file or the USG
flow-reduction file.
4. High recharge relative to hydraulic conductivity
Ratio R / Kv of the cell that actually receives the recharge (Kh if Kv is unavailable). Flagged above 0.5. It is a warning when any ratio exceeds 1 (recharge cannot infiltrate even under a unit gradient) or when a flagged cell has simulated heads above land surface; otherwise a note. Negative recharge is noted separately.
5. Areas of very thin layers
Active cells thinner than 1 length unit (thin_abs) or thinner than 5 % of their layer's
median thickness (thin_rel). Cells with top ≤ bottom are a separate error.
6. Areas of locally high mass-balance error
The flow imbalance of every cell is computed from the cell-by-cell budget file at the last saved time step:
- MF6: the residual is stored in the diagonal position of FLOW-JA-FACE (indexed with the
.grbIA/JA arrays). - MF2005/NWT: net FLOW RIGHT/FRONT/LOWER FACE in and out of the cell plus all package terms.
- USG: sum of FLOW JA FACE over the cell's connections plus all package terms.
The imbalance is expressed as a percentage of the cell's throughput (half the sum of the absolute values of all its flows). Cells above 1 % are flagged, ignoring cells whose throughput is below 10-6 of the total model inflow. The table also gives each imbalance as a percentage of total model inflow. On the well-converged examples the median relative imbalance is about 10-6, which confirms the sign conventions.
7. Cells with the most solver hits
Every iteration table in the listing file is parsed and each reported location of the maximum head change is
counted as a "hit" for that cell (the default top 10 is set by top_hits). Locations of the maximum
residual are counted in a second table. Each hit cell is decorated with Kh, Kv, thickness, head, the boundary
conditions it contains, and every other check that flagged it, so the likely cause is visible at once. Cells are
labelled with their rank on the layer maps. See section 7 for the formats read.
8. Solver settings suggestions
Rule-based advice using the solver settings and the iteration history; detailed in section 7. The finding includes a table of the current solver settings.
9. Large changes in grid spacing
Structured grids: adjacent DELR or DELC values whose ratio exceeds 1.5 (grid_ratio). The
offending row/column boundaries are drawn as red dashed lines on every layer map. Cells with aspect ratio above 10
are noted. DISV/DISU: horizontally connected cells whose size (√area) differs by more than 2.5×
(unstructured_size_ratio); quadtree 2:1 refinement is normal and is not flagged.
10. Boundary conductance zero or very high
For RIV, DRN, GHB, STR, SFR and DRT the conductance is compared with an aquifer cell conductance
Caq = max( Kv · A / (b/2) , Kh · b )
Flagged: zero conductance (warning), negative conductance (error), conductance > 1000 × Caq
(cond_ratio), and conductance > 1000 × the median of its package (cond_outlier).
A companion check covers elevations: stage below river bottom (error), river or streambed bottom below the cell
bottom, drain below the cell bottom, constant head below the cell bottom, and any boundary in an inactive cell.
11. Global mass balance
Every printed volumetric budget is parsed. Discrepancies above 0.5 % (the limit used in SIR 2004-5038) are a warning and above 1 % an error, for either the rate or the cumulative value. If no budget is printed the reviewer asks for PRINT BUDGET in output control. A time plot is added when several budgets exist.
12. Unsupported MODFLOW packages
Every entry in the name file (or MF6 model, plus other models and exchanges in the simulation) is classified:
- reviewed: read and used by the checks;
- passive: recognised but not needed (OC, observation files including HOB and HYD, MULT/ZONE, HFB, EVT, GNC, ...);
- unsupported: present but not reviewed (e.g. HUF2, LAK, SWT/CSUB, SWI2, CLN, USG-Transport packages, GWT/GWE models, and UZF/MNW1/SUB in MODFLOW-USG or MODFLOW 6). A package flopy failed to load is also reported as unsupported.
MODFLOW 6 simulations with several flow models, lakes and UZF. Another GWF model of the simulation, and a
GWF-GWF exchange (for example local grid refinement, LGR), are listed as passive: they are part of the simulation, not
packages of the model being reviewed. Run the reviewer once per model with --model-name (and
-o for a separate output folder). The loader records the cells connected to lakes (LAK connection data), to
UZF (package data), and to the other model (exchange data). LAK, UZF and MVR are still listed as not reviewed, but their
cells are used in three checks:
- Ill-posed model. A lake, a GWF-GWF exchange, or UZF with groundwater seepage (SIMULATE_GWSEEP) counts as a head-dependent boundary, so an inset model bounded only by its parent and its lakes is not reported as ill-posed.
- Heads above land surface. Lake-connected cells and UZF seepage cells are not counted, and the finding says how many were left out. Flooded cells that adjoin a lake-connected cell are counted separately as lake shoreline.
- Layer water balance. Lake (LAK) flows are in the budget file and are included. MODFLOW 6 does not write GWF-GWF exchange flows to the model budget file, so in layers with exchange cells the missing amount is added as "GWF-GWF EXCHANGE (BY DIFFERENCE)". Its total is compared with the exchange terms of the model's listing budget (package GWF-GWF_n). If they agree within 1 % of the gross exchange (or 0.5 % of the model inflow), those layers balance as a group. They cannot be judged one by one, and the table marks them "closed by the exchange". A disagreement is a warning.
Models without a binary grid file. Local mass balance, layer balances and flows between cells need the cell
connections, which MODFLOW 6 writes to the .grb file. When a model's DIS or DISV file sets
NOGRB, the reviewer rebuilds the connections from the grid (each active cell, then its active neighbours in
increasing node order; inactive cells have empty rows) and checks the result against the size of FLOW-JA-FACE. This
matched the .grb exactly for the bedrock DIS and DISV examples. Grids with vertical pass-through cells
(IDOMAIN −1) are not rebuilt, and the report says why those checks were skipped. LAK lake tables (LAKTAB) are
listed as passive input files of LAK.
Verified by tests\test_conventions.py (synthetic two-model simulation with a lake and UZF, and a NOGRB grid) and by the USGS
Central Sands Lake Study models (Pleasant Lake and Plainfield Tunnel Channel Lakes, MODFLOW 6 LGR). For Plainfield, the
exchange by difference was −7,797.6 L3/T against −7,797.4 L3/T in the
listing.
6. Additional checks
These come from Reilly & Harbaugh (2004) and from typical support cases.
| Check | What it looks for | Basis |
|---|---|---|
| Convergence failures | "failed to converge" style messages in the listing; error | SIR p. 20 |
| Abnormal termination | No "Normal termination" in the listing | |
| Packages that could not be read | When FloPy fails to read one package, the reviewer reloads the model without it and reports the package and the error, instead of stopping | |
| SFR segment routing | From MODFLOW's echo of the SFR segment data in the listing (works even if FloPy cannot read the SFR file): OUTSEG or IUPSEG referring to a segment that does not exist, a segment routed to itself, and routing loops; error | SFR2 dataset 6a |
| Ill-posed model | No specified-head or head-dependent boundary (heads not unique); error | SIR p. 21 |
| BC conflicts | Head-dependent boundaries inside constant-head cells | |
| BC elevations / placement | Stage < RBOT (error), beds or drains below cell bottom, BCs in inactive cells (warning). Drain elevations above the cell top are not flagged: that is common and intended, for example for springs. | SIR p. 26 |
| Wells in inactive cells | Ignored by MODFLOW; warning | SIR p. 26 |
| Automatic well flow reduction | From the flow-reduction output (MODFLOW-USG/NWT *_flowreduction.dat, MF6 *_well_reduce.csv): for each time step, the reduction of the reduced pumping wells (|applied Q| − |actual Q|), the actual WEL withdrawal from that time step's listing budget (out − in), the expected withdrawal (actual + reduction), and the percent of the expected pumping not pumped. A warning when the largest percentage is 1 % or more, otherwise a note. Time steps without a printed budget have no percentage. | |
| Dry cells | Heads at HDRY/±1e30, or below the cell bottom for Newton formulations; a note, which mentions whether some of them contain BCs | SIR p. 13–15, 21–22 |
| Heads above land surface | Active layer-1 cells, without a drain/river/GHB/CHD/SFR, with head above the top of layer 1 | |
| Confined cells below their top | Non-convertible cells where the water table is below the top (constant saturated thickness) | SIR p. 15 |
| Invalid K | K ≤ 0 or undefined in active cells, with the number that are NaN or infinite; error | |
| NaN or infinite input values | (1) A text scan of every input file of the model, following OPEN/CLOSE and external array files, for NaN and infinity in every common spelling: NaN, nan, -nan(ind), 1.#QNAN, 1.#IND, Infinity, inf, 1.#INF. A token counts only if it stands alone (not part of a word or file name), and comments are skipped. (2) NaN or infinite values in the arrays that were read, in active cells: specific storage, specific yield, starting heads, cell top and bottom (K is in the Invalid K finding). An error, with a table of package, file, line and value. MODFLOW reads some spellings without stopping, and the value spreads through the solution. Other spellings (-nan(ind), 1.#QNAN) stop FloPy from reading the package, so its other checks are skipped; the text scan still finds them. No example model has any; the scan took at most 10 s (dwrm4, SIR 2021-5088). Verified by tests\test_nan_values.py. | |
| Vertical anisotropy | Kv > Kh, or Kh/Kv > 1000 | |
| Isolated active cells | Active cells with no active neighbour | |
| Starting heads below bottom | Convertible cells that start dry; a warning for transient runs | SIR p. 17–19 |
| Time discretization and units | Transient periods with fewer than 4 time steps or TSMULT > 1.5; undefined units. Adaptive time stepping (USG/USG-T OC starting with ATSA, or an MF6 ATS6 file in TDIS) is detected and its settings reported (DELTAT, TMINAT, TMAXAT, TADJAT). NSTP is then only a starting value, so the step-count warning is skipped, and the steps actually taken per stress period are counted from the printed budgets. The Courant number uses the actual step length (DELT) from the compact budget file when present. | SIR p. 15, fig. 11; p. 26 |
| Storage | Only for models with transient stress periods (a steady-state model uses no storage, so Ss and Sy are not reported). Storage coefficient S = Ss × saturated thickness: the full cell thickness for confined (non-convertible) cells, and head − bottom (at most the cell thickness) from the final simulated heads, or the starting heads without a head file, for convertible cells. With the STORAGECOEFFICIENT option (MF6 STO, LPF or UPW) the input is S itself. Any active cell with S ≥ 1 is an error and is mapped. Also: Ss > 1e-2 (storativity entered as Ss) and Sy of convertible cells outside 0.001–0.5, with a per-layer table of Ss, the thickness used, S and Sy. Convertible cells with Sy ≥ 0.99 are reported separately as lake cells: high K with Sy = 1 is a common way to simulate lakes or other open water without the Lake package, which often causes convergence problems. They are left out of the Sy range check, with a warning only when their K is less than 10 times the median of the other convertible cells. | SIR p. 11–13 |
| Boundary flux inventory | Every budget term of the last printed budget with its mathematical type (specified head, specified flux for wells or recharge, head-dependent, ET, storage) and its share of inflow and outflow; a note when specified heads carry more than bc_share_pct of the flow | SIR p. 16–17; Reilly 2001 (TWRI 3-B8); ASTM D5609 |
| Budget change between first and last budgets (descriptive, not capture) | Change of each budget term between the first and last printed budget of the same run, as a share of the increase in pumping. This describes the budget change; it is not pumping-induced capture, which needs a controlled comparison with a run without the added pumping, because every other change between the two budgets is mixed in; warning when specified heads supply more than bc_share_pct (50 %) of it. Pumping wells within bc_near_well_cells (3) well-cell widths of a specified-head cell are listed and mapped. | Reilly 2001; Franke, Reilly & Bennett 1987 (TWRI 3-B5) |
| Initial-condition drift | Only when the first stress period is transient: storage release plus uptake as a share of total inflow in the first time step (warning above ic_storage_pct, 10 %) and in the last step of the period, and the head change from the starting heads to the first saved heads, by layer, with the largest changes mapped | Franke, Reilly & Bennett 1987; ASTM D5610 |
| Transport grid numbers | USG-Transport (BCT) or a MODFLOW 6 GWT model in the simulation: grid Peclet number in its mechanical-dispersion approximation (connection length / longitudinal dispersivity; vertical connections use the vertical dispersivity and layer thickness; molecular diffusion is ignored, and the value is a grid property that does not depend on velocity, so it is reported even where flow is zero; zero dispersivity gives an infinite value, counted separately) and Courant number (pore velocity |q| / (saturated face area × porosity) × length of the simulation time step of the last saved budget, not the output interval / connection length), per cell (the maximum over its connections), per layer and mapped. Cells with no flow at that time step (Courant number 0) and cells where it is unavailable (dry, no saturated face, no porosity) are counted separately and left out of the percentages. A warning when more than transport_cell_pct (5 %) of flowing cells have Courant > 1, or Peclet > 2 with central-in-space advection; Peclet > 2 with upstream or TVD schemes is a note about numerical dispersion. | Konikow 2011 (Groundwater 49(2)); EA NC/99/38/2 |
| Budget records at every saved time step | From the record index of the cell-by-cell budget file (outputs.budget_records): every budget record that is present at some saved time steps but absent at others, with the number of saved time steps without it, the first one, and the stress periods without it (wholly or partly). MODFLOW writes no record for a package in a stress period where the package has no entries. Groundwater Vistas then cannot compute mass-balance-through-time graphs correctly, and MODPATH, which expects the same budget records at every time step, will not run. A warning, with the advice to give the package at least one entry in every period (for example a well with a rate of 0). Records are identified by name plus, for MODFLOW 6, the package name, so two packages of one type are checked separately. A name written twice in a time step without a package name is numbered (RIVER LEAKAGE #2). STORAGE (or STO-SS/STO-SY) absent only in steady-state stress periods is normal MODFLOW output: it is explained in the finding, not warned about. Verified by tests\test_conventions.py. | |
| Recharge consistency | RCH rate × area versus the RECHARGE budget term (> 5 % difference noted); UZF terms are excluded | SIR p. 24 |
| UZF (MF2005/NWT) | UZF cells over inactive columns; infiltration (FINF) above VKS (rejected); VKS = 0 where infiltration is applied; VKS more than 10× different from Kv (table only); EPS outside 3.5–7.5; THTS outside 0–0.6 or not above Sy (THTR would be ≤ 0); THTI outside THTR–THTS; SURFDEP ≤ 0; listing messages that UZF cells were made inactive. FINF is also included in item 4 (recharge relative to K). | UZF1 documentation (TM 6-A19) |
| SUB (MF2005/NWT) | Interbed layers that do not exist; negative storage; inelastic storage below elastic (beds and DP zones); starting head below the preconsolidation head; delay beds thicker than the layer (RNB × DZ); DSTART far outside the cell or below DHC; undefined material zones. Reports the maximum simulated subsidence from the SUB output file. | SUB documentation (OFR 03-233) |
| Simulated concentrations (USG-T) | Read from the model's .con file by the reviewer's own record reader (outputs.scan_layer_records; FloPy's HeadFile cannot read files that mix labels). Label contract (outputs.select_species1_label, tested by tests\test_conc_labels.py): species 1 is the record labelled exactly CONC (single-species output) or CONC01 (species-numbered output); if both are present the file is ambiguous and concentrations are not evaluated; CONC02 and higher are listed as not evaluated; TMPR and every other label are never read as concentrations. Reported: the range at the final saved time by layer; cells negative at any of up to 50 evenly spread saved times (the report lists which; unsampled times are not checked); and cells above the largest inspected reference concentration (initial BCT or PCB). Recharge, well and other source concentrations are not read, so exceeding that value is not by itself proof of numerical overshoot. Cells at CINACT or inactive are excluded. Negative values are a warning; an exceedance is a note when it is under 5 % in a few cells, otherwise a warning. | Zheng & Bennett 2002 |
| Density-driven flow (DDF) | RHOFRESH, RHOSTD and CSTD are positive, RHOSTD > RHOFRESH, density ratio ≤ 1.3, plausible units for RHOFRESH. Largest initial, PCB and simulated concentrations as a percentage of CSTD: a warning above 120 % (linear density extrapolated) or below 1 % (density negligible, often a units mismatch). Share of cells above 10 % of CSTD. Advice on freshwater-equivalent heads for head targets and on IMPHDD. | USG-Transport documentation |
| Prescribed-concentration boundary (PCB) | Cells outside the grid or inactive, cells listed twice in a period (and with different values), negative values, species above MCOMP, largest value against CSTD, overlap with CHD cells, and the simulated concentration equal to the prescribed value in every PCB cell at the final saved time (a mismatch means the boundary was not applied). PCB cells are mapped. | USG-Transport documentation |
| Layer maps | One PNG per layer with the flagged cells. K-contrast cells are not drawn, because on large models they cover most cells; they are in the layer shapefiles (K_CONTRST) and the item 2 table. | |
| Layer property summary | Min/median/max of Kh, Kv and thickness per layer |
The report ends with a reviewer checklist: the SIR 2004-5038 evaluation questions that need the model report and professional judgment (objectives, conceptual model, boundary justification, calibration, ...).
Guideline checks (BC, Australia, Chile)
Added on 13 November 2026 from the review in Guidelines_Review_Recommendations.html of the BC Ministry
of Environment Guidelines for Groundwater Modelling to Assess Impacts of Proposed Natural Resource Development
Activities (2012), the Australian groundwater modelling guidelines (2012) with their 2013 Companion, and the
Chilean SEA Guía para el uso de modelos de aguas subterráneas en el SEIA (2012). The guidelines
leave acceptance criteria to each project, so these findings are notes or warnings, never errors; each names its
source and every value can be changed with --set (mfreview\guideline_checks.py).
| Check | What is evaluated | Source |
|---|---|---|
| Head targets: calibration criteria | Scaled RMS in bands (< 5% very good, < 10% good), mean absolute error ≤ 5% of the observed range (warning when exceeded), R ≥ 0.95. R² is added to the statistics tables; the flux percent-error finding gives the share within 15%. | BC p. 155, 163, 363; Chile p. 43 |
| Head targets: placement and quality | Observed head above land surface (note) or below the assigned cell bottom (warning); screens outside the cell when the target file has screen_top/screen_bottom; targets in specified-head cells (warning); targets within one cell of a specified-head, GHB, river or stream cell. Drains are left out of the distance test because seepage drains often cover land surface. | BC p. 149, 156-158, 164, App. F; Chile p. 37 |
| ET on boundary cells | EVT/EVTA/USG ETS cells that also hold CHD (MODFLOW applies no ET there), GHB or RIV (water cycled from the boundary straight to ET; a warning above 5% of total ET); extinction depth above 5 m; single-segment ET noted. | Australia App. A 5.7.3; BC p. 63; Chile p. 35-36, 103 |
| River and stream connection | RIV, STR and SFR cells classed gaining, losing or disconnected (head below the streambed bottom) from the cell-by-cell flows (heads against stage when flows are not saved); one map of all layers and a table by package and layer. | Chile p. 36-37, 104; BC p. 63, 160 |
| Specified-head and GHB cells | Flow per cell and per contiguous group as a share of total inflow; a warning when one cell supplies more than 10%; cells that reverse direction between the first and last saved budgets. | BC p. 132, 136-137; Chile p. 102-103 |
| Storage concentration | Share of the storage change in the top 1% of cells and how many of them are recharge cells with rising heads (warning above 50% when most are). | Australia App. A 5.7.5 |
| Parameter values | K against 1e-8 to 1000 m/d (lake cells excluded), confined S < 0.005, Sy ≥ 0.01; distinct K and recharge values against the number of head targets; cell-by-cell K fields. | Chile p. 39-40, 75, 77-78; BC p. 140, 164 |
| Separate regions and holes | Active regions cut off from the main body (warning if one has no head boundary); inactive holes of up to 4 cells inside an active layer (structured grids). | Chile p. 33; BC p. 228 |
| Rewetting | LPF/BCF rewetting (WETFCT, IWETIT, IHDWET) or MF6 NPF REWET reported. | Chile p. 33 |
| Transport models | Dispersivity range (2-10 m at basin scale), transverse above longitudinal, code-default 10/1/0.1; Neumann number D Δt/Δx² (reported, implicit schemes); no Courant warning when every period is steady state; aquitards represented by one layer. | BC p. 204, 220-221; Chile p. 100-101; Australia App. A 3.3.5 |
The report also has a model description table under Model information (grid, cell sizes, corners and
rotation, active cells per layer, units, stress periods and total time, boundary cells by type, recharge in mm/yr when
units are defined, ET and transport), in the order Chile's Table 11 and BC Table 10-1 ask a report to describe. With
--checklist au,bc,cl the report appends the Australian Appendix A checklist, BC Tables D2 and D3 and
Chile Tables 11 and 12, paraphrased and keyed to the guideline item numbers; items with related findings link to them
and get a suggested status (Review, No problem found, Not evaluated), the rest are marked as needing the model
report (mfreview\checklists.py).
Checks from the Texas GAM Standards
Added on 13 November 2026 after a second survey of guidelines (Additional_Guidelines_Survey.html), from
the Texas Water Development Board GAM Standards (updated March 2024), which set numeric acceptance criteria for
the state's regional MODFLOW models. As with the guideline checks above, the values can be changed with
--set.
| Check | What is evaluated | Source |
|---|---|---|
| Water balance of each layer | For every layer at the last saved time step: inflow and outflow of every budget record in its cells plus the flow to and from the other layers (FLOW LOWER FACE for MODFLOW-2005/NWT; FLOW-JA-FACE connections between layers for MODFLOW 6 and MODFLOW-USG), and the discrepancy (inflow − outflow) / mean of the two. A warning above layer_mb_pct (1 %), a note above layer_mb_ideal_pct (0.1 %); layers carrying less than layer_mb_min_frac (0.001) of the model inflow are listed but not judged. Balances by county need county polygons and are not computed. | TWDB p. 33 |
| Water budget by layer | Table of the net inflow of every budget term in each layer and the flows to and from the layers above and below (cross-formational flow), with the total flow between layers as a share of the model inflow; the CSV has the inflow and outflow of every term and layer. | TWDB p. 35 |
| Transient setup | Models with transient stress periods: whether stress period 1 is steady state (if not, the starting heads are described), and transient stress periods longer than max_transient_perlen_years (1 year), listed with their lengths. Notes, since long periods are reasonable in predictive runs. | TWDB p. 34-35 |
| Head error by layer | The head-target statistics-by-layer finding adds a table judging each layer with enough observations against a mean absolute (or RMS) error below calib_layer_twdb_pct (10 %) of that layer's observed range; a layer that fails it gives a warning. | TWDB p. 33-34 |
| Flux targets | The percent-error finding's advice cites TWDB's requirement to match springs and base flow within 10 %; the share within 10 % was already reported. | TWDB p. 34 |
| Residual histograms by layer | A histogram of residuals for each layer with targets, in the calibration graphs (interactive and PNG) for every target type with more than one layer. | TWDB p. 42 |
| Sensitivity and uncertainty files | Lists PEST and PEST++ control, record, Jacobian, sensitivity, parameter, instruction and template files, UCODE files and ensemble CSVs found in the model folder and the folders directly below it (or says none were found). Their results are not evaluated. | TWDB p. 35-36; DWR SGMA Modeling BMP (2016); IESC uncertainty note (2018) |
Calibration review
Groundwater Vistas writes one residual file per target type next to the name file. Every file named
<root>_<type>target_resids.csv, where <root> is the name file's base name (for
MODFLOW 6, the mfsim.nam or GWF model name-file base name), adds a subsection to the report's
Calibration review section:
| Type (file) | Target | Type-specific checks |
|---|---|---|
head (_headtarget_resids.csv) | Heads | Targets outside the grid, in inactive or dry cells |
ddn (_ddntarget_resids.csv) | Drawdowns | Same location checks as heads |
headdif (_headdiftarget_resids.csv) | Head differences (e.g. vertical gradients between paired screens) | Location checks; sign check: pairs whose observed and simulated differences have opposite signs (the model gets the flow direction wrong), ignoring differences smaller than 1 % of the observed range; warning above 10 % of pairs |
flux (_fluxtarget_resids.csv) | Flows (springs, baseflow, boundary fluxes) | Percent error for each target, median absolute percent error (warning above 25 %), share within 10 % and 25 %, observed and simulated totals; sign and order-of-magnitude mismatches (factor of 10 or more: usually units or sign convention); identical simulated values shared by 3 or more targets with different observations (targets referencing the same cells or reach group). For transient files, a per-target table of median observed and simulated flow, listing targets 10× or more off and targets whose observations are all zero, with a test of whether the ratios are near 86,400 (per day versus per second) |
conc (_conctarget_resids.csv) | Concentrations | Location checks; negative simulated concentrations. When the positive observed values span calib_conc_log_orders (2) or more orders of magnitude, the calibration is judged on log10 values: residual = log10 observed − log10 simulated, with mean, absolute mean, RMS (also as a factor), range-scaled statistics overall and by layer, the residual tests, and the warning thresholds applied to these. The arithmetic statistics are then shown as notes, because they are dominated by the highest concentrations. Otherwise a summary of log10 residuals is given. |
| other | Any other type in the same format | Generic statistics only |
The files have the columns Name, X, Y, Layer, Time, Observed, Simulated, Residual, Weight, WeightedResid;
column names are not case-sensitive, and the residual (observed − simulated) is computed if missing. For every
type the subsection contains:
- Statistics for all observations and for each model layer: number of observations and targets, mean residual, mean absolute residual, standard deviation, RMS error, minimum and maximum residual, observed minimum, maximum and range, the correlation of observed and simulated values, and the weighted sum of squared residuals.
- Scaled statistics: the mean, absolute mean, standard deviation and RMS divided by the range of the observed values, in percent. The overall table uses the range of all observations; each layer row uses that layer's range.
- Findings: a warning when the scaled RMS exceeds 10 % or the scaled mean exceeds ±5 % overall, or when a layer with at least 10 observations exceeds 10 %, plus the type-specific findings above. A 10 % scaled RMS is a common rule of thumb, not a standard; SIR 2004-5038 stresses judging the fit against the model's purpose.
- Transient files (more than one time): statistics through time and a plot of the mean and RMS residual against time.
- Flux targets: percent discrepancy summary (added 2026-11-18): for each flux target,
100 × (|simulated| − |observed|) / |observed|, so a positive value means the model simulates more flow,
for inflows and outflows alike; for a transient record it is the discrepancy of the summed flows, so high-flow periods
count more. An info finding gives the number of targets within 10 % (TWDB GAM Standards 2024, p. 34), within
15 % (
calib_flux_within_pct, BC MoE case study, p. 363) and within 25 %, the five largest discrepancies and the total over all targets. Two tables: targets and observations in bands (within 10 %, 10–25 %, 25–50 %, 50–100 %, over 100 %), and every target, largest first, with its observed and simulated totals, median absolute and mean percent error, and share of observations within 10 %. A bar chart (calibration\calibration_flux_discrepancy.png, interactive in the report) shows each target with ±10 % and ±15 % guide lines, bars clipped at ±200 %. Observations of zero, and observations whose simulated flow has the opposite sign, are counted and left out of the percentages. Verified bytests\test_flux_discrepancy.py. - Statistics for each target and hydrographs (
mfreview\hydrographs.py; any type with a target observed at two or more times):- A table with one row per target: number of observations, first and last date, observed range, mean residual, mean absolute residual and RMS error, and the same three scaled by the target's own observed range (percent). The same six statistics are computed on the change from the target's first observation, where the residual is the observed change minus the simulated change. When several observations share the first time, their mean is the reference. BC MoE (2012, p. 149) applies the residual statistics to drawdowns normalised to the initial head, with separate datums for measured and simulated values. Because this removes a constant offset at each target, it measures how well the model reproduces the amplitude and timing of the changes. A target whose RMS is much larger than its change RMS has the right fluctuations at the wrong level; the reverse points to the wrong amplitude or timing, or to drift from the initial conditions.
- The report shows the table with the largest change RMS first, up to
max_table_rowsrows. Every target is incalibration\calibration_<type>_by_target.csv. - A row "Change from first observation" is added to the overall statistics; it pools every target's later
observations. Its scaled values divide by the range of all observed changes. The finding
calib_<type>_transientis a warning when that scaled RMS exceedscalib_scaled_rms_pctor the scaled mean exceedscalib_scaled_bias_pct. - Hydrograph PDF
calibration\calibration_<type>_hydrographs.pdf: observed points and the simulated line for every target, 9 per landscape letter page (3 × 3), in the residual file's target order. Every graph has the same time axis. - Y axis: every graph has the same span (maximum − minimum), centred on its data. Non-negative data are
not shown below zero. The span is the largest range of observed and simulated values that is not an outlier, plus
10 %. An outlier is a range above Q3 + 3 × IQR of all targets' ranges
(
hydro_span_fence_iqr). - Outlier targets get their own scale, and their titles are marked "[own Y scale]". When the span would be more
than 10 times the median range (
hydro_span_max_ratio), most graphs would be nearly flat. This is typical of flows or concentrations that span orders of magnitude, so every graph then gets its own scale, and the page footer says which rule applied. - The report shows the 9 targets with the largest change RMS as an interactive graph, with a PNG copy, and links to the PDF.
- Dates: Groundwater Vistas writes
<root>_<type>target_obs_dates.csv(every measurement) and<root>_<type>target_sim_dates.csv(every output time) next to the residual file. Neither has a header; the columns are name, date as M/D/YYYY H:M:S, and value. When they are present the hydrographs use calendar dates, and the simulated line comes from the sim_dates file. The model start date and time unit (days, seconds, minutes, hours or years) are those that make most obs_dates rows line up with the residual-file rows of the same target and value (date = start + time). The statistics use only the residual file. Measurements found only in obs_dates are drawn as open grey circles, counted in the finding, and not used to set the scale. Without the dates files, or when no start date fits, the hydrographs use model time from the residual file.
tests\test_hydrographs.py. - Residual tests (all types except flux, at least
calib_min_test_obs= 10 observations): normality of the residuals as R2N. Weighted residuals (weight × residual) are used when the weights differ, otherwise raw residuals, and the report says which. R2N is the correlation coefficient (not its square, despite the name from Hill 1998) between the ordered residuals and their expected normal order statistics (Blom positions). It is compared with the 5th percentile of R2N over 400 samples (100 above 5,000 observations) of the same size drawn from a normal distribution (fixed random seed 12345), with a normal probability plot (Hill 1998, guideline 11). Bias trend: Pearson correlation of residual with simulated value, with a two-sided normal-approximation p-value (a warning when p < 0.05 and |r| ≥ 0.3). Spatial clustering: Moran's I of the unweighted mean residual at each target, with binary weights to the 8 nearest targets (k-nearest neighbours in map coordinates, row-standardised), and a one-sided permutation p-value (999 permutations, fixed seed 54321). It is computed for all layers together and for each layer with at least 10 targets. The per-layer p-values form one family per target type and are Holm-adjusted across those layers; the all-layers test is not adjusted. Warning when I ≥calib_moran_warn= 0.3 with an (adjusted) p < 0.05. Temporal correlation for targets with 10 or more observations: a Wald–Wolfowitz runs test on residual signs (one-sided, too few runs) and the lag-1 autocorrelation. A significant result is a prompt to look at the residuals, not proof of a conceptual error. For concentrations judged on log10 values, the tests use the log10 residuals. - Scaling convention: "scaled" statistics are the statistic divided by the range (maximum − minimum) of the observed values in the same group, in percent.
- Figures: observed versus simulated (by layer, with a 1:1 line; log axes for flux and concentration when the
values span more than two orders of magnitude), the residual histogram and residual versus observed value, residual
maps with one point per target (mean residual over time) for all layers and for each layer that has targets, and the
residual-test plots. In the report these are interactive plotly graphs: hover for names and values, zoom, and
click legend entries to hide layers. plotly.js is embedded once so the report remains a single file. Scatter plots
show at most 10,000 randomly chosen observations; histograms and statistics use all. PNG versions are written to
calibration\, and the report falls back to them when plotly is not installed. - Files:
calibration\calibration_<type>_targets.csv(all observations with node, location and type-specific flags),calibration\calibration_<type>_targets.shp(one point per target with its mean residual, plus the model.prjwhen present) andtables\calibration_<type>_overall.csv/_by_layer.csv.
Drawdown and concentration checks were tested on synthetic files (tests\make_calibration_targets.py
builds test_models\bedrock_calib with seeded problems for all five types); real ddn and conc examples
should be added when available.
7. Solver diagnostics
Listing formats parsed
| Solver | Source | Information read |
|---|---|---|
| PCG (also SIP, SOR, DE4, PCGN) | model listing | "MAXIMUM HEAD CHANGE / RESIDUAL FOR EACH ITERATION" tables with (layer,row,col); calls and total iterations per time step |
| NWT | model listing | Per outer iteration: column/row/layer and value of max head change and max flux residual; outer and inner iteration totals |
| SMS (USG) | model listing | Outer/inner iteration rows with "GWF-node number", backtracking counts, iterations per time step; detects "Newton Linearization" |
| IMS (MF6) | mfsim.lst | OUTER ITERATION SUMMARY (and INNER ITERATION SUMMARY with PRINT_OPTION ALL); cell ids in DIS, DISV or DISU form.
mfsim.lst is looked for next to mfsim.nam and in the folder of the model listing (MODFLOW 6
writes it where it was started), and the newer copy is used. A copy more than a minute older than the model listing
is from an earlier run and is not used; completion is then judged from the model listing, which must reach the last
time step of the last stress period (any step of it with adaptive time stepping). |
| All | listing | Echo of solver settings (e.g. effective MF6 values set by COMPLEXITY), DRY/WET conversion messages, pseudo-transient continuation, convergence failures, normal termination |
GMG prints no per-cell iteration data, so hits are not available for it.
Suggestion rules
| Condition | Suggestion |
|---|---|
| Convergence failure | Fix model causes first, then version-specific settings: IMS COMPLEXITY COMPLEX, DBD under-relaxation, BICGSTAB, preconditioner levels, ATS; NWT COMPLEX, LINMETH 2; SMS NONLINMETH 1, backtracking, XMD level; PCG damping or converting to NWT |
| Outer iterations ≥ 75 % of the maximum | Solution close to failing: raise the limit and apply damping |
| Max head change changes sign in ≥ 30 % of outer iterations (at least 3) | Oscillation: under-relaxation or damping appropriate to the solver |
| First-iteration change > 10 × model relief | Starting heads far from the solution, or extreme K/thickness/conductance; use a previous solution as starting heads |
| One cell holds ≥ 25 % of the hits | Model-construction cause at that cell; its other flags are quoted |
| Dry/rewetting events without Newton | Consider NWT, USG or MF6 Newton, or wetting parameters (SIR p. 21–22) |
| Budget error > 0.5 % and head closure > 0.001 | Tighten the head and residual closure by a factor of 10 |
| Head closure large relative to model relief | 0.001–0.01 is typical |
| Head closure < 1e-6 with many iterations | Can be relaxed for speed if the budget stays under 0.5 % |
| Residual closure > 0.1 × median cell flow | Cells can retain flow errors; suggests a value about 1e-3 × median cell flow (or IMS RELATIVE_RCLOSE) |
| IMS specifics | PRINT_OPTION NONE; Newton with COMPLEXITY SIMPLE; Newton with CG instead of BICGSTAB; no under-relaxation while oscillating; INNER_DVCLOSE > OUTER_DVCLOSE |
| PCG specifics | NPCOND 2; DAMPPCG 1 in a non-linear model that oscillates or fails; MXITER < 50 for convertible layers |
| NWT specifics | Option not COMPLEX, LINMETH 1 when struggling; very small THICKFACT |
| SMS specifics | HICLOSE > HCLOSE; frequent backtracking; IPRSMS 0 |
8. Thresholds
Defaults are in mfreview\config.py. Override with --set name=value or
--config file.json; the report lists the values used.
| Name | Default | Used by |
|---|---|---|
k_contrast_orders | 3 | #2 K contrast (orders of magnitude) |
well_radius | 0.5 | #3 well radius for the Thiem estimate (length units) |
well_drawdown_frac | 0.5 | #3 flag when estimated drawdown > fraction × saturated thickness |
well_low_k_percentile | 10 | #3 low-K percentile of active Kh |
rch_k_ratio | 0.5 | #4 recharge / Kv |
thin_abs | 1.0 | #5 absolute minimum thickness |
thin_rel | 0.05 | #5 fraction of layer median thickness |
local_mb_pct | 1.0 | #6 cell imbalance, % of cell throughput |
local_mb_min_frac | 1e-6 | #6 ignore cells with throughput below this fraction of total inflow |
top_hits | 10 | #7 number of cells reported |
grid_ratio | 1.5 | #9 adjacent row/column width ratio |
unstructured_size_ratio | 2.5 | #9 DISV/DISU connected cell size ratio |
aspect_ratio | 10 | #9 cell aspect ratio note |
cond_ratio | 1000 | #10 BC conductance / aquifer cell conductance |
cond_outlier | 1000 | #10 BC conductance / package median |
global_mb_pct | 0.5 | #11 warning limit (%) |
global_mb_error_pct | 1.0 | #11 error limit (%) |
calib_scaled_rms_pct | 10 | Calibration: scaled RMS (% of observed range) warning level |
calib_scaled_bias_pct | 5 | Calibration: |scaled mean residual| warning level |
calib_min_layer_obs | 10 | Calibration: minimum observations for a layer warning |
calib_sign_mismatch_pct | 10 | Head-difference targets: % of opposite-sign pairs for a warning |
calib_flux_pct | 25 | Flux targets: median absolute percent error for a warning |
calib_identical_sim_min | 3 | Flux targets: smallest group of identical simulated values reported |
calib_conc_log_orders | 2 | Concentration targets: judge on log10 values from this many orders of magnitude of observed range |
calib_alpha | 0.05 | Calibration: significance level of the residual tests |
calib_moran_warn | 0.3 | Calibration: Moran's I of target residuals for a clustering warning |
calib_neighbors | 8 | Calibration: nearest targets used as neighbours for Moran's I |
calib_min_test_obs | 10 | Calibration: minimum observations or targets for a residual test |
hydro_span_fence_iqr | 3 | Hydrographs: the common Y span is the largest target range below Q3 + this × IQR of the targets' ranges (plus 10 %) |
hydro_span_max_ratio | 10 | Hydrographs: every graph gets its own Y scale when the common span would exceed this × the median range |
bc_share_pct | 50 | Specified-head share of inflow or of the pumping increase for a warning |
bc_near_well_cells | 3 | Specified-head cell within this many well-cell widths of a pumping well |
ic_storage_pct | 10 | Initial-condition drift: storage share of the flow in the first time step |
transport_peclet | 2 | Transport: grid Peclet number limit |
transport_courant | 1 | Transport: Courant number limit |
transport_cell_pct | 5 | Transport: % of flowing cells above a limit for a warning |
anisotropy | 1000 | Kh/Kv note |
calib_scaled_mae_pct | 5 | Head targets: mean absolute error as % of the observed range (Chile upper bound; warning) |
calib_srms_very_good_pct | 5 | Head targets: scaled RMS band "very good" (BC); "good" uses calib_scaled_rms_pct |
calib_r_ref | 0.95 | Head targets: reference correlation coefficient R (BC) |
calib_flux_within_pct | 15 | Flux targets: share within this percent error is reported, and the dotted guide line of the percent-discrepancy chart (BC case study) |
target_near_bc_cells | 1 | Head targets within this many cell widths of a boundary cell |
et_exdp_max_m | 5 | ET extinction depth (m) above which a note is given (BC) |
bc_cell_share_pct | 10 | One specified-head or GHB cell supplying more than this % of total inflow (warning) |
storage_top_share_pct | 50 | Share of the storage change in the top 1% of cells |
k_min_m_per_d, k_max_m_per_d | 1e-8, 1000 | K reference range in m/d (Chile) |
confined_s_max, sy_min | 0.005, 0.01 | Confined storage coefficient and specific yield references (Chile) |
aquitard_kv_ratio | 100 | Transport models: layer Kv this many times below both neighbours is an aquitard |
hole_max_cells | 4 | Largest inactive hole listed |
disp_l_min_m, disp_l_max_m | 2, 10 | Longitudinal dispersivity range at basin scale (BC) |
transport_neumann | 0.5 | Neumann number D Δt/Δx² reference (Chile) |
flooded_tol | 0 | Head above land surface tolerance |
max_table_rows | 200 | Rows shown per HTML table (CSV is complete) |
max_map_cells | 2,000,000 | Skip maps above this many cells |
cond_ratio was raised from 100 to 1000 after the
bedrock example flagged 445 river cells at about 100.3×; rch_k_ratio was raised from 0.1 to 0.5
because 0.1 flagged every recharge cell on the Kv = 0.01 bedrock. Both thresholds are a matter of judgment; lower
them for a stricter review.9. The report
- Summary: layers, cells, active cells, stress periods, error and warning counts, the global budget result, and the most important findings with links.
- Requested checks: a table of items 1–12 with their result, followed by each finding (summary, advice, table, link to the full CSV, reference). Solver iteration tables follow item 7.
- Additional checks, sorted by severity.
- Layer maps and the budget-discrepancy plot.
- Model information: version, files, units, flow package, solver; layer property summary; time discretization; water budget components; loader notes.
- Reviewer checklist (SIR 2004-5038 questions, with tick boxes) and the thresholds used.
Errors and warnings open expanded; notes are collapsed. The page follows the system light/dark setting and prints with all sections expanded.
Layer maps
The background is log10 Kh of the active cells in grey (inactive cells are blank). Flagged cells are drawn with these symbols; categories with more than 300 cells get smaller markers.
| Symbol | Meaning |
|---|---|
| square | Duplicate boundary condition |
| x | K contrast above threshold |
| triangle down | Well in low-K cell (also wells in inactive cells) |
| triangle up | High recharge relative to K |
| dot | Thin cell |
| x | Zero/negative thickness or invalid K |
| diamond | Local mass-balance error |
| star + number | Solver-hit cell and its rank |
| plus | BC conductance zero/high |
| hexagon | BC elevation/placement problem |
| circle | Dry / below cell bottom |
| circle | Head above land surface |
| X | Isolated active cell |
| bar / dashed line | Abrupt cell-size change (DISV/DISU) / row-column width change (DIS) |
Structured grids are drawn with pcolormesh; DISV, DISU and USG grids as polygons. Without
geometry, USG falls back to points from nodes_xyz.csv, and if nothing is available the maps are
skipped with a note.
Shapefiles
The maps folder also holds one polygon shapefile per layer, layer_NN.shp, so problem
cells can be found by zooming in a GIS (ArcGIS, QGIS, or Groundwater Vistas). Each shapefile contains every cell
of the layer, active and inactive, so problems in inactive cells (for example wells, boundaries or UZF cells in
inactive cells) are shown in the context of the whole grid; the ACTIVE field tells them apart. The polygons use the
same real-world coordinates as the maps. A DISU model without cell polygons gets a point
shapefile instead. The attribute table has:
| Field | Contents |
|---|---|
| NODE, LAYER, ROW, COL (or CELL) | 1-based cell id (ROW/COL for structured grids, CELL for DISV) |
| ACTIVE | 1 = active cell, 0 = inactive cell |
| KH, KV, TOP, BOTTOM, THICKNESS, HEAD | Cell properties and the final simulated head (blank if dry or not available) |
| NFLAGS | Number of problem types flagged in the cell; select NFLAGS > 0 to see only problem cells |
| SOLV_RANK | Rank among the top solver-hit cells (0 = not a top cell) |
| DUP_BC, K_CONTRST, WELL_LOWK, RCH_K, THIN, GEOMETRY, LOCAL_MB, SOLV_HIT, BC_COND, BC_ELEV, DRY, FLOODED, ISOLATED, SIZE_RATIO, UZF, SUB, SUB_MAX | 0/1 flag for each problem category shown on the maps (same categories as the map legend) |
| PROBLEMS | Text list of the problems in the cell |
grid_spacing_lines.shp holds the row/column boundaries flagged by the grid-spacing check, with the
BOUNDARY (e.g. "column 100 | 101") and RATIO fields.
Projection: if the folder that contains the name file (or mfsim.nam) has a .prj
file, it is copied to every shapefile. A .prj with the name file's base name is preferred; if there are
several others, the first is used and the report says which. Without a .prj the shapefiles have no
projection file.
Length units (added 2026-11-18): the linear unit of the .prj (the UNIT of the
PROJCS, not the angular unit of its GEOGCS) is compared with the model length unit. When they
differ, for example a model in feet with a UTM .prj in metres as in the Central Springs models, the X and
Y coordinates of every shapefile (layers, grid-spacing lines, calibration targets) are multiplied by the ratio
(0.3048 for feet to metres), and a note says so. Attribute values (top, bottom, thickness, head, K, observed and
simulated values) stay in model units. A US survey foot counts as a foot; a geographic .prj (degrees)
leaves the coordinates unchanged. When the model length unit is undefined (LENUNI 0, as in the CSM models), the X/Y
unit is inferred from the calibration targets (target coordinates that fit the grid only after a metre/foot
conversion) or, for a UTM .prj, from the grid eastings (beyond 900,000 they cannot be UTM metres but fit
as UTM feet); the note says which. With no evidence the coordinates are left unchanged. Flux targets are not located on cells, so their
coordinates are checked against the grid extent instead: if most fall outside it but nearly all fall inside after
a metre/foot conversion, the converted coordinates are used for the residual maps and the target shapefile, with a
note. Verified by tests\test_shapefile_units.py.
The shapefiles are written by the reviewer itself (mfreview\shapes.py), so no GIS
library is needed; they were validated with pyshp and GDAL.
10. Architecture
| Module | Responsibility |
|---|---|
modflow_review.py | Command line; DLL path fix; threshold overrides |
mfreview\__init__.py | Puts the vendored flopy fork first on the path |
mfreview\loaders\__init__.py | Version and name-file detection |
mfreview\loaders\mf2005.py | MF2005/NWT (and USG with DIS): grid, LPF/UPW/BCF, BCs, SFR, MNW2, recharge, solver |
mfreview\loaders\usg.py | USG DISU, GSF geometry, LPF, BCs by node, recharge, SMS |
mfreview\loaders\mf6.py | MF6 DIS/DISV/DISU, NPF/STO/IC, list and array packages, SFR, MAW, IMS, files |
mfreview\model.py | Grid and ReviewModel; name-file, GSF and binary-file helpers; connection builders |
mfreview\packages.py | Package classification (reviewed / passive / unsupported) |
mfreview\outputs.py | Heads and per-cell budget residual |
mfreview\listing.py | Budgets, solver tables, hit counts, oscillation statistics |
mfreview\checks.py | All checks, Finding objects, map categories |
mfreview\solver_advice.py | Solver rules (item 8) |
mfreview\plots.py | Layer maps and budget plot |
mfreview\shapes.py | Layer and grid-spacing shapefiles (built-in shapefile/dBASE writer), .prj copy |
mfreview\report.py | HTML and CSV output |
mfreview\review.py | Orchestration and the MF6 re-run |
mfreview\config.py | Thresholds |
A check that raises an exception is reported as a note ("Check failed") with the end of the traceback, so one unusual package cannot stop a review.
11. Testing and results
The examples folder originally had two gaps: bedrock_mfnwt contained only the
.gwv file, and bedrock_mf6disu actually wrote DISV6. Corrected GWV-written models
were later added to both folders (NWT with UPW/NWT; MF6 with a true DISU6 file) and are reviewed as well; see
Corrected GWV models below. tests\make_test_models.py builds additional
models in test_models\ and runs them with the executables in GWV9:
- bedrock_mfnwt: MF2005 example converted to UPW + NWT.
- bedrock_mf6disu: a true MF6 DISU version of the DIS example, with vertices and PRINT_OPTION SUMMARY.
- bedrock_mf2005_defects: seeded problems: a 1e-4 K block with a well and high recharge, a 0.2-ft thin patch, duplicate river cells with zero and 1e8 conductance, a 4× column-width jump, and HCLOSE 0.5.
- bedrock_mf2005_transient and bedrock_mf6_transient: a steady period followed by transient periods with few time steps; the MF2005 one has storativity entered as specific storage.
The fast synthetic suite, python tests\run_synthetic.py, needs no model data or MODFLOW
executables and deletes nothing: it runs the workspace-policy, input-convention, NaN-value, hydrograph,
flux-discrepancy, shapefile-unit, concentration-label and report-comparison tests (147 checks), each in a new timestamped folder. tests\compare_reports.py treats a model
folder or CSV table present in only one of the two report sets as a difference and returns exit code 0 only when
everything is identical.
Run all reviews with tests\run_all.ps1 (reports in test_output\):
| Model | Format | Errors | Warnings | Notes | Time (s) |
|---|---|---|---|---|---|
| bedrock_mf2005 | MF2005 DIS | 0 | 4 | 12 | 5.4 |
| bedrock_mfusg | USG DISU | 0 | 3 | 11 | 5.8 |
| bedrock_mf6normal | MF6 DIS | 0 | 3 | 10 | 5.6 |
| bedrock_mf6disv | MF6 DISV | 0 | 3 | 10 | 7.3 |
| bedrock_mfnwt | NWT DIS | 0 | 5 | 10 | 5.4 |
| bedrock_mf6disu | MF6 DISU | 0 | 5 | 9 | 9.2 |
| bedrock_mf2005_defects | MF2005 DIS (seeded defects) | 1 | 11 | 12 | 5.4 |
| bedrock_mf2005_transient | MF2005 DIS (storativity entered as Ss, seeded) | 1 | 6 | 11 | 5.6 |
| bedrock_mf6_transient | MF6 DIS | 0 | 6 | 9 | 5.8 |
| bedrock_calib | MF2005 bedrock model with synthetic head, ddn, headdif, flux and conc targets (seeded problems) | 0 | 14 | 16 | 9.7 |
| bedrock_usgt | USG DISU with synthetic BCT, DDF and PCB (seeded PCB defects) | 0 | 5 | 13 | 6.0 |
| bedrock_mf6_gwt | MF6 DIS with a synthetic GWT model | 0 | 8 | 10 | 5.8 |
| AntelopeValley calibrated_model (AV05) | NWT DIS, UZF + MNW1 + SUB | 0 | 9 | 19 | 17.1 |
| dwrm4 (dwrm4_ss) | USG DISU, 899,955 nodes, 15 layers, steady state; head, flux and head-difference targets | 1 | 19 | 20 | 98.5 |
| sir2021_5088 (lab_model) | MF6 DIS, 12 layers, 256 × 312 (392,221 active), 228 transient stress periods, Newton, MAW + HFB; model listing in a separate output folder | 0 | 10 | 14 | 180.3 |
| ofr2022_1112 (JBMDLPFAS) | MF6 DISV (quadtree), 4 layers × 232,597 cells (477,066 active), steady state, Newton, GNC, WEL (boundary inflows as injection) + DRN + MAW + RCH; USGS archive with outputs in output\output.JBMDLPFAS-MF | 0 | 8 | 9 | 112 |
| Central Sands, Pleasant Lake (parent / inset) | MF6 LGR: parent and inset GWF models joined by a GWF-GWF exchange, transient 2012–2018 (85 stress periods), Newton, LAK (inset), SFR, MVR, WEL, RCHA; USGS data release 10.5066/P9BVFSGJ (SIR 2022-5046) | 0 / 0 | 7 / 4 | 15 / 13 | 14 / 13 |
| Central Sands, Plainfield Tunnel Channel Lakes (parent / inset) | As above, with four lakes in the inset model (Plainfield, Second, Sherman and Long Lakes) | 0 / 0 | 6 / 5 | 14 / 12 | 14 / 23 |
| Zuñi Salt Lake | MF6 DIS, 7 layers with vertical pass-through cells (IDOMAIN −1), steady state, LAK with lake table, GHB, HFB, RCHA; USGS data release 10.5066/P1PRBK5Y (SIR 2026-5034) | 0 | 5 | 16 | 22 |
| Water Mover demonstration, model1 (parent / child) | MF6 parent and child models with SFR, joined by a GWF-GWF exchange and MVR (hypothetical; Morway and others, 2021, 10.5066/P9GQETP9) | 0 / 0 | 3 / 3 | 9 / 8 | 3 / 3 |
Water Mover demonstration, model2 (run_all.ps1 -Full only) | MF6 DIS 4 × 64 × 133 with NOGRB (connections rebuilt by the reviewer), 366 stress periods, LAK, UZF, MVR, SFR, WEL, DRN; hypothetical irrigated valley, 1.1 GB budget file | 0 | 6 | 11 | 95 |
| Central Springs Model, CSM v1.1 steady state (CSM_v11_ss) | MODFLOW-NWT DIS, 7 layers, UPW, steady state; LENUNI 0 with X/Y in feet and a UTM .prj in metres (shapefiles converted to metres); head and flux targets (target X/Y in metres) | 0 | 15 | 18 | 62 |
Central Springs Model, CSM v1.1 (run_all.ps1 -Full only) | MODFLOW-NWT DIS, 7 layers, UPW, 157 stress periods (steady first), WEL, DRN, RIV, EVT, GHB, RCH, CHD; 4.4 GB budget file; transient head and flux targets with obs/sim dates | 0 | 15 | 18 | 336 |
Counts from 13 November 2026, after the guideline checks and the Texas GAM Standards checks were added (all models re-run). The MODFLOW 6 lake, LGR and water-mover models were added on 14 November 2026, after the checks of lakes, UZF and model exchanges; every model was re-run then, and the counts of the earlier models did not change. The suite also runs one confidential model, which is not described in this document.
Antelope Valley model (UZF, MNW1, SUB)
The USGS Antelope Valley flow and subsidence model (AV05: 4 layers, 130 × 118, 93 stress periods, 553 time steps) was the first test of UZF, MNW1 and SUB support. Before that support was added, the report said "the model has no wells", skipped every head-based check because heads are saved only as an ASCII file, and showed a +103 % recharge mismatch because the UZF RECHARGE term was counted as RCH recharge. Main findings now:
- 60 MNW1 well nodes are in inactive cells (confirmed against the IBOUND arrays), reported as an error.
- 87 of 803 well nodes are in low-K cells or would draw the cell down by more than half its saturated thickness.
- 390 recharge cells exceed 0.5 × Kv (321 UZF, 69 RCH); 81 cells are dry.
- SUB: 75 cells start below the preconsolidation head; 3 delay beds are thicker than their layer; 4 delay-bed starting heads are far outside the cell.
- UZF: 16 cells lie over inactive columns, and MODFLOW-NWT made 16 UZF cells inactive because VKS ≤ 0.
- Maximum simulated subsidence is 2.88 m at L1 R87 C63 at the end of the simulation.
- FloPy warns that RCH and EVT should not be active together with UZF; the warning is listed in the report notes.
Cross-checks that passed:
- The six formulations of the same aquifer give the same duplicates, flooded area, recharge totals and boundary findings.
- The dominant solver-hit cell in MF6 DIS (with
--rerun), L3 R65 C14, is the same cell as node 34706 in the true DISU model. - Every seeded defect was detected; the 2.74 % budget error is reported as an error.
- Per-cell residuals of the converged models are about 10-6 of cell throughput for every grid type.
Corrected GWV models
| Model (examples folder) | Format | Errors | Warnings | Notes | Report |
|---|---|---|---|---|---|
| bedrock_mfnwt | NWT DIS (GWV) | 2 | 3 | 6 | test_output\gwv_bedrock_mfnwt |
| bedrock_mf6disu | MF6 DISU (GWV), with --rerun | 0 | 5 | 5 | test_output\gwv_bedrock_mf6disu |
- MF6 DISU: results match the DIS, DISV and USG versions exactly. The re-run solver output puts the dominant hit cell at node 34706 (layer 3) — the same cell as L3 R65 C14 in the DIS model — holding the maximum head change in 8 of 18 outer iterations.
- MODFLOW-NWT did not converge. It used all 100 outer iterations (MAXITEROUT = 100) and the listing says "convergence not achieved but continuing anyway per user request". The budget still shows 0.00 % discrepancy, which illustrates SIR 2004-5038's point that a good global balance does not prove a solution. The likely cause is HEADTOL = 1e-5, which is very tight for NWT (1e-4 to 1e-2 is typical); the report also suggests OPTIONS COMPLEX. The NWT file has IPRNWT = 0, so solver hits are not available until it is set to 1.
- This model exposed a reviewer bug: NWT's "CONVERGENCE NOT ACHIEVED" wording was not recognised as a convergence failure. It is now an error, with additional NWT rules for a tight HEADTOL and for continuing after non-convergence.
Findings in the bedrock example
The same in all six formats:
- 5 drain cells and 4 river cells contain more than one boundary of the same type.
- About 753 uppermost cells have heads up to 41 ft above land surface, with no drain to remove the water.
- 4 convertible cells start with heads below the cell bottom.
- One river cell has conductance about 1000× the aquifer cell conductance.
- In the MF2005 version the first PCG iteration changes heads by about 76,000 ft, the maximum change oscillates in sign, and 2 cells per layer go dry. The advice suggests damping (DAMPPCG 0.5–0.8 or adaptive) or moving to NWT, USG or MF6 with Newton.
12. Environment notes
esi_py26 environment,
numpy crashes (Windows error 0xc06d007f) on the first matrix product when Python is started without
conda activate, because the MKL DLLs in Library\bin are not on PATH. This would happen
when GWV or a batch file launches the script. modflow_review.py now adds the environment's DLL
folders to PATH (and os.add_dll_directory) before numpy is imported, so it runs either way.
Other scripts in that environment will still crash unless the environment is activated.bit_generator DLL in esi_py26 ("An Application Control policy has blocked this
file"). On that PC it had also blocked python313.dll, shapely, pyproj and
mfusg_gsi.exe, all unsigned files in the conda-forge-based environment; the packages from
Anaconda's own channel that were present were not blocked. These are observations from one machine and one set of
package versions, not a verified rule about either channel. Smart App Control was then turned off on that
development PC, and all tests pass in esi_py26; this is not a recommendation to turn it off. On a PC with
Smart App Control on, an environment built from Anaconda's channel may avoid the blocks, but that has not been
verified here. tests\run_all.ps1 uses the interpreter in the
MFREVIEW_PYTHON environment variable when it is set.MF6 listing names follow MODFLOW 6's rule (name-file base name + .lst) unless the name file sets
LIST. MF2005 listing and binary files are found from the name file; head and budget files are identified by
reading their first record, not by extension.
13. Limitations
- Tested on variants of the bedrock example, the public Antelope Valley, dwrm4 and
SIR 2021-5088 and OFR 2022-1112 (MODFLOW 6, DISV) models and one confidential USG model, plus synthetic convention tests (
tests\test_conventions.py) and node-placement checks against MODFLOW's own budget (tests\check_stress_nodes.py). Other model types and options may still expose problems. - UZF, MNW1 and SUB are reviewed for MODFLOW-2005/NWT only. UZF stream routing (IRUNFLG), UZF ET and SUB compaction by layer are not checked; subsidence is reported for the last saved time only.
- MF6: one GWF model per run (
--model-name). LAK, UZF and MVR are listed as not reviewed: lake stages and properties, unsaturated-zone parameters and mover transfers are not checked, but lake, UZF and exchange cells are used by the ill-posed, flooded-cell and layer-balance checks (see check 12 in section 5). CSUB and GWE models are not reviewed; GWT models are reviewed only for grid Peclet and Courant numbers. SFR checks cover reach conductance and elevations only. - Transport: USG-T BCT, DDF and PCB are reviewed, including the simulated concentrations; other USG-T packages (DPT, MDT, QRT, TVM, TIB, SGB) and sorption, decay and multi-species options are not. MF6 GWT: grid Peclet and Courant numbers only. Courant numbers use the last saved budget time step. MT3D models are not read. Tested on a real MODFLOW-USG Transport model (BCT with IDISP=2, DDF, PCB) and on synthetic models.
- Local mass balance is evaluated at the last saved time step only (its stress period and time step are columns of
tables\local_mb.csv). - USG: CLN cells are not checked or mapped; polygon maps need the
.gsffile. - Solver hits need the solver's iteration printout; GMG has none. The automatic re-run exists only for MF6.
- MNW1/MNW2/MAW rates are split evenly among a well's cells for the low-K check. That is a screening approximation, not the simulated distribution, and the finding says so; the MNW2/MAW connection flows give the actual split.
- BCF vertical K is inferred from VCONT (equal half-cell resistances, no confining beds); recharge/Kv findings for BCF models say so.
- HFB barriers are not included in the K-contrast check; HUF2 models skip K checks.
14. Extending the tool
To add a check, write a function in mfreview\checks.py that takes the context and returns a list
of Finding objects, then add it to ALL_CHECKS:
def check_example(c):
g, rv, th = c.g, c.rv, c.th # grid, ReviewModel, thresholds
bad = g.active & (rv.kh > 1e4)
if not bad.any():
return [Finding("example", "Very high K", "ok", "No cell has Kh > 1e4.")]
n = np.where(bad)[0]
return [_finish(Finding("example", "Very high K", "warning", f"{n.size} cells have Kh > 1e4.",
full_table=cell_frame(g, n, Kh=rv.kh[n]), nodes=n, category="k_contrast"), th)]
The context also provides c.h (final heads), c.dry, c.thick,
c.out (residuals), c.budgets, c.log (solver log) and c.bc_nodes.
Setting nodes and a category from CATEGORIES puts the cells on the maps.
New thresholds go in Thresholds in config.py and are then settable with
--set. To support a new package, add it to the loader for its version and to the sets in
packages.py.
15. File layout
modflow_review.py command-line entry point
README.md short readme
MODFLOW_Reviewer_Documentation.html this document
mfreview\ the package (see section 10)
requirements.txt, environment.yml pinned dependencies (FloPy fork commit as in vendor\FLOPY_SOURCE.txt)
vendor\flopy\ roh-sgm flopy fork (develop, 3.11.0.dev0)
tests\run_synthetic.py fast synthetic suite (no model data, no executables, nothing deleted)
tests\workspace.py test workspace policy (new run folders; generators replace only their own
marked folders, and only with --overwrite)
tests\make_handoff.py code-only archive with SHA-256 manifest and revision identifier
tests\make_test_models.py builds test_models\ with GWV9 executables
tests\run_all.ps1 reviews every example and test model
tests\smoke_*.py, summarize_report.py quick loader/output/listing checks
examples\ GWV examples (unchanged)
test_models\ generated NWT, DISU, defect and transient models
test_output\ sample reports
16. References
- Reilly, T.E., and Harbaugh, A.W., 2004, Guidelines for evaluating ground-water flow models: U.S. Geological Survey Scientific Investigations Report 2004-5038, 30 p.
- Franke, O.L., Reilly, T.E., and Bennett, G.D., 1987, Definition of boundary and initial conditions in the analysis of saturated ground-water flow systems: USGS TWRI 3-B5.
- Reilly, T.E., 2001, System and boundary conceptualization in ground-water flow simulation: USGS TWRI 3-B8.
- Hill, M.C., 1998, Methods and guidelines for effective model calibration: USGS WRIR 98-4005.
- Konikow, L.F., 2011, The secret to successful solute-transport modeling: Groundwater, v. 49, no. 2, p. 144–159.
- The wider literature behind these checks: Groundwater_Model_Review_Literature.html.
- Herrera, R., flopy fork with MODFLOW-USG Transport support: github.com/roh-sgm/flopy.
- Peaceman, D.W., 1978, Interpretation of well-block pressures in numerical reservoir simulation: SPE Journal, v. 18, no. 3, p. 183–194 (effective well-block radius 0.208 Δx).