Drains and evapotranspiration at the top of the model#

Two exits act at the top of the model. A drain discharges where the water table reaches the ground. The evapotranspiration package draws water where the water table is shallow. Recharge is not an exit, but it is written by the same step of the build and it decides what the drains carry, so it opens this page.

Notation of this page

Symbol

Meaning

Unit

Set by

\(h\)

hydraulic head, measured from a fixed datum

m

solved, not set

\(z_\mathrm{top}\)

model top, the land surface

m

data.dem

\(K\)

horizontal hydraulic conductivity, the same along \(x\) and \(y\)

m/s

flow.param.K.field.value

\(N\)

recharge rate, positive into the aquifer

m/s

flow.sinks_sources.recharge

\(n, m\)

cell indices; \(\mathcal{N}(n)\) is the set of cells that share a face with \(n\)

the grid, The mesh

\(a_n\)

plan area of cell \(n\)

m²

the grid

\(C_n\)

drain conductance of cell \(n\)

m²/s

flow.bc.<name>.value of drainage, or derived from \(K\)

\(C_\mathrm{min}\)

floor of every drain conductance

m²/s

solver.drain_conductance_floor_m2_s

\(b_d\)

thickness of the drain bed in the derived conductance

m

solver.drain_bed_thickness_m

\(\delta\)

depth of the sub-cell discharge band of a drain

m

solver.drain_band_depth_m

\(z^d_n\)

drain elevation of cell \(n\)

m

derived

\(E^\mathrm{et}_n\)

evapotranspiration rate the package may draw from the water table of cell \(n\)

m/s

flow.sinks_sources.etp, or the soil reservoir

\(z_\mathrm{et}\)

elevation where the evapotranspiration is at its full rate

m

derived

\(d_\mathrm{ext}\)

extinction depth of the evapotranspiration, below its surface

m

extinction_depth, evt_extinction_depth

\(o_\mathrm{et}\)

distance of the evapotranspiration surface below its reference

m

surface_offset

Recharge in#

MODFLOW 6 reads the recharge as one array per stress period (RCHA), put on the top layer or on the first active layer below it (RCHA input guide). HydroModPy adds one rule: the recharge is set to zero on lake cells. The lake already takes its own rain through LAK, and otherwise RCHA would move the recharge of a lake cell to the first active cell under the lake, so the rain would be counted twice.

The recharge comes from a series or a grid that the run loads, or from the daily soil reservoir of The daily soil reservoir. How it becomes one value per stress period, and how a negative recharge is split, is on Rain and evaporation: the forcing.

In the code: mask_recharge_on_lake_cells.

Evapotranspiration out#

Both MODFLOW solvers use the same linear law [Harbaugh, 2005, Langevin et al., 2017]: the package draws water at the full rate \(E^\mathrm{et}_n\) when the head is at or above the surface \(z_\mathrm{et}\), and at a rate that falls linearly to zero at the depth \(d_\mathrm{ext}\) below it (input guides: EVTA, EVT). HydroModPy chooses the rate, the surface and the depth from three sources.

Source

Rate \(E^\mathrm{et}_n\)

Surface \(z_\mathrm{et}\)

Depth \(d_\mathrm{ext}\)

MODFLOW 6, deficit of a negative recharge

the deficit \(N^-_k\)

\(z_{\mathrm{top},n}\)

evt_extinction_depth

MODFLOW 6, the ETP the soil reservoir left unmet

that residual ETP

\(z^d_n - o_\mathrm{et}\)

extinction_depth

MODFLOW-NWT, the loaded ETP and the deficit

the ETP as loaded, plus the deficit

\(z_{\mathrm{top},n} - o_\mathrm{et}\)

extinction_depth

\(z^d_n\) is the drain elevation of the cell (below): the top, or the top lowered by half the band, and the top when the run has no drain. The surface of the soil residual sits there because the soil has already taken the ETP it could, and what is left may only draw from water that would otherwise reach the drain. The card of surface_offset says which value applies to which solver.

