Streams and the water mover#

A stream network (SFR) routes the water it receives from reach to reach and exchanges water with the aquifer through its bed. The water mover (MVR) hands the outflow of one package to another: a drain to a reach, a reach to a lake, a lake to a reach. Both need MODFLOW 6. The keys of a network are in [flow.sinks_sources.sfr].

Notation of this page

Symbol

Meaning

Unit

Set by

\(z_\mathrm{top}\)

model top, the land surface

m

data.dem

\(z^\mathrm{rtp}_j\)

top of the bed of reach \(j\)

m

derived, inside its cell

\(K_b, b_s\)

conductivity and thickness of a streambed

m/s, m

streambed_k, streambed_thickness

\(n_M\)

Manning roughness of a reach

s/m^(1/3)

manning

\(S_\mathrm{min}\)

floor of the gradient of a reach

min_slope

\(\beta_\mathrm{inc}\)

depth a bed is cut below the ground of its cell

m

bed_incision

What a reach is#

An SFR network is a set of reaches. Each reach \(j\) has a length \(L_j\), a width \(w_j\), a gradient \(S_j\), a bed top \(z^{\mathrm{rtp}}_j\), a bed thickness \(b_s\), a bed conductivity \(K_b\) and a Manning roughness \(n_M\). It exchanges water with the aquifer cell under it, and passes its flow to the reach below.

The reaches are the cells that the generated stream network crosses, cut by the mesh, or the rows of an explicit table of reaches. An observed network never becomes a reach. With rectify_on_mesh, the cells of the generated network are the seeds of a single-flow-direction channel re-derived on the descent \(D\) (Routing on the mesh: the descent D): from every seed, the receivers of \(D\) are followed one cell at a time until the trace reaches a lake, a fixed-head cell or a channel cell already traced. The result is one cell wide, continuous on \(D\), follows the thalweg of \(D\), and ends at a real sink. Short parallel stubs beside a longer channel are demoted to hillslope drainage. Each cell keeps the width, the stream order and the bed properties of the seed whose trace reached it. The gradient is \(S_j = \max(S_j^{\mathrm{delineated}}, S_\mathrm{min})\).

In the code: rectify_reach_graph.

The bed#

The beds of a network are placed by one solve, in two passes. The cell is the hard constraint and the downhill order the soft one. Each reach has a box from its own cell:

(47)#\[z^{\mathrm{bot}}_j + b_s + 0.1\ \mathrm{m} \;\leq\; z^{\mathrm{rtp}}_j \;\leq\; z^{\mathrm{top}}_j - \beta_\mathrm{inc},\]

where \(z^{\mathrm{top}}_j\) and \(z^{\mathrm{bot}}_j\) are the top and the bottom of the reach cell, and \(\beta_\mathrm{inc}\) is zero when the incision is not set. A bed never sits above the ground of its own cell. When the incision is set, the bed may also not sink more than max_bed_sag below the upper bound. An empty box stops the build and names the reach. Inside the boxes the bed descends downstream by at least \(S_\mathrm{min}\) times the mean length of two neighboring reaches. Where a traced channel climbs and the box and the order cannot both hold, the box wins and the build logs the worst step, so a defect of the trace cannot drag a bed far below the ground of its cell.

In the code: solve_reach_bed_profile.

Flow and exchange#

The flow balance of a reach, the exchange through the streambed and the stage from Manning’s equation for a rectangular section are the MODFLOW 6 SFR package [Langevin et al., 2017] (chapter 7; input guide: SFR). HydroModPy fills it as follows.

  • The exchange goes through the streambed with a conductance of \(K_b / b_s\) times the wetted area of the bed, built from streambed_k and streambed_thickness. The stage uses manning and the gradient floored by min_slope.

  • With connected_to_aquifer off, the network is pure routing and has no exchange with the aquifer.

  • The inflow of the headwater reaches is split by drainage area. The catchment runoff of the period (Rain and evaporation: the forcing) is distributed over all the reaches by length. Rain and evaporation are rates, the same on every reach, applied by MODFLOW 6 to the reach area.

  • A cell that hosts a connected reach loses its drain row: its baseflow goes into the stream through the bed, not out of the model through a drain. The drain rows of the cells around stay, and route_drainage sends their outflow to the stream (below).

The numerical choice#

MODFLOW 6 can skip the extra Picard iterations of SFR when the reaches are numbered from upstream to downstream. HydroModPy numbers them that way and sets the maximum to 1, except when route_drainage is on. The mover then feeds the reaches, and that exchange belongs to the nonlinear coupling, not to the routing order: one pass per outer iteration would let the inflow creep while the head has settled.

In the code: build_sfr_package_args.

The water mover#

