MFD vs D-Infinity: Choosing a Dispersive Flow Router
Once you accept that water on a hillslope does not always run to a single neighbour, the question becomes how to spread it, and the two standard answers behave very differently. This guide compares multiple flow direction routing against Tarboton’s D-Infinity for the task of distributing flow across divergent terrain, as a decision reference within the Multiple Flow Direction Methods topic, part of the broader Flow Routing Algorithms & Stream Network Extraction coverage on this site.
Both routers exist to fix the same defect in single-direction D8: real flow diverges on convex slopes and D8 forces it into one of eight discrete directions, producing parallel-line artifacts. MFD and D-Infinity disperse flow instead, but MFD spreads it to every downslope neighbour while D-Infinity confines it to at most two. That difference in receiver count is the crux of the decision.
How Each Router Partitions Flow
Multiple flow direction, in the Freeman and Quinn formulations, sends flow from a cell to all of its downslope neighbours, dividing it in proportion to the slope toward each one raised to a partition exponent p. With a typical exponent around 1.1, gentle slopes disperse flow broadly and steep slopes concentrate it, but a cell can feed as many as eight receivers at once. Raising p sharpens the partition toward the steepest neighbour; in the limit of a very large exponent MFD collapses back toward D8.
D-Infinity, from Tarboton, takes a different geometric route. It models the eight neighbours as eight triangular facets around the cell, finds the single facet of steepest descent, and represents flow as a continuous angle across that facet. That angle almost always falls between two cardinal or diagonal directions, so the flow is split between exactly those two neighbours by angular proximity. When the angle aligns with a grid direction, a single neighbour receives everything. The receiver count is therefore capped at two, and there is no free exponent to tune.
The practical consequence is that MFD produces the smoothest, most diffuse accumulation fields, while D-Infinity keeps flow more coherent and is far less prone to smearing a channel across a whole hillslope.
Side-by-Side Comparison
| Attribute | MFD (Freeman / Quinn) | D-Infinity (Tarboton) |
|---|---|---|
| Receivers per cell | Up to 8 downslope neighbours | At most 2 adjacent neighbours |
| Partition rule | Slope^p across all downslope cells | Angular split across steepest facet |
| Free parameter | Exponent p (typically ~1.1) | None |
| Dispersion behaviour | Maximal, can over-disperse | Constrained, geometrically bounded |
| TWI / wetness suitability | Excellent for diffuse fields | Good, less over-spreading |
| Channel realism | Weak: smears channels | Strong: keeps convergent flow coherent |
| Hillslope realism | Strong on divergent slopes | Strong, slightly tighter |
| Library availability | richdem (Freeman, Quinn, Holmgren) | richdem and whitebox (DInf) |
| Determinism | Deterministic, exponent-dependent | Deterministic, no exponent |
The single row that most often decides a project is channel realism. Because MFD keeps spreading flow even where the terrain has clearly converged into a valley, it tends to broaden channels and blur the drainage network. D-Infinity’s two-receiver cap lets convergent flow re-concentrate, so it represents both the diffuse hillslope and the coherent channel in one pass, which is why it is the common default when a single router must serve the whole landscape.
Behaviour on Divergent vs Convergent Terrain
The two routers agree closely on planar slopes and diverge, literally, on curved ones. On a convex nose where flow fans outward, MFD’s spreading is physically appropriate and D-Infinity’s two-receiver split still captures the fan adequately. On a concave hollow where flow converges, MFD keeps leaking a fraction of flow to lateral neighbours that the terrain says should not receive it, so the modeled channel stays artificially wide. D-Infinity re-concentrates flow there because the steepest facet swings to point down-valley.
This is the same convergence-versus-dispersion tension that motivates the move away from single-direction routing in the first place. The contrast between a strictly single-receiver method and a dispersive one is developed for steep terrain in comparing D8 vs D-Infinity for steep terrain hydrology, and the broader mechanics of continuous-angle routing are covered in the D-Infinity routing patterns topic.
There is also a stability difference worth weighing. Because MFD leaks a fraction of flow to nearly every downslope neighbour, small elevation errors and residual roughness in the DEM get smeared across many cells, which damps noise but can wash out narrow flow paths. D-Infinity, routing along a single steepest facet, is more sensitive to that same roughness near the two-neighbour switching angle, where a tiny elevation change can flip the split between adjacent directions. Neither behaviour is strictly better: MFD trades sharpness for robustness, and D-Infinity trades a little robustness for a crisper channel. In both cases the fix is the same upstream conditioning, thorough depression filling and flat resolution, rather than a change of router.
Library Support and Performance
Availability sometimes settles the choice before hydrology does. RichDEM implements the full MFD family, exposing Freeman, Quinn, and Holmgren partition schemes as well as D-Infinity through a single FlowProportions call, which makes it straightforward to swap methods without leaving Python. WhiteboxTools also provides D-Infinity flow accumulation and a distinct MFD implementation, and its command-driven interface integrates cleanly into batch pipelines. Because the two libraries differ in their exponent conventions and edge handling, a result is only reproducible when the library, version, method name, and any exponent are recorded together with the conditioned DEM.
On performance, MFD is the more expensive router: partitioning flow across up to eight receivers per cell means more arithmetic and a wider accumulation traversal than D-Infinity’s two-way split. On large regional grids that gap is measurable, and it reinforces the practical pattern of reserving MFD for the specific index products that need its dispersion while using D-Infinity for general-purpose network extraction where the extra spreading buys nothing.
Computing Flow Proportions in Python
RichDEM exposes both families through FlowProportions, which returns, for every cell, the fraction of flow sent to each of its eight neighbours. Inspecting that proportion grid directly, rather than only the downstream accumulation, is the clearest way to see how widely each method disperses. The function below computes proportions for a chosen method and logs the average number of receivers per cell, which is the number that most concisely separates MFD from D-Infinity.
import logging
import numpy as np
import richdem as rd
logger = logging.getLogger(__name__)
def summarize_flow_dispersion(dem_path: str, method: str) -> float:
"""Compute flow proportions with a dispersive router and report mean receivers.
method is one of 'Freeman', 'Quinn' (MFD variants) or 'Dinf' (D-Infinity).
Returns the mean number of downslope receivers per non-outlet cell, which is
near 2 for D-Infinity and higher for MFD on divergent terrain.
"""
dem = rd.LoadGDAL(dem_path)
rd.FillDepressions(dem, in_place=True) # dispersive routers still need a hydro-conditioned DEM
logger.info("Loaded and filled DEM %s (shape=%s) for method=%s",
dem_path, dem.shape, method)
# FlowProportions returns an array with a channel per neighbour direction
props = rd.FlowProportions(dem, method=method)
prop_arr = np.asarray(props)
# The first band is a sentinel/flag; direction bands follow. Count positive
# partitions per cell to measure how many neighbours actually receive flow.
direction_bands = prop_arr[..., 1:]
receivers = np.sum(direction_bands > 0, axis=-1)
routed = receivers[receivers > 0] # exclude outlets / no-flow cells
mean_receivers = float(np.mean(routed)) if routed.size else 0.0
logger.info("method=%s | mean receivers per routed cell = %.2f | "
"max receivers = %d", method, mean_receivers, int(receivers.max()))
if method.lower().startswith("dinf") and mean_receivers > 2.05:
logger.warning("D-Infinity should cap at 2 receivers; check the DEM conditioning.")
return mean_receivers
if __name__ == "__main__":
logging.basicConfig(level=logging.INFO, format="%(levelname)s %(message)s")
for m in ("Dinf", "Quinn", "Freeman"):
summarize_flow_dispersion("conditioned_dem.tif", method=m)
Running this across the three methods on the same DEM makes the dispersion difference measurable: the D-Infinity pass reports a mean receiver count near two, while the Quinn and Freeman passes report higher averages that climb with terrain divergence. Note that every dispersive router still requires a depression-filled DEM, the same conditioning that precedes any flow method, and that removing flat-area artifacts beforehand keeps the proportions clean, as covered in removing flat-area artifacts from flow direction grids.
Decision Guidance
Choose MFD when:
- The deliverable is a diffuse field: a topographic wetness index, a soil-moisture proxy, or an upslope contributing-area surface where broad, smooth dispersion is the goal.
- Hillslope processes dominate and you want flow to fan realistically across convex terrain without being pinned to two directions.
- You are willing to record and defend a partition exponent, and you value the ability to tune dispersion from broad toward concentrated by raising
p. - Channel definition is not the primary output, so smearing across valleys is an acceptable cost of smoother hillslope fields.
Choose D-Infinity when:
- A single router must represent both hillslope and channel, because its two-receiver cap disperses on slopes yet re-concentrates in valleys.
- You want a parameter-free, geometrically bounded method with no exponent to justify or calibrate.
- The output feeds a drainage network or accumulation-threshold extraction where over-dispersion would blur channels.
- Balanced realism across the whole landscape matters more than maximizing hillslope spreading.
In practice many workflows use D-Infinity as the general-purpose dispersive router and reach for MFD specifically when computing wetness or soil-moisture indices that benefit from its wider spreading. Both are deterministic, so either choice is reproducible provided you record the method and, for MFD, the exponent alongside the conditioned DEM.
Frequently Asked Questions
What is the core difference between MFD and D-Infinity routing?
MFD partitions each cell’s flow across every downslope neighbour in proportion to slope raised to an exponent, so a cell can have up to eight receivers. D-Infinity assigns flow to the single steepest downslope triangular facet and splits it between at most two neighbours by angular proximity. MFD disperses more widely; D-Infinity constrains dispersion to two directions.
Which router is better for a topographic wetness index?
MFD is generally preferred for the topographic wetness index and diffuse soil-moisture fields because its wide dispersion produces smooth, physically plausible upslope contributing areas across hillslopes. D-Infinity also works and is less prone to over-dispersion, but MFD’s spreading better matches the diffuse subsurface flow the index is meant to represent.
Are MFD and D-Infinity deterministic?
Both are fully deterministic: given the same conditioned DEM and parameters, they return identical flow-proportion grids every run, unlike the stochastic Rho8 method. D-Infinity has no free exponent, while MFD’s result depends on the chosen partition exponent, so reproducibility requires recording that exponent alongside the DEM.
Related Topics
- Multiple Flow Direction Methods — parent topic on dispersive routing families, partition exponents, and their hydrologic rationale
- D-Infinity Routing Patterns — the mechanics of Tarboton’s continuous-angle method and how its two-receiver split behaves across terrain
- Comparing D8 vs D-Infinity for Steep Terrain Hydrology — the single-receiver versus dispersive contrast on steep slopes
- Removing Flat-Area Artifacts from Flow Direction Grids — conditioning that keeps dispersive flow proportions clean
- Flow Routing Algorithms & Stream Network Extraction — the overview placing single-direction and dispersive routers in one framework