The offset \(o_\mathrm{et}\) has one rule. A value written in the file wins. With the key unset, \(o_\mathrm{et}\) is 0 m in soil mode, where the reference is the drain elevation, and 2 m in every other case, where the reference is the topographic surface. So 2 m applies as soon as a run reads an ETP from [data.etp], whether or not the file holds a [flow.sinks_sources.etp] table, and it comes from no source: it reproduces the first versions of HydroModPy. A run writes the value it used in config.resolved.toml, under resolved_at_build.

The sea cells, the river cells and the lake cells carry no aquifer evapotranspiration: a lake evaporates through LAK. The deficit of a negative recharge is also kept off the cells that have no active layer.

A [flow.sinks_sources.etp] table acts differently by solver. Under MODFLOW-NWT the loaded ETP drives the package. Under MODFLOW 6 it acts in soil mode only, where it sends the residual ETP of the reservoir to EVTA; outside soil mode MODFLOW 6 ignores it and logs a warning. The Boussinesq solver refuses it.

In the code: build_evt_array_stress_period_data.

The drain law#

The drain is the one-sided law of the DRN package of both MODFLOW solvers [Harbaugh, 2005, Langevin et al., 2017]: it removes water in proportion to the head above the drain elevation \(z^d_n\) and never feeds the aquifer (input guide: DRN). In HydroModPy the drain stands for seepage at the ground surface. There is one row per cell, in the top layer, at the elevation of the top. The cells outside the model domain, the sea cells and the river cells carry no row. The rows are dropped later in the cells that host a connected reach (Streams and the water mover) and in the cells of a lake bed that stays active (Lakes and reservoirs). A drain does not read \(D\): its elevation is \(z_{\mathrm{top},n}\), never the filled \(\tilde z_n\).

The conductance#

When the file declares a conductance, every cell takes it as a conductance per cell, with the floor: \(C_n = \max(C^\mathrm{decl}, C_\mathrm{min})\). When it declares none, which is the case of example 04, each drain derives its conductance from the conductivity of its cell:

(44)#\[C_n = \max\!\left(\frac{K_n\,a_n}{b_d},\ C_\mathrm{min}\right).\]

The thickness \(b_d\) is that of the clogging layer at the bottom of a watercourse, decimeters to a meter. It is not the thickness of an aquifer layer. A cell passes its own recharge when the head stands above the drain elevation by

(45)#\[h_n - z^d_n = \frac{N_n\, a_n}{C_n} = \frac{N_n\, b_d}{K_n} .\]

The excess does not depend on the size of the cell. It depends on \(K/N\), the ratio a network calibration searches (Downslope distance between two networks), and on \(b_d\). The drain is meant to be a seepage face: \(K\) and the recharge decide where the water surfaces, and the drain must not limit it. The floor \(C_\mathrm{min}\) exists only for a degenerate cell, a zero conductivity for instance, whose formula would give a conductance MODFLOW reads as no drain at all.

A zero or a negative declared value selects the derivation; it does not close the boundary. The conductance is static unless the value is a series. A period is written only when the declared value changes, and MODFLOW 6 reuses the last data for the periods left out.

The bed thickness \(b_d\) is solver.drain_bed_thickness_m. The Boussinesq solver derives its drain conductance with the same \(b_d\), without the floor (Boussinesq theory).

In the code: hk_fallback_drain_conductance.

The discharge band#

A single drain elevation says that the land inside a cell is flat. The USGS remedy is a sub-cell discharge band, not an edit of the elevation [Langevin et al., 2017], with a depth that can come from the standard deviation of the fine land surface elevations inside the cell [Feinstein et al., 2020]. With a band of depth \(\delta\) (solver.drain_band_depth_m), the drain sits lower and its conductance grows:

(46)#\[z^d_n = z_{\mathrm{top},n} - \frac{\delta}{2}, \qquad C^{\delta}_n = C_n\,\frac{b_d}{\delta}.\]

