Routing II: the methods and their cost
Session 14 showed what a flood does on its way down a river: it travels as a wave, and it flattens. This session is about how models compute that. The names are many: kinematic wave, diffusive wave, local inertial, Muskingum, Muskingum–Cunge, unit hydrograph. All of them are shortcuts of one pair of equations. They differ in what they neglect, in what they need to be told about the river, and in what they cost to run. The cost has a simple origin: the time step is tied to the size of the grid.
You will be able to
- place any routing method on one map: what it keeps, what it neglects, what it needs and what it costs;
- explain, step by step, what EF5's kinematic-wave routing does in one grid cell;
- compute one step of the Muskingum method by hand, and say what \(K\) and \(X\) do;
- explain why the time step cannot be chosen freely, and state the two conditions that keep the Muskingum coefficients positive;
- count the cost of a routing run from the number of cells and steps, and read measured run times;
- name the routing method of the main flood-forecasting systems.
One physics, many shortcuts
Water in a river obeys two rules. The first is bookkeeping: water is conserved. If more flows into a stretch of river than flows out, the water in that stretch rises. The second is Newton's law for the moving water: what pushes it and what holds it back. Four things act:
- gravity pulls the water down the slope of the river bed;
- friction against the bed and the banks holds it back;
- the tilt of the water surface pushes as well: on the front of a flood wave the water is deeper upstream than downstream, and the extra depth presses forward;
- the water has inertia: it needs time and distance to change its speed.
Written for a river as a line, with one position \(x\) along the channel and time \(t\), these two rules are the Saint-Venant equations [1].
\(A\): cross-section of the flow (m²). \(Q = vA\): discharge (m³/s). \(v\): velocity. \(h\): depth. \(q\): inflow from the side per metre of channel. \(S_0\): slope of the bed. \(S_f\): friction slope, the slope that friction would balance at the present flow, from Manning's formula. \(g\): gravity. "Local" inertia is the change of speed in time at one place; "advective" inertia is the change of speed along the river.
You do not need to solve these. What matters is the list of four terms in the second equation: every routing method is defined by which of them it keeps [1], [2].
Start with everything and remove one term at a time:
- Dynamic wave. All four terms. It needs surveyed cross-sections and roughness along the river, it is expensive, and it needs care to stay numerically stable, so it is used where the dropped terms would matter: flat rivers and places where the water backs up [2]. HEC-RAS solves these equations [3].
- Local inertial. Drop the advective inertia only [4]. Backwater and flattening are kept, and the scheme is far cheaper to step than older diffusive codes: its stable time step shrinks in proportion to the cell size instead of its square [5]. This is the equation of CaMa-Flood since 2013 [6].
- Diffusive wave. Drop all inertia [2]. Gravity, friction and the surface tilt remain. The tilt term is what flattens a flood wave, and it lets a high water level downstream hold back the flow upstream (backwater). With a constant celerity and a constant diffusivity, this is the advection–diffusion equation behind the reach response of Session 14 [1].
- Kinematic wave. Drop the surface tilt too [2]. What is left is gravity = friction, \(S_0 = S_f\): the flow in a cross-section depends only on how much water is in it, for example \(Q = \alpha A^{\beta}\). Waves travel downstream only, at the celerity of Session 14 (5/3 of the water velocity in a wide channel [1]), and the equation itself does not flatten them; any flattening in a kinematic-wave model comes from its numerical scheme. Nothing downstream can influence the flow upstream.
The last shortcut is less drastic than it sounds. Lighthill and Whitham showed in 1955 that at the Froude numbers of flood waves the dynamic waves die out quickly and the main disturbance travels downstream as a kinematic wave [7]. How far one can go depends on the river: a mapping study of the Amazon basin found the kinematic wave adequate for 64.5% of the river reaches, the diffusive wave needed for 34.5%, and the full equations for 1% [8].
A second family never writes the momentum equation at all. It keeps the bookkeeping and replaces everything else by a rule for how much water a reach stores: the linear reservoir of Session 2, the gamma unit hydrograph of Session 8, the Muskingum method. The two families meet. Cunge showed in 1969 that the Muskingum method, with its two numbers computed from the width, slope and flow of the channel, behaves like the diffusive wave [9], [10].
| Method | Keeps | Flattens the wave | Backwater | Needs | Limit on the time step |
|---|---|---|---|---|---|
| Dynamic wave | all four terms | yes | yes | cross-sections, roughness | depends on the solver |
| Local inertial | all but advective inertia | yes | yes | cross-sections, roughness | step ∝ \(\Delta x\) [5] |
| Diffusive wave | gravity, friction, surface tilt | yes | yes, with a downstream boundary | celerity and diffusivity, or geometry and roughness | explicit schemes: step ∝ \(\Delta x^2\) [5] |
| Kinematic wave | gravity = friction | only numerically | no | roughness, slope, width (or \(\alpha\), \(\beta\)) | explicit schemes: \(c\,\Delta t/\Delta x \le 1\) [11] |
| Muskingum–Cunge | storage rule with physical \(K\), \(X\) | yes | no | width, slope, roughness | \(c\,\Delta t/\Delta x\) below 1, by sub-steps [12] |
| Muskingum | storage rule \(S = K[XI + (1-X)O]\) | yes, set by \(X\) | no | \(K\), \(X\) (fitted) | \(2KX \le \Delta t \le 2K(1-X)\) |
| Chain of reservoirs (gamma unit hydrograph) | storage rule \(S = kQ\) | yes | no | \(k\) and \(n\) | none: one convolution |
| Unit hydrograph from the diffusive wave | diffusive wave with constant coefficients, solved once | yes | no | celerity, diffusivity per reach | none: one convolution [1] |
The kinematic wave, as EF5 does it
EF5, the Ensemble Framework For Flash Flood Forecasting, is the model behind FLASH, which runs across the conterminous United States at 1 km resolution and is updated every 10 minutes [13]. Its water balance can be CREST, the model that dCREST implements for one catchment at a time; in EF5 it runs in every grid cell. Its main routing option is a kinematic wave. The description here follows the EF5 source code, read line by line at one fixed commit, and the paper that describes it [13].
- A grid of cells that forms a tree. In the FLASH configuration the cells are 0.01° wide, about 1.1 km. Each cell drains to exactly one of its eight neighbours, so the cells form a tree that ends at an outlet.
- Runoff in every cell. At every time step, 5 minutes in the FLASH configuration, the water balance decides for each cell how much water becomes fast surface water and how much becomes slow water below the surface.
- Two kinds of cell. A cell with more than a set number of cells upstream (10 in the FLASH configuration) is a channel cell. All others are hillslope cells.
- One question per hillslope cell. Given the water arriving from the cells uphill, the water already here, and the new surface water, how much flows out? The answer is the solution of one equation with one unknown. The equation says: water in, minus water out, equals the change in stored water. The stored depth is tied to the outflow by a power law, \(h = \alpha_0\, q^{0.6}\), where \(q\) is the flow per metre of width.
- Two questions per channel cell. The same equation is solved for the water running over the cell's own land surface, and then once more for the river itself, with the first result entering the river from the side.
- A leaky bucket for the slow water. In each hillslope cell the slow water sits in a linear reservoir like that of Session 2. At each step a fixed fraction leaks out and is passed a short way downhill. When it reaches a channel cell it joins the surface water.
- Headwaters first. The cells are solved one after another from the headwaters to the outlet, so every cell already knows what its uphill neighbours send it in the same time step.
For the river in a channel cell, the equation of step 5 is:
\(Q\): the unknown, the flow leaving the cell at the end of the step (m³/s). \(Q_{\text{in}}\): the sum of the new flows of the channel cells directly upstream, already solved in this step. \(A_{\text{prev}} = \alpha\,Q_{\text{prev}}^{\beta}\): the cross-section at the end of the previous step. \(q_{\text{lat}}\): inflow from the cell's own land surface (m² /s). \(\Delta x\): length of the cell along the flow.
This is the first Saint-Venant equation, written for one cell and one step. The second equation has shrunk to the power law: the code writes the cross-section as a power of the flow, \(A = \alpha Q^{\beta}\), with \(\alpha\) and \(\beta\) given for every cell. Multiplied by \(\Delta t\), with the unknown on the left:
Everything on the right is known. The unknown appears once plainly and once under a power, so there is no formula for it. EF5 uses Newton's method: make a first guess, measure the mismatch \(f(Q)\) between the two sides, divide it by the slope \(f'(Q) = \Delta t/\Delta x + \alpha\beta\,Q^{\beta-1}\), correct the guess, and repeat. It stops when the mismatch is below 0.01 or after ten rounds. Here is one channel cell on the front of a flood: the cell was carrying 100 m³/s, and 400 m³/s now arrives from upstream.
| Round | \(Q\) (m³/s) | mismatch \(f(Q)\) (m²) |
|---|
def channel_cell(Q_in, Q_prev, q_lat, dt, dx, alpha, beta):
r = dt / dx
known = r * Q_in + alpha * Q_prev ** beta + dt * q_lat # the right-hand side
# first guess: the same equation with the power law replaced by a straight line
m = ((Q_in + Q_prev) / 2) ** (beta - 1) if Q_in + Q_prev > 0 else 0.0
Q = (r * Q_in + alpha * beta * Q_prev * m + dt * q_lat) / (r + alpha * beta * m)
for _ in range(10): # Newton's method
f = r * Q + alpha * Q ** beta - known # the mismatch
if abs(f) < 0.01:
break
Q = max(Q - f / (r + alpha * beta * Q ** (beta - 1)), 0.0)
return Q
A hillslope cell uses the same lines with the flow per metre of width as the unknown, \(\alpha_0\) in place of \(\alpha\), and the exponent fixed at 0.6.
Three things follow from this design.
- One sweep is enough. Nothing in a cell's equation refers to the cells below it. Solving the cells from the headwaters down, each one needs only results that already exist. This is the kinematic wave's "downstream only" turned into a program, and it is also why the method cannot show backwater.
- The step is that of the rain. The unknown \(Q\) stands on both sides of the equation (an implicit scheme), which is why each solve needs Newton rounds. The router takes no sub-steps of its own: it runs at the step of the model, which in FLASH is the 5 minutes of its rainfall input.
- The work is easy to count. One solve per hillslope cell and two per channel cell, at every step, whether the cell is in flood or nearly dry.
Storage shortcuts: from one bucket to Muskingum
The second family starts from the linear reservoir of Session 2: a bucket whose outflow is proportional to what it holds, \(S = kQ\). Put a pulse of water in, and the outflow jumps at once and then decays. That gives a tail but no delay of the peak, and a river reach does delay the peak. There are two classical repairs.
A chain of buckets
Let the outflow of one bucket fall into a second, and so on, \(n\) buckets in a row, each with the same time constant \(k\). Nash showed in 1957 that the outflow of the last bucket, after a pulse into the first, is [14]
This is exactly the gamma curve that dCREST uses as its unit hydrograph (Session 8): nshape is the number of buckets in the chain, and the time scale \(k\) is the time constant of each. The mean delay is \(n\,k\). The Leaf River's nshape of 2.74 stands for a chain of between two and three buckets, each with \(k\) = 19.7 hours. The formula allows a number of buckets that is not whole; a real chain does not.
The Muskingum method
The second repair keeps one store per reach but looks at it more carefully. The water stored in a river reach depends on what flows in as well as on what flows out. While a flood is rising, more flows in at the top than leaves at the bottom, the water surface slopes along the reach, and a wedge of extra water lies on top of the usual volume. The Muskingum method writes the storage as a weighted mix of inflow \(I\) and outflow \(O\) [9]:
\(K\) is a time: the travel time of the wave through the reach. \(X\) is a weight between 0 and 0.5: how much the inflow counts. With \(X = 0\) the rule is \(S = K\,O\), the linear reservoir again, which flattens the wave most. With \(X = 0.5\) the wave leaves the reach \(K\) later with almost its original shape. So \(K\) sets the delay, and \(X\) sets how little the wave flattens.
Now apply the bookkeeping, change of storage = inflow − outflow, over one time step \(\Delta t\), using the average of the flows at the start (index 1) and the end (index 2) of the step, and solve for the one unknown, the new outflow:
with \(D = 2K(1-X) + \Delta t\). The three coefficients always add up to 1. That is what conserves water: once all flows are steady, outflow equals inflow.
That is the whole method: per reach and per step, three multiplications and two additions. A network is routed by doing this for every reach, upstream reaches first, with the outflows of the reaches above added to the inflow of the reach below.
A reach has \(K\) = 3 h and \(X\) = 0.1, and the model steps by \(\Delta t\) = 1 h. Then \(2KX\) = 0.6 h, \(2K(1-X)\) = 5.4 h and \(D\) = 6.4 h, so
They add up to 1. The river has been steady at 100 m³/s, so \(I_1 = O_1 = 100\). In the next hour the inflow rises to \(I_2 = 180\):
One hour later the inflow is 300. The old values move down one place, \(I_1 = 180\) and \(O_1 = 105\):
The inflow has tripled and the outflow has risen by a third: the reach is filling. The widget below starts with this reach and this flood.
Muskingum–Cunge: storage arithmetic with physical numbers
For decades \(K\) and \(X\) were fitted, reach by reach, to floods that had been observed at both ends. Cunge looked at the recursion differently. It is also a way of solving the kinematic wave equation numerically, and the flattening it produces is then an error of that numerical scheme. He chose \(K\) and \(X\) so that this numerical flattening equals the physical flattening of the diffusive wave [9], [10]:
\(\Delta x\): length of the reach. \(c\): wave celerity. \(B\): width of the river. \(S_0\): slope of the bed. \(Q\): a reference flow.
Nothing is left to fit. \(K\) is the time the wave needs to cross the reach. With the diffusivity of Session 14, \(D = Q/(2BS_0)\), the second formula reads \(X = \tfrac12 - D/(c\,\Delta x)\): one half minus a term that grows where the river is flat or narrow, because such rivers flatten a wave more. The term also grows when the reach is short, so the same river cut into shorter reaches gets a smaller \(X\) in each. The result has the cost of the Muskingum recursion and the behaviour of the diffusive wave of Session 14, with one exception: information still travels downstream only, so there is no backwater [9].
If \(K\) and \(X\) are recomputed from the flow at every step, the scheme no longer conserves water exactly; errors of 8 to 10% have been reported [9]. Computing them once, from a reference flow, keeps the recursion linear and the water balance exact.
Muskingum–Cunge is the channel router of the US National Water Model, on more than 2.7 million river reaches [15], [11], one of the schemes in mizuRoute [12], and the scheme of a routing model trained by gradients through a river network [16]. It is also the router of the Rhine experiment in Session 16. There, \(K\) and \(X\) come from a global data set of river widths, the slope of the terrain, a Manning roughness of 0.035 and the celerity at mean flow. The 2,242 reaches have a median length of 10.7 km and a median celerity of 1.1 m/s, which gives a median \(K\) of 2.6 hours.
The time step is not free
Look at the Muskingum line again: three weights that add up to one. Nothing in it looks dangerous. But the weights depend on the time step, and they are true weights, all between 0 and 1, only inside a window:
(\(C_1\) is always positive.) Divide by \(K = \Delta x / c\) and a single number appears, the Courant number [17]:
The Courant number is the number of reach lengths the wave travels in one time step. Outside the window one weight is negative, and the reach hands on water according to a rule that no longer makes physical sense:
- Step too long for the reach, \(\mathit{Cr} > 2(1-X)\): the wave crosses much more than the reach within one step. \(C_2\) is negative, so each new outflow is pushed away from the previous one, and the outflow zigzags.
- Step too short for the reach, \(\mathit{Cr} < 2X\): \(C_0\) is negative. When the inflow rises, the outflow first falls, and it can fall below zero: water running backwards out of nothing.
At \(\mathit{Cr} = 1\) the window holds for every \(X\) from 0 to 0.5. The wave then crosses exactly one reach per step, and this is where every scheme of this kind wants to be. Explicit kinematic-wave schemes have the same upper limit: the wave must not skip a cell within one step [11]. So three things that look independent are tied together:
Choose a fine grid and you have chosen a short time step. The widget shows both ways of breaking the rule, and the two repairs.
The two repairs are the ones real routers use, and they use both. Shorten the step: the router takes several sub-steps inside each step of the model. Split the reach: long reaches are cut into pieces, so that every piece has a Courant number near 1. mizuRoute sub-steps its Muskingum–Cunge scheme to keep the Courant number below one [12]. The router of the mHM model picks, for every grid resolution, a step that brings \(c\,\Delta t/\Delta x\) close to but below 1: two hours for cells of 12 km and a celerity of 1.5 m/s [18]. WRF-Hydro suggests steps of 6 seconds for a 100 m grid, 15 seconds for 250 m and 30 seconds for 500 m [11].
The reaches of a real network come in all lengths, so no single step suits them all. Here are the Courant numbers of the Rhine network of Session 16.
An earlier, daily-step version of the router used for the Rhine in Session 16 took one step per day. With reaches of about 10 km and waves at 1 to 2 m/s, the Courant number was far above 2 almost everywhere, and \(C_2\) was negative. That version did what many codes do: it set negative coefficients to zero and rescaled the three so that they still added up to one. The runs were stable, conserved water exactly, and never showed a negative flow.
They were also wrong. The repaired recursion delayed the water by close to half a day in every reach, however short the reach. Summed along the river, a pulse of runoff spread over the basin took 23.8 days on average to pass Cologne, three times the 7.9 days that the travel times of the reaches of that version add up to. No error message, no lost water: only a flood that arrives late and too flat, which a calibration would then quietly compensate somewhere else. The present router keeps every coefficient positive without such a repair: 24 sub-steps per day, and the 2,242 reaches cut into 7,469 pieces.
Counting the cost
The work of a routing run is a product of three numbers:
- Cells. A basin of area \(A\) on a grid with cells of size \(\Delta x\) has \(A / \Delta x^2\) cells.
- Steps. With \(\Delta t \approx \Delta x / c\), a day has \(86{,}400\ \text{s} \times c / \Delta x\) steps.
- Work per update. Three multiplications for Muskingum. A Newton solve with several power functions for EF5's kinematic wave. A unit hydrograph has no network at all: one convolution per gauge.
Multiply the first two: the number of updates per simulated day is \(86{,}400 \times A\,c / \Delta x^{3}\). Halve the cell size and the work is eight times larger: four times the cells, and twice the steps. For an explicit diffusive scheme, whose step shrinks with \(\Delta x^2\), it is sixteen times [5]. On a network of river reaches instead of a full grid, halving the reach length doubles the reaches and doubles the steps: four times.
EF5 in the FLASH configuration is at the expensive corner of this map: a 0.01° grid of the conterminous United States with up to 14.2 million cells that have a flow direction, and 288 steps per day. That is up to about 4 billion cell solves per simulated day, plus a second solve in every channel cell, done one after another on one processor core. A simulation of 2001–2011 on this grid took one week of computer time [13].
Upstream first: why routing resists parallel computing
Modern computers are fast because they do many things at once, and a GPU does this best. Routing resists: within a time step a reach cannot be updated before the reaches above it. What can be done at once is a level. Level 0 holds all headwater reaches, level 1 the reaches fed only by level 0, and so on down to the outlet.
How well this works depends on the shape of the network. The Rhine network of Session 16 has 7,469 pieces in 229 levels, about per level: too little work at a time to keep a GPU busy. The global network of the same experiment has 5,854,832 pieces in 1,608 levels, about per level. The router also staggers the levels in time: while level 0 computes hour \(k\), level 1 computes hour \(k-1\), and so on. Every piece is then updated in every pass, and a year of hourly steps takes 8,760 passes plus one per level, instead of 8,760 passes for each level.
Other systems meet the same constraint in other ways. NOAA's t-route states that all routing computations must strictly obey an upstream-to-downstream ordering, and runs Muskingum–Cunge in parallel by junction order [19]. mizuRoute computes independent basins and tributaries in parallel [1], [20]. RAPID writes Muskingum for the whole network as one matrix equation and hands it to a parallel solver [21]. DiffRoute turns any linear scheme into convolutions on a GPU and reports hourly routing of 85 years over the globe in under two minutes [22].
Measured
All numbers below were measured on one workstation with 8 CPU threads and one GPU (NVIDIA RTX 4500 Ada Generation), for one simulated year. The network is the Rhine above Düsseldorf: 2,242 reaches fed by runoff from 1,996 grid cells. The router chooses the number of pieces for each time step so that all coefficients stay positive.
| Routing step | steps / day | pieces | updates / year | seconds / year | difference | largest flood |
|---|---|---|---|---|---|---|
| 15 minutes | 96 | 23,904 | 837,596,160 | 15.34 | reference | reference |
| 1 hour | 24 | 7,469 | 65,428,440 | 2.58 | 0.04% | same day |
| 3 hours | 8 | 3,777 | 11,028,840 | 0.87 | 0.84% | same day |
| 6 hours | 4 | 3,028 | 4,420,880 | 0.47 | 2.92% | 1 day late |
| 1 day | 1 | 2,421 | 883,665 | 0.13 | 10.77% | 1 day late |
Seconds on 8 CPU threads. Difference: root-mean-square difference of the daily flow at the outlet from the 15-minute run, as a percentage of the mean flow. Largest flood: the day of the largest flow at the outlet, compared with the 15-minute run.
The hourly run is within 0.04% of the 15-minute run at a sixth of its cost, and that is the setting used in Session 16. The daily run is cheap and stable, and its largest flood arrives a day late: positive coefficients keep a scheme from blowing up, not from being inaccurate. Shorter steps also need more pieces, 23,904 at 15 minutes against 7,469 at one hour: the tie between step and grid again.
| One simulated year | Size | CPU, 8 threads | one GPU |
|---|---|---|---|
| Unit hydrograph at every gauge of the Rhine | 193 convolutions | 0.006 s | – |
| Rhine network, hourly | 7,469 pieces in 229 levels | 2.6 s | 5.5 s |
| The same with gradients: run + backward pass | every piece at every sub-step is kept: 0.78 GB | 4.6 + 2.2 s | 5.7 + 5.6 s |
| Every river of the globe, hourly | 1,887,504 reaches, 5,854,832 pieces in 1,608 levels | 3,616 s | 22 s |
Four things to read from this table.
- A unit hydrograph is nearly free. All 193 gauges take 0.006 seconds; the network run takes about times as long. If a unit hydrograph is enough (Session 14 said when), nothing is cheaper.
- For one basin the GPU loses. The Rhine takes 5.5 s on the GPU and 2.6 s on the CPU. Each pass has little to do, and the thousands of passes must follow one another.
- For the globe the GPU wins. 51,288,328,320 updates per simulated year take 22 seconds on one GPU and 3,616 seconds, one hour, on 8 CPU threads: times faster. Every pass now updates millions of pieces at once.
- Gradients cost memory. A backward pass (Session 12) takes no longer than the run itself, but it needs every intermediate value: every piece at every sub-step. One year of the Rhine fills 0.78 GB. The need grows with pieces × steps, so one year of the globe would take about GB. Training a global router therefore needs checkpointing (Session 12) or training on one river system at a time.
Who uses what
The table lists the channel routing of widely used models and forecasting systems, as stated in their own papers and documentation. A dash means that the sources read for this page do not state the value.
| System | Channel routing | Spatial unit | Routing time step | Source |
|---|---|---|---|---|
| Lumped catchment models | ||||
| dCREST v1.0 | linear reservoir for overland flow, then a gamma unit hydrograph | one catchment | daily | Session 8 |
| HBV (HBV-light) | no channel model: runoff is spread by a triangular weighting function (parameter MAXBAS) | one catchment | daily | [23] |
| GR4J | unit hydrographs with one time constant (X4, days) and a routing store (X3, mm) | one catchment | daily | [24], [25] |
| Grid and network models | ||||
| VIC with the Lohmann routing | a unit hydrograph inside each cell, then the linearised Saint-Venant equation between cells; run as a separate program after the land model | grid cells | daily runoff as input | [26], [27], [28] |
| EF5 / FLASH | kinematic wave for surface water, linear reservoir for water below the surface | 0.01° grid | 5 minutes | [13] |
| US National Water Model v3.0 (WRF-Hydro) | Muskingum–Cunge in the channels; diffusive wave for water on the land surface, on a 250 m grid | over 2.7 million river reaches | – | [15], [11] |
| GloFAS v4.0 (LISFLOOD) | kinematic wave, with the channel split into the flow up to bankfull and the flow above it; lakes and reservoirs added | 0.05° grid | daily | [29], [30] |
| CaMa-Flood | local inertial equation (diffusive wave in the 2011 version), with floodplain storage from sub-grid topography | unit catchments; global runs usually at 15 or 6 arc-minutes | adaptive | [6], [31], [32] |
| mizuRoute | a choice of five: unit hydrograph from the diffusive wave, two kinematic-wave schemes, Muskingum–Cunge, diffusive wave | river reaches | that of the runoff input, typically hourly or daily; sub-steps inside | [1], [12] |
| RAPID | Muskingum, written as one matrix equation for the network; used with VIC runoff for a global reconstruction at 2.94 million reaches | river reaches | – | [21], [33] |
| mHM (its router mRM) | kinematic wave by finite differences, time step adapted to the grid | grid cells of 1 to 50 km | 1 minute to 1 day | [18] |
| HEC-RAS, one-dimensional unsteady flow | dynamic wave: both Saint-Venant equations | surveyed cross-sections | set by the user | [3] |
| Differentiable routing: trained by gradients, as in Session 12 | ||||
| Feng et al. (2022) | gamma unit hydrograph with two parameters, after a differentiable HBV | one catchment | – | [34] |
| Bindas et al. (2024) | Muskingum–Cunge on a river network; a neural network supplies roughness and channel geometry from the attributes of each reach | 582 reaches of about 2 km | hourly | [16] |
| Zhong et al. (2024) | sub-basin models coupled by a differentiable Muskingum method | sub-basins | – | [35] |
| Song et al. (2025) | Muskingum–Cunge in the river network, compared with a unit-hydrograph version | units of about 37 km² | – | [36] |
| Mei et al. (2026) | sub-basins linked by differentiable Muskingum channel routing | sub-basins | daily | [37] |
| DiffRoute, Hascoet et al. (2026) | any linear scheme (Muskingum, linear diffusive wave, chain of reservoirs, pure delay) as convolutions on a GPU | up to millions of river channels | hourly | [22] |
| The Rhine experiment of Session 16 | Muskingum–Cunge, \(K\) and \(X\) fixed from channel data | 2,242 reaches | hourly sub-steps | Session 16 |
Three patterns stand out. Lumped models route with a curve, because with one runoff number per catchment a curve is all the network can amount to (Session 14). Systems that forecast floods on real river networks mostly use the kinematic wave or Muskingum–Cunge, and some add what channels alone lack: lakes and reservoirs in GloFAS, floodplains in CaMa-Flood. And every differentiable router in this list uses a method from the cheap end of the map, a unit hydrograph or a Muskingum recursion: these are short, explicit lines of arithmetic that automatic differentiation handles easily.
In Python
The Muskingum method in ten lines, checked for conservation of water, and then run with a step that is too long.
Check your understanding
A reach has \(K\) = 2 h and \(X\) = 0.25, and the step is 2 h. Compute the three coefficients. The river is steady at 50 m³/s and the inflow then rises to 150 m³/s. What is the outflow after one step?
\(2KX = 1\), \(2K(1-X) = 3\), \(D = 3 + 2 = 5\). So \(C_0 = (2-1)/5 = 0.2\), \(C_1 = (2+1)/5 = 0.6\), \(C_2 = (3-2)/5 = 0.2\), which add up to 1. Then \(O_2 = 0.2 \times 150 + 0.6 \times 50 + 0.2 \times 50 = 30 + 30 + 10 = 70\) m³/s.
In EF5's kinematic wave, why is one sweep from the headwaters to the outlet enough, and what can the method not show as a result?
The kinematic wave drops the surface-tilt term, so the flow in a cell depends only on the water in that cell and on what arrives from upstream. Nothing in a cell's equation refers to the cells below it, so solving upstream cells first gives every cell all it needs. For the same reason nothing downstream can hold the water back: the method has no backwater.
A reach is 10 km long and the wave celerity is 2 m/s. What is \(K\)? With \(X\) = 0.3, which time steps keep all three coefficients positive? Is an hourly step allowed? A daily one?
\(K = 10{,}000 / 2 = 5{,}000\) s, or 1.39 h. The window is \(2KX \le \Delta t \le 2K(1-X)\): from 0.83 h to 1.94 h. An hourly step is inside it (Courant number 0.72). A daily step has a Courant number of 17: \(C_2\) is negative, and the step must be shortened.
You refine a grid model from cells of 2 km to cells of 1 km. How much more routing work is that, and why?
Eight times. There are four times as many cells, and because the time step is tied to the cell size by \(\Delta t \approx \Delta x / c\), there are twice as many steps.
Why is the GPU slower than the CPU for the Rhine alone, and far faster for the whole globe?
Within a step a reach can only be updated after the reaches above it, so the work that can be done at once is one level of the network. The Rhine has a few dozen pieces per level: each pass is tiny and thousands of passes must follow one another, which a GPU does no faster than a CPU. The global network has thousands of pieces per level, and with the levels staggered in time every pass updates millions of pieces at once.
What to remember
- Every routing method is a shortcut of the Saint-Venant equations. Dynamic wave, local inertial, diffusive wave and kinematic wave drop one term after another; storage methods replace the momentum equation by a rule for the water a reach holds.
- EF5 routes with a kinematic wave: one equation per cell and step, "in − out = change in storage" with \(A = \alpha Q^{\beta}\), solved by Newton's method, cells taken from the headwaters to the outlet; 5-minute steps on a 0.01° grid in FLASH.
- Muskingum is one line per reach and step, \(O_2 = C_0 I_2 + C_1 I_1 + C_2 O_1\). \(K\) is the travel time and \(X\) says how little the wave flattens. With Cunge's \(K\) and \(X\) from the channel it behaves like the diffusive wave.
- The time step is tied to the grid: the Courant number \(c\,\Delta t/\Delta x\) should be near 1, and the Muskingum coefficients are positive only for \(2KX \le \Delta t \le 2K(1-X)\). A repair that hides a violation can change the answer without any warning.
- Cost = cells × steps × work per update. Halving a grid costs eight times as much. The upstream-first order limits parallel computing: a unit hydrograph takes milliseconds, the Rhine network seconds, and every river of the globe 22 seconds per simulated year on a GPU.
Next
You now have the map. Session 16 puts one method on it to work: Muskingum–Cunge on the 2,242 reaches of the Rhine, against a trained unit hydrograph at 193 gauges, through a real flood. It shows what network routing fixes, what it cannot fix, and when it is worth its cost.
References
[1] Mizukami, N., et al.: mizuRoute version 1: a river network routing tool for a continental domain water resources applications, Geoscientific Model Development, 9, 2223–2238, doi:10.5194/gmd-9-2223-2016, 2016.
[2] Meselhe, E., et al.: Continental scale heterogeneous channel flow routing strategy for operational forecasting models, Journal of the American Water Resources Association, 57, 209–221, 2021. repository.library.noaa.gov/view/noaa/58261.
[3] US Army Corps of Engineers, Hydrologic Engineering Center: HEC-RAS Hydraulic Reference Manual, 1D Unsteady Flow Hydrodynamics. www.hec.usace.army.mil/confluence/rasdocs (read November 2026).
[4] Shaw, J., Kesserwani, G., Neal, J., Bates, P., and Sharifian, M.: LISFLOOD-FP 8.0: the new discontinuous Galerkin shallow-water solver for multi-core CPUs and GPUs, Geoscientific Model Development, 14, 3577–3602, doi:10.5194/gmd-14-3577-2021, 2021.
[5] Bates, P. D., Horritt, M. S., and Fewtrell, T. J.: A simple inertial formulation of the shallow water equations for efficient two-dimensional flood inundation modelling, Journal of Hydrology, 387, 33–45, doi:10.1016/j.jhydrol.2010.03.027, 2010.
[6] Yamazaki, D., de Almeida, G. A. M., and Bates, P. D.: Improving computational efficiency in global river models by implementing the local inertial flow equation and a vector-based river network map, Water Resources Research, 49, 7221–7235, doi:10.1002/wrcr.20552, 2013.
[7] Lighthill, M. J., and Whitham, G. B.: On kinematic waves I. Flood movement in long rivers, Proceedings of the Royal Society of London A, 229, 281–316, doi:10.1098/rspa.1955.0088, 1955.
[8] Getirana, A. C. V., and Paiva, R. C. D.: Mapping large-scale river flow hydraulics in the Amazon Basin, Water Resources Research, 49, 2437–2445, doi:10.1002/wrcr.20212, 2013.
[9] Todini, E.: A mass conservative and water storage consistent variable parameter Muskingum-Cunge approach, Hydrology and Earth System Sciences, 11, 1645–1659, doi:10.5194/hess-11-1645-2007, 2007.
[10] Cunge, J. A.: On the subject of a flood propagation computation method (Muskingum method), Journal of Hydraulic Research, 7, 205–230, doi:10.1080/00221686909500264, 1969 (described here as presented in [9]).
[11] WRF-Hydro version 5.4 documentation: Model physics. wrf-hydro.readthedocs.io/en/latest/model-physics.html (read November 2026).
[12] mizuRoute documentation: River routing schemes. mizuroute.readthedocs.io/en/latest/tech_note/reach_routing.html (read November 2026).
[13] Flamig, Z. L., Vergara, H., and Gourley, J. J.: The Ensemble Framework For Flash Flood Forecasting (EF5) v1.2: description and case study, Geoscientific Model Development, 13, 4943–4958, doi:10.5194/gmd-13-4943-2020, 2020.
[14] Nash, J. E.: The form of the instantaneous unit hydrograph, IAHS Publication 45, 114–121, 1957. iahs.info/uploads/dms/045011.pdf.
[15] NOAA Office of Water Prediction: The National Water Model. water.noaa.gov/about/nwm (read November 2026).
[16] Bindas, T., et al.: Improving river routing using a differentiable Muskingum-Cunge model and physics-informed machine learning, Water Resources Research, 60, e2023WR035337, doi:10.1029/2023WR035337, 2024.
[17] Courant, R., Friedrichs, K., and Lewy, H.: Über die partiellen Differenzengleichungen der mathematischen Physik, Mathematische Annalen, 100, 32–74, doi:10.1007/BF01448839, 1928.
[18] Thober, S., et al.: The multiscale routing model mRM v1.0: simple river routing at resolutions from 1 to 50 km, Geoscientific Model Development, 12, 2501–2521, doi:10.5194/gmd-12-2501-2019, 2019.
[19] NOAA Office of Water Prediction: t-route, repository README. github.com/NOAA-OWP/t-route (read November 2026).
[20] Mizukami, N., et al.: A vector-based river routing model for Earth System Models: parallelization and global applications, Journal of Advances in Modeling Earth Systems, 13, e2020MS002434, doi:10.1029/2020MS002434, 2021.
[21] David, C. H., et al.: River network routing on the NHDPlus dataset, Journal of Hydrometeorology, 12, 913–934, doi:10.1175/2011JHM1345.1, 2011.
[22] Hascoet, T., Pellet, V., Oishi, S., and Miyoshi, T.: Differentiable river routing for end-to-end learning of hydrological processes, Journal of Geophysical Research: Machine Learning and Computation, 3, e2025JH000760, doi:10.1029/2025JH000760, 2026.
[23] Seibert, J., and Vis, M. J. P.: Teaching hydrological modeling with a user-friendly catchment-runoff-model software package, Hydrology and Earth System Sciences, 16, 3315–3325, doi:10.5194/hess-16-3315-2012, 2012.
[24] airGR reference manual: RunModel_GR4J. search.r-project.org/CRAN/refmans/airGR/html/RunModel_GR4J.html (read November 2026).
[25] Perrin, C., Michel, C., and Andréassian, V.: Improvement of a parsimonious model for streamflow simulation, Journal of Hydrology, 279, 275–289, doi:10.1016/S0022-1694(03)00225-7, 2003.
[26] VIC version 4.2 documentation: Routing model input files. vic.readthedocs.io/en/vic.4.2.d/Documentation/Routing/RoutingInput (read November 2026).
[27] Lohmann, D., Nolte-Holube, R., and Raschke, E.: A large-scale horizontal routing model to be coupled to land surface parametrization schemes, Tellus A, 48, 708–721, doi:10.3402/tellusa.v48i5.12200, 1996.
[28] Lohmann, D., Raschke, E., Nijssen, B., and Lettenmaier, D. P.: Regional scale hydrology: I. Formulation of the VIC-2L model coupled to a routing model, Hydrological Sciences Journal, 43, 131–141, doi:10.1080/02626669809492107, 1998.
[29] LISFLOOD model documentation: Channel routing, and Double kinematic wave (split routing). ec-jrc.github.io/lisflood-model (read November 2026).
[30] Copernicus Emergency Management Service: GloFAS v4.0, and GloFAS v4 calibration methodology and parameters. confluence.ecmwf.int/display/CEMS/GloFAS+v4.0 (read November 2026).
[31] Yamazaki, D., Kanae, S., Kim, H., and Oki, T.: A physically based description of floodplain inundation dynamics in a global river routing model, Water Resources Research, 47, W04501, doi:10.1029/2010WR009726, 2011.
[32] CaMa-Flood version 4: repository README and guideline. github.com/global-hydrodynamics/CaMa-Flood_v4 (read November 2026).
[33] Lin, P., et al.: Global reconstruction of naturalized river flows at 2.94 million reaches, Water Resources Research, 55, 6499–6516, doi:10.1029/2019WR025287, 2019.
[34] Feng, D., Liu, J., Lawson, K., and Shen, C.: Differentiable, learnable, regionalized process-based models with multiphysical outputs can approach state-of-the-art hydrologic prediction accuracy, Water Resources Research, 58, e2022WR032404, doi:10.1029/2022WR032404, 2022.
[35] Zhong, L., Lei, H., and Yang, J.: Development of a distributed physics-informed deep learning hydrological model for data-scarce regions, Water Resources Research, 60, e2023WR036333, doi:10.1029/2023WR036333, 2024.
[36] Song, Y., et al.: High-resolution national-scale water modeling is enhanced by multiscale differentiable physics-informed machine learning, Water Resources Research, 61, e2024WR038928, doi:10.1029/2024WR038928, 2025.
[37] Mei, J., Yong, B., Corzo, G., Hong, Y., Sun, R., Tao, X., Wang, J., and Duan, Q.: Diagnosing cryospheric runoff dynamics: a distributed differentiable hydrological model with global transfer learning, Water Resources Research, 62, e2026WR044148, doi:10.1029/2026WR044148, 2026.