The MVR package takes water from a provider, a feature of one package, and gives it to a receiver, a feature of another, by a rule (FACTOR, UPTO, EXCESS or THRESHOLD) [Morway et al., 2021]; input guide: MVR. HydroModPy writes records for three connections, and writes MVR last, after every package it names.

Provider

Receiver

Rule

Set by

a drain cell of the basin

the first reach or lake met on \(D\)

FACTOR, value 1

route_drainage

a terminal reach

a lake

the rule of the network

outflow_to_lake

a lake outlet

another lake, a reach, or the reach at the foot of the dam

the rule of the outlet

flow.sinks_sources.lakes.<name>.outlets.mover.mvrtype

A graph of boxes. A drain cell of the basin sends its water by FACTOR 1 to the first reach or lake met on D; the network routes it to a terminal reach, which sends it to a lake; a lake outlet sends water to a dam-foot reach or another lake.

Fig. 59 The three connections of the mover. The orange arrows are MVR records, with their rule and the key that sets them. The dashed arrow is the routing of SFR itself.#

Routing the hillslope drainage#

With route_drainage, every drain cell in the basin of \(D\) hands its whole outflow to the water body it would physically reach. The walk starts at the drain cell and follows the receivers of \(D\), the version that stops on a fixed-head cell. It ends at the first connected reach cell or lake cell. A cell whose chain leaves the model first keeps a plain drain, and so does a cell outside the basin.

The basin is the set of cells whose chain passes through the catchment outlet. The outlet follows the rule of the stream criterion: the most drained cell near the outlet the catchment was closed on, else inside the catchment polygon, else the largest basin of the domain. A synthetic domain, such as the box of a validation case, has no catchment polygon and no outlet. Its basin is the largest basin of the domain, which closes no catchment, and the budget of its run holds the domain row only.

On a quad mesh \(D\) steps along diagonals, and a chain can cross a reach between two cells that only touch at a corner. When both cells beside a diagonal step are reach cells, the walk ends on the lower of the two.

The provider of a record is the position of the drain in the list of its period. The drain must therefore be static, with a single period of data: a series of conductances would renumber the providers and send the water to the wrong place, and the build refuses it. The budget stores the part the mover took as its own record, drain_to_mover.

In the code: build_drainage_mover_records.

Assumptions#

  • A reach is one cell wide, has one downstream reach (or the declared bifurcation), and has a rectangular section.

  • The bed of a reach and its cell are one: the reach exchanges with the cell under it.

  • Water routed by the mover reaches its receiver in the same period.

Limits#

  • SFR and MVR need MODFLOW 6. The check stops a file that lists "sfr" and names another solver.

  • One SFR network per model. A second one stops the build.

  • A bed near the water table toggles. MODFLOW 6 switches a reach between connected and disconnected at \(z^{\mathrm{rtp}}_j - b_s\). A bed placed near the depth the water table reaches in a season can change state at every outer iteration and stall the solve. The box of (47) keeps every bed inside its cell for this reason.

  • No overland flow beyond SFR and the mover. The runoff reaches the streams as a forcing, not through the ground.

Parameters of this page#

# enabled = falseEnable DEM-based river-network extraction from flow accumulation during geographic preprocessing.
Path
geographic.river_network.enabled
More

Written whenever the table writes another key, so the table never switches the step by itself.

Accepted
true | false
[flow.sinks_sources.sfr.<name>]
# streambed_k = 1e-06Streambed hydraulic conductivity rhk [L/T]. >= 0 calibrable · log
Path
flow.sinks_sources.sfr.<name>.streambed_k
More

0 = no reach-aquifer leakage (pure routing).

Accepted
number
Valid range
>= 0 (refused outside)
Unit
m/s
Calibration
yes, search space log, sampling log_uniform, bounds belong to the site: write them in calibration.parameters.<name>.bounds
# streambed_thickness = "1 m"Streambed thickness rbth [L] (> 0). m
Path
flow.sinks_sources.sfr.<name>.streambed_thickness
Accepted
number or "<n> m" (a bare number is read in the canonical unit)
Unit
m
# manning = 0.035Manning roughness coefficient n [T/L^(1/3)] (> 0). > 0 calibrable
Path
flow.sinks_sources.sfr.<name>.manning
More

Default 0.035.

Accepted
number
Valid range
> 0 (refused outside)
Unit
s/m^(1/3)
Calibration
yes, search space identity, sampling uniform, bounds belong to the site: write them in calibration.parameters.<name>.bounds
# min_slope = 0.0001Smallest slope a reach bed may take, in metres of drop per metre (floor of rgrd). - > 0
Path
flow.sinks_sources.sfr.<name>.min_slope
More

It also sets the drop the bed profile solve keeps between neighbouring reaches.