The factor is the bed thickness and not the cell area: the conductance it scales is already \(K_n a_n / b_d\), so the product is \(K_n a_n / \delta\), the conductance of a band of depth \(\delta\). With the derived conductance, \(b_d\) drops out. The cell begins to discharge before the head reaches its mean elevation, and discharges harder as the head climbs into the band. No elevation is raised and no DEM is rewritten. MODFLOW 6 solves its own band with a smooth curve; this rule is the piecewise equivalent, applied alike by both MODFLOW solvers.

The seepage mask of Where the water table reaches the surface reads the band: a banded cell discharges at \(z_{\mathrm{top},n} - \delta/2\) and never climbs back to its top, so the run keeps \(\delta\) in its store for every reader.

In the code: drain_discharge_band.

The other answer: no drain in the pits#

solver.sink_fill sets the conductance to zero in every cell that sits in a closed depression of the top. The depressions are found on the solver mesh by a priority flood seeded on every cell water can leave the domain through, counted on the shared faces that MODFLOW connects. Both MODFLOW solvers read the same mask. No manual or USGS document removes a discharge boundary where a pit is found, and the card of the key says so. The band and this key answer the same question in opposite directions, and a file that sets both is refused.

One cell, by hand#

A cell of 25 m by 25 m (\(a_n = 625\) m²), \(K = 10^{-7}\) m/s, and a recharge of 439 mm per year, \(1.39 \times 10^{-8}\) m/s. The conductance and the head the drain needs to pass the recharge, from (44), (45) and (46):

Drain bed \(b_d\)

Band \(\delta\)

\(C_n\) (m²/s)

Drain elevation

Head above it

30 m

none

\(2.08 \times 10^{-6}\)

\(z_\mathrm{top}\)

4.17 m

1 m

none

\(6.25 \times 10^{-5}\)

\(z_\mathrm{top}\)

13.9 cm

0.1 m

none

\(6.25 \times 10^{-4}\)

\(z_\mathrm{top}\)

1.4 cm

1 m

0.5 m

\(1.25 \times 10^{-4}\)

\(z_\mathrm{top} - 0.25\) m

7.0 cm

The first row takes a layer thickness as the bed. The drain, not the aquifer, then limits the discharge. In the last row the head stands 7.0 cm above a drain 25 cm under the top: the cell passes its recharge 18 cm under the ground.

Drain discharge divided by the recharge of the cell, against the head minus the model top, for the four rows of the table. The 30 m bed stays near zero, the 0.1 m bed rises steeply at the top, the banded drain starts 25 cm below the top.

Fig. 57 The four rows of the table as curves, from hk_fallback_drain_conductance and drain_discharge_band. The dashed line is the discharge that passes the recharge of the cell. The 30 m bed reaches it 4.17 m above the top, off the figure.#

Assumptions#

  • A drain is a seepage face: the head the drain itself needs to pass the recharge is small beside the thickness of the aquifer.

  • The land inside a cell is flat, unless a band is declared.

  • Recharge is a flux set from outside. It does not read the water table.

Limits#

  • A drain cell has one elevation. The band is the one remedy. It applies to every drain cell alike and classifies nothing.

  • A declared conductance has a floor under MODFLOW 6 only. MODFLOW-NWT takes it as it is.

  • The ETP is not read under MODFLOW 6 outside soil mode. A loaded ETP is ignored, with a warning.

Parameters of this page#

# value = ‹number or list of number›Boundary-condition value, scalar or one value per stress period.
Path
flow.bc.<name>.value
More

On a head boundary it is the head in metres; left out with no forcing, the boundary is kept and no constant head is built. On a drainage boundary it is a conductance in m2/s, and it may be left out: the run then derives it from the conductivity, C = K * cell_area / solver.drain_bed_thickness_m, which keeps the drain proportional to K and makes K/R the quantity a network calibration searches. A zero or negative number selects that same derivation, so it does NOT mean a closed boundary; write a positive conductance to impose one.

