Session 15 · Special topic: river routing

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.

Time about 50 minutesNeeds Sessions 8, 12 and 14
Watch this session first: a 9-minute narrated video with English subtitles. The page below goes further and lets you try each step yourself.

You will be able to

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:

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].

The two equations, once
\[ \underbrace{\frac{\partial A}{\partial t}}_{\text{storage changes}} + \underbrace{\frac{\partial Q}{\partial x}}_{\text{out minus in}} \;=\; \underbrace{q}_{\text{inflow from the side}} \]
\[ \underbrace{\frac{\partial v}{\partial t}}_{\text{local inertia}} + \underbrace{v\,\frac{\partial v}{\partial x}}_{\text{advective inertia}} + \underbrace{g\,\frac{\partial h}{\partial x}}_{\text{surface tilt}} \;=\; \underbrace{g\,(S_0 - S_f)}_{\text{gravity minus friction}} \]

\(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:

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].

The map of routing methods. Left: start from the full equations and drop one term at each step. Right: start from one bucket and add one ingredient at each step. The systems named in grey are examples from the table at the end of this page.
MethodKeepsFlattens the waveBackwaterNeedsLimit on the time step
Dynamic waveall four termsyesyescross-sections, roughnessdepends on the solver
Local inertialall but advective inertiayesyescross-sections, roughnessstep ∝ \(\Delta x\) [5]
Diffusive wavegravity, friction, surface tiltyesyes, with a downstream boundarycelerity and diffusivity, or geometry and roughnessexplicit schemes: step ∝ \(\Delta x^2\) [5]
Kinematic wavegravity = frictiononly numericallynoroughness, slope, width (or \(\alpha\), \(\beta\))explicit schemes: \(c\,\Delta t/\Delta x \le 1\) [11]
Muskingum–Cungestorage rule with physical \(K\), \(X\)yesnowidth, slope, roughness\(c\,\Delta t/\Delta x\) below 1, by sub-steps [12]
Muskingumstorage 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\)yesno\(k\) and \(n\)none: one convolution
Unit hydrograph from the diffusive wavediffusive wave with constant coefficients, solved onceyesnocelerity, diffusivity per reachnone: 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].

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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.
  6. 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.
  7. 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:

\[ \underbrace{\frac{A - A_{\text{prev}}}{\Delta t}}_{\text{change in storage}} \;+\; \underbrace{\frac{Q - Q_{\text{in}}}{\Delta x}}_{\text{out minus in}} \;=\; \underbrace{q_{\text{lat}}}_{\text{from the side}}, \qquad A = \alpha\, Q^{\beta} \]

\(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:

\[ \frac{\Delta t}{\Delta x}\,Q \;+\; \alpha\,Q^{\beta} \;=\; \frac{\Delta t}{\Delta x}\,Q_{\text{in}} \;+\; \alpha\,Q_{\text{prev}}^{\beta} \;+\; \Delta t\; q_{\text{lat}} \]

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²)

The channel-cell solve, transcribed to Python from EF5's KinematicRoute.cpp
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.

The order of the sweep on a toy grid of 28 cells. Arrows show where each cell drains. Blue cells have more than three cells upstream and are channel cells here (FLASH uses ten). The numbers give the order in which the cells are solved, built the way EF5 builds it; every cell comes after all the cells that drain into it.

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]

\[ u(t) \;=\; \frac{1}{k\,\Gamma(n)} \left(\frac{t}{k}\right)^{n-1} e^{-t/k} \]

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.

Try itA chain of buckets makes the gamma curve

Line: Nash's formula. Dots, when the number of buckets is whole: the outflow of the last bucket, computed by actually stepping \(n\) buckets through time. The total delay \(n\,k\) stays where you set it. More buckets with the same total delay give a later, narrower peak: a long chain of small buckets passes a wave on almost unchanged.

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]:

\[ S \;=\; K\,\big[\,X\,I + (1 - X)\,O\,\big] \]

\(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:

\[ O_2 \;=\; C_0\,I_2 + C_1\,I_1 + C_2\,O_1 \]
\[ C_0 = \frac{\Delta t - 2KX}{D}, \qquad C_1 = \frac{\Delta t + 2KX}{D}, \qquad C_2 = \frac{2K(1-X) - \Delta t}{D} \]

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.

One step by hand

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

\[ C_0 = \frac{1 - 0.6}{6.4} = 0.0625, \qquad C_1 = \frac{1 + 0.6}{6.4} = 0.25, \qquad C_2 = \frac{5.4 - 1}{6.4} = 0.6875 \]

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\):

\[ O_2 = 0.0625 \times 180 + 0.25 \times 100 + 0.6875 \times 100 = 11.25 + 25 + 68.75 = 105\ \text{m}^3/\text{s} \]

One hour later the inflow is 300. The old values move down one place, \(I_1 = 180\) and \(O_1 = 105\):

\[ O_2 = 0.0625 \times 300 + 0.25 \times 180 + 0.6875 \times 105 = 18.75 + 45 + 72.19 = 135.94\ \text{m}^3/\text{s} \]

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.

Try itOne Muskingum reach

The time step is fixed at 1 hour. Raise \(K\): the outflow moves later. Raise \(X\): it keeps more of the inflow's shape. Water in and water out are added up over 200 hours, long enough for the whole flood to pass. Then push \(K\) to 8 hours with \(X\) at 0.3 and look at \(C_0\) and at the first hours of the outflow. The section after next explains what you see.

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]:

\[ K = \frac{\Delta x}{c}, \qquad X = \frac{1}{2}\left(1 - \frac{Q}{B\,S_0\,c\,\Delta x}\right) \]