Accepted
number
Valid range
> 0 (refused outside)
Unit
-
# bed_incision = ‹number or "<n> m"›Depth [L] of the streambed top rtp below the top of the reach's OWN aquifer cell. m
Path
flow.sinks_sources.sfr.<name>.bed_incision
More

A bed never sits above the ground of its own cell, whether this is set or not. None (default) only lifts the lower bound: the bed may then sink to the cell bottom instead of stopping at max_bed_sag. When set, each reach is solved inside [cell_top - bed_incision - max_bed_sag, cell_top - bed_incision], monotone downstream, and the build refuses when that band is empty. rtp is delineated on the model top, so this anchors a bed that a coarse DEM cannot resolve; it is not a correction for the descent D, which never reaches the bed. Pick it against the water table, not against the channel: MODFLOW 6 switches a reach between connected and disconnected at rtp minus streambed_thickness (gwf-sfr.f90:3973-3985), so a bed sitting near the seasonal water-table depth toggles at every outer iteration.

Accepted
number or "<n> m" (a bare number is read in the canonical unit)
Unit
m
# connected_to_aquifer = trueIf False every reach uses cellid 'none' (routing only, no streambed leakage).
Path
flow.sinks_sources.sfr.<name>.connected_to_aquifer
Accepted
true | false
# route_drainage = trueRoute the hillslope drainage (DRN) discharge into the stream network: every remaining DRN cell of the basin hands its outflow, through an MVR record (FACTOR 1.0), to the first reach or lake cell met on its descent D, a filled copy of the model top.
Path
flow.sinks_sources.sfr.<name>.route_drainage
More

A cell whose descent leaves the model first keeps a plain DRN. This is the surface re-infiltration / runon convergence of drained water towards the river; without it only the reach cells' streambed captures baseflow and the rest of the catchment discharge is lost (a few per cent of the water of a catchment). On by default; set False only to study the network alone.

Accepted
true | false
# outflow_to_lake = ‹integer›Number of the lake the last reach feeds through a mover (SFR -> LAK), counted from 1 in the order the lakes are declared. - >= 1
Path
flow.sinks_sources.sfr.<name>.outflow_to_lake
More

Unset, the network outflow leaves the model.

Accepted
integer
Valid range
>= 1 (refused outside)
Unit
-
# max_bed_sag = "5 m"Only read when bed_incision is set. m expert
Path
flow.sinks_sources.sfr.<name>.max_bed_sag
More

How far [L] below cell_top - bed_incision the monotone-downstream solve may sink a reach. It bounds the cumulative descent that a traced channel climbing over a rise forces on everything downstream of it. Widening it never refuses the build on its own: a reach that cannot hold the descent is warned about and pinned to the floor.

Accepted
number or "<n> m" (a bare number is read in the canonical unit)
Unit
m
# rectify_on_mesh = falseRe-derive the delineated reach cells as a clean single-flow-direction (SFD) channel on the DISV mesh. expert
Path
flow.sinks_sources.sfr.<name>.rectify_on_mesh
More

From every delineated cell the descent D, a filled copy of the model top, is traced one neighbour at a time until it reaches a lake, the outlet of D, or an already-traced cell. The union of those paths is the channel: one cell wide (a single downstream per cell, so no braiding), continuous on the descent graph (shared faces, or shared nodes on a quad mesh), following the thalweg of D (so the surface flow follows the reach), and always reaching a real sink (no inland dead-end that leaks its flow out). The streambed top is read on the model top, never on D. D is a copy and never returns to the solver.

Accepted
true | false
# mvrtype = "FACTOR"How much of the outlet flow the mover passes to the receiver, given value.
Path
flow.sinks_sources.lakes.<name>.outlets.mover.mvrtype
Values
  • "FACTOR" : Moves the share value (from 0 to 1) of the flow.
  • "UPTO" : Moves the flow, capped at value.
  • "EXCESS" : Moves only the part of the flow above value.
  • "THRESHOLD" : Moves value once the flow exceeds it, and nothing below it.
Accepted
"FACTOR" | "UPTO" | "EXCESS" | "THRESHOLD"

Lines generated from the models, as in the reference. Open one for its card.

Checked by#

The tests that import the code of this page. The box is generated: a new test appears here on the next build.

In the code#

What

Where

The network, the package, the mover records of a network

hydromodpy/solver/modflow6/builders/sfr.py

The bed

hydromodpy/solver/modflow6/builders/_sfr_bed.py

The channel on \(D\)

hydromodpy/solver/modflow6/builders/sfr_rectify.py

Hillslope drainage to the streams

hydromodpy/solver/modflow6/builders/_sfr_drainage.py

The mover records

hydromodpy/solver/modflow6/builders/mvr.py