Accepted
number or list of number
[solver]
# drain_band_depth_m = 0.0Metres. m
Path
solver.drain_band_depth_m
More

Depth D of the sub-cell discharge band every drain cell gets instead of a single elevation: the drain sits at top - D/2 and its conductance is multiplied by top_layer_thickness / D. The multiplier is the thickness and not the cell area because the conductance it scales is already Kv*A/b, so scaling by b/D gives Kv*A/D, which is CDRN exactly; scaling by A/D would give an m3/s where a conductance is m2/s, too high by A/b. The cell therefore starts discharging before the head reaches its mean elevation, and discharges harder the higher the head climbs into the band. This answers the one question the USGS documents about a model top, that the land inside a cell is not flat: UZF1 exposes the same depth as SURFDEP, 'the average undulation depth within a finite-difference cell', and MODFLOW 6 carries it into DRN as DDRN, with HDRN = land surface - DDRN/2 and CDRN = Kv*A/DDRN. MODFLOW 6 solves its DDRN band with a smooth (linear then cubic) curve; the option here is the piecewise equivalent of the same idea, applied identically by both MODFLOW backends, so a later switch to the native smooth form is a documented refinement and not a surprise. It does NOT move the topography: no elevation is raised, no DEM is rewritten, and every other package sees the surface it would have seen. The seepage criterion is the one reader that cannot: a banded cell discharges at top - D/2 and never climbs back to top, so the mask follows the band and the run persists D in its store for every figure drawn afterwards. It classifies no cell: every drain cell gets the same band, so nothing has to be sorted into artefact and real. Pick D the way Feinstein et al. 2020 (Groundwater 58:524-534, doi:10.1111/gwat.12931) do, from the standard deviation of the fine land-surface elevations inside a cell; they obtain 0.61 m. Mutually exclusive with solver.sink_fill, which answers the same question by removing drains instead. Default 0.0: one elevation per drain, unchanged from every earlier run.

Accepted
number
Unit
m
Example
0.0, 0.5
# sink_fill = falseDimensionless.
Path
solver.sink_fill
More

Remove the drain from every cell sitting in a closed depression of the model top, by setting its DRN conductance to zero. A closed depression has no outlet, so water reaching it ponds instead of seeping into a stream, and a drain there invents a discharge point. The depressions are measured on the solver mesh, by a priority flood seeded on every cell water can leave the domain through; both MODFLOW backends read the same mask. This does NOT move the topography: no elevation is raised, no DEM is rewritten, and every other package sees the surface it would have seen. Refused when the mask cannot be built. The depressions are counted on the four shared faces MODFLOW connects, not on the eight neighbours a raster fill uses: the share of the mesh flagged is about twice as large on four faces as on eight neighbours, a factor that is the neighbourhood and nothing else. NOT SANCTIONED BY ANY SOURCE: no manual, no USGS document and no guideline removes a discharge boundary where a pit is detected, and measured here it degrades both scores. The remedy the USGS does document for the same question is solver.drain_band_depth_m, which gives every cell a discharge band instead of taking the drain away. Default false, which drains every cell as before.

Accepted
true | false
Example
false, true
# drain_bed_thickness_m = 1.0Metres. m > 0 expert
Path
solver.drain_bed_thickness_m
More

Thickness of the drain BED in the fallback conductance C = K * cell_area / bed_thickness, used when no drainage conductance is declared. A drain bed is the clogging layer at the bottom of a watercourse, decimetres to a metre; it is NOT the aquifer, and the layer thickness this used to borrow (tens of metres) has no physical relation to it. The value matters because it sets how much head the drain itself imposes to pass the recharge: dh = R * bed_thickness / K, independent of the cell size. For R = 439 mm/yr, 30 m gives 4.17 m of head at K = 1e-7 m/s and makes the drain the limiting resistance over two decades of a [1e-7, 1e-3] search; 1 m gives 13.9 cm and 0.1 m gives 1.4 cm. In this method the drain is a seepage face, so it must never limit: K and the recharge decide where water surfaces, not the boundary condition. Proportionality to K is preserved either way, so the K/R invariance the network criterion rests on is untouched. The value 1.0 is a convention with no measured source: no measurement and no document gives it, and it is kept as it is so that no earlier result moves. It stays in [solver], whatever the layer of the other drain keys. Write your own value when you have a measure.