\(\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_0 \ge 0 \iff \Delta t \ge 2KX, \qquad\qquad C_2 \ge 0 \iff \Delta t \le 2K(1-X) \]

(\(C_1\) is always positive.) Divide by \(K = \Delta x / c\) and a single number appears, the Courant number [17]:

\[ \mathit{Cr} = \frac{c\,\Delta t}{\Delta x} = \frac{\Delta t}{K}, \qquad\qquad 2X \;\le\; \mathit{Cr} \;\le\; 2(1 - X) \]

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:

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:

\[ \Delta t \;\approx\; \frac{\Delta x}{c} \]

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.

Try itThe time step is not free

One reach, 36 km long, wave celerity 2 m/s, so \(K\) = 5 hours. A flood with a steep front enters at the top. Green: the diffusive-wave answer of Session 14 for the same delay and the same spreading (celerity 2 m/s, diffusivity \(D = (\tfrac12 - X)\,c\,\Delta x\)). Blue: the Muskingum outflow at the time step you choose. The widget starts with an hourly step, which sounds safe and is not. Press "split the reach for me". Then go back to one reach and move the step to 1 day. When the reach is cut into \(n\) pieces, each piece gets \(K/n\), and its \(X\) follows from Cunge's formula for the shorter length, \(X_n = \tfrac12 - n\,(\tfrac12 - X)\), so that the reach as a whole spreads the wave as before. Water in and water out are added up over 30 days, for the flood as the chosen step samples it.

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.

DataCourant numbers of the Rhine's 2,242 reaches

Each reach has its own travel time \(K\), from its length and its wave celerity. The bars count the reaches by Courant number \(\Delta t / K\) on a logarithmic axis. Right of the red line the Courant number is above 2, and \(C_2\) is negative whatever \(X\) is. With one step per day that is nearly every reach.

A stability fix that changed the answer

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:

\[ \text{work} \;=\; \text{cells (or reaches)} \;\times\; \text{time steps} \;\times\; \text{work per update} \]

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.

Try itCount the updates

A full grid over the basin, stepped at a Courant number of 1. The widget starts with the area of the Rhine above Düsseldorf. The line is the number of cell updates per simulated day against the cell size, both on logarithmic axes; its slope is −3. The last number converts the count to computing time at the speed measured for the Muskingum–Cunge router below ( per update on 8 CPU threads); a Newton solve per update costs more.

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.

The same toy grid, by level. Cells with the same number do not depend on one another and can be updated together: .

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 stepsteps / daypiecesupdates / yearseconds / yeardifferencelargest flood
15 minutes9623,904837,596,16015.34referencereference
1 hour247,46965,428,4402.580.04%same day
3 hours83,77711,028,8400.870.84%same day
6 hours43,0284,420,8800.472.92%1 day late
1 day12,421883,6650.1310.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 yearSizeCPU, 8 threadsone GPU
Unit hydrograph at every gauge of the Rhine193 convolutions0.006 s–
Rhine network, hourly7,469 pieces in 229 levels2.6 s5.5 s
The same with gradients: run + backward passevery piece at every sub-step is kept: 0.78 GB4.6 + 2.2 s5.7 + 5.6 s
Every river of the globe, hourly1,887,504 reaches, 5,854,832 pieces in 1,608 levels3,616 s22 s

Four things to read from this table.

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.

SystemChannel routingSpatial unitRouting time stepSource
Lumped catchment models
dCREST v1.0linear reservoir for overland flow, then a gamma unit hydrographone catchmentdailySession 8
HBV (HBV-light)no channel model: runoff is spread by a triangular weighting function (parameter MAXBAS)one catchmentdaily[23]
GR4Junit hydrographs with one time constant (X4, days) and a routing store (X3, mm)one catchmentdaily[24], [25]
Grid and network models
VIC with the Lohmann routinga unit hydrograph inside each cell, then the linearised Saint-Venant equation between cells; run as a separate program after the land modelgrid cellsdaily runoff as input[26], [27], [28]
EF5 / FLASHkinematic wave for surface water, linear reservoir for water below the surface0.01° grid5 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 gridover 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 added0.05° griddaily[29], [30]
CaMa-Floodlocal inertial equation (diffusive wave in the 2011 version), with floodplain storage from sub-grid topographyunit catchments; global runs usually at 15 or 6 arc-minutesadaptive[6], [31], [32]
mizuRoutea choice of five: unit hydrograph from the diffusive wave, two kinematic-wave schemes, Muskingum–Cunge, diffusive waveriver reachesthat of the runoff input, typically hourly or daily; sub-steps inside[1], [12]
RAPIDMuskingum, written as one matrix equation for the network; used with VIC runoff for a global reconstruction at 2.94 million reachesriver reaches–[21], [33]
mHM (its router mRM)kinematic wave by finite differences, time step adapted to the gridgrid cells of 1 to 50 km1 minute to 1 day[18]
HEC-RAS, one-dimensional unsteady flowdynamic wave: both Saint-Venant equationssurveyed cross-sectionsset 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 HBVone 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 reach582 reaches of about 2 kmhourly[16]
Zhong et al. (2024)sub-basin models coupled by a differentiable Muskingum methodsub-basins–[35]
Song et al. (2025)Muskingum–Cunge in the river network, compared with a unit-hydrograph versionunits of about 37 km²–[36]
Mei et al. (2026)sub-basins linked by differentiable Muskingum channel routingsub-basinsdaily[37]
DiffRoute, Hascoet et al. (2026)any linear scheme (Muskingum, linear diffusive wave, chain of reservoirs, pure delay) as convolutions on a GPUup to millions of river channelshourly[22]
The Rhine experiment of Session 16Muskingum–Cunge, \(K\) and \(X\) fixed from channel data2,242 reacheshourly sub-stepsSession 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

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.