Accepted
number
Valid range
> 0 (refused outside)
Unit
m
Example
1.0, 0.5, 0.1
# drain_conductance_floor_m2_s = 1e-12m2/s. s > 0 expert
Path
solver.drain_conductance_floor_m2_s
More

Floor applied to every DRN conductance, whether declared or derived from hk. It exists for degenerate cells only, a zero-thickness or zero-conductivity cell whose formula would divide by zero or emit a zero-conductance drain MODFLOW reads as absent. It is not a physical choice and moving it does not tune anything: a real conductance on a real cell is many orders of magnitude above it. Raise it only to make a degenerate mesh audible.

Accepted
number
Valid range
> 0 (refused outside)
Unit
s
[flow.sinks_sources.recharge]
# negative_to_evt = trueWhen true, negative recharge values are routed to the solver EVT package and RCH receives the non-negative clipped recharge. dev
Path
flow.sinks_sources.recharge.negative_to_evt
More

Boussinesq has no EVT and refuses a negative rate whatever this says.

Accepted
true | false
[flow.sinks_sources.etp]
# extinction_depth = 2.0Depth (m) below the EVT surface where the water table stops evaporating; the rate falls linearly between the surface and this depth. m > 0 calibrable
Path
flow.sinks_sources.etp.extinction_depth
More

2 m by default, a choice: this depth often reaches the deepest roots, and 150 mm of soil capacity means about 1 to 2 m of them. Read by MODFLOW-NWT, and by MODFLOW 6 in soil mode for the ETP the soil left unmet. Calibrate it with [calibration.parameters.extinction_depth]; the range belongs to the site, so a file has to state it.

Accepted
number or "<n> m" (a bare number is read in the canonical unit)
Valid range
> 0 (refused outside)
Unit
m
Calibration
yes, search space identity, sampling uniform, bounds belong to the site: write them in calibration.parameters.<name>.bounds
# surface_offset = 2.0Distance (m) the EVT surface sits below its reference. m >= 0 dev
Path
flow.sinks_sources.etp.surface_offset
More

The rule has two cases. In soil mode under MODFLOW 6 the reference is the drain elevation of the cell (the top, or the top minus half of solver.drain_band_depth_m), and with the key unset the distance is 0 m, since the soil reservoir has already taken the ETP it could. In every other case the reference is the topographic surface, as MODFLOW-NWT reads it, and with the key unset the distance is 2 m, also when this table is absent and the ETP comes from [data.etp] alone. A value written here wins in both cases. The run writes the value it used in config.resolved.toml, table resolved_at_build.

Accepted
number or "<n> m" (a bare number is read in the canonical unit)
Valid range
>= 0 (refused outside)
Unit
m
[solver.modflow6.process_specific]
# evt_extinction_depth = 1.0Meters; extinction depth for the EVT sink used when recharge negatives are routed to EVT. m > 0 expert
Path
solver.modflow6.process_specific.evt_extinction_depth
More

The routed deficit tapers linearly from the cell top to this depth and stops below it, so a sustained climatic deficit can saturate near this value.

Accepted
number
Valid range
> 0 (refused outside)
Unit
m

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

Recharge, EVTA, the lake mask

hydromodpy/solver/modflow6/builders/recharge.py

Drain rows

hydromodpy/solver/modflow6/builders/boundary_conditions.py

Derived conductance and band

hydromodpy/solver/base/drain_conductance.py

Drains and EVT under MODFLOW-NWT

hydromodpy/solver/modflow_nwt/nwt/payloads/