Routing III: the Rhine on a river network
Session 14 explained how a flood wave travels down a river, and Session 15 how the routing methods differ and what they cost. This session runs one of them on a real large river: the Rhine above Düsseldorf, 147,680 km², on 2,242 river reaches, checked against 193 gauges. It shows what a river network fixes, what it cannot fix, what gradients can learn about routing, and when the extra cost is worth paying.
You will be able to
- describe how runoff from grid cells is handed to river reaches and routed, and say which numbers were trained and which were not;
- read a flood on a network map and at a gauge: when it rises, how high it peaks, what shape it has;
- explain why replacing a trained unit hydrograph by physical routing does not by itself improve the scores;
- name three kinds of storage a channel router does not have, and recognise each in a hydrograph;
- say what training the routing by gradients achieved on a dammed river, and why its parameters are not physics;
- choose between a unit hydrograph, a network router and a model with lakes and floodplains for a given task.
The set-up: cells make runoff, reaches carry it
The case comes from an experiment with a global CREST set-up that is still work in progress. The land is cut into cells of 0.1° in latitude and longitude. Each of the 1,996 cells above Düsseldorf runs a daily CREST water balance like the one of Sessions 3 to 7, driven by satellite precipitation (IMERG), and produces one depth of runoff per day. The parameters of that water balance were trained on other river systems. No gauge on the Rhine was used, so everything on this page is out of sample.
The runoff then has to become river flow at a gauge. The experiment does this in two ways.
- Unit hydrograph (the reference). Average the runoff of all cells above the gauge and spread it over the following days with a gamma unit hydrograph, exactly as in Session 8. Its shape and time scale were trained together with the water balance.
- River network. Hand each cell's runoff to the river reach that drains it, and pass it from reach to reach down to the gauge with the Muskingum–Cunge method of Session 15 [1], in hourly steps. Every number in the router is read from maps: the river width from the MERIT Hydro data set, the slope from the elevation model, one roughness value for all rivers (Manning's n = 0.035), and the wave celerity at mean flow. Nothing in the routing is trained.
Both ways start from the same cell runoff. So any difference between them at a gauge is caused by routing alone, and any error they share comes from somewhere else.
A reach is a piece of river about 11 km long. It receives the runoff of the land that drains straight into it (typically km², so that 1 mm of runoff in a day adds m³/s) and the outflow of the reaches upstream. Each hour the router computes its outflow from three numbers, the inflow now, the inflow an hour ago and the outflow an hour ago, with weights that follow from the reach's travel time and from how strongly it flattens a wave (Session 15). Reaches that a wave needs much longer than an hour to cross are split first, which gives 7,469 sub-reaches. They are computed from the headwaters down, in 229 rounds: all sub-reaches whose upstream neighbours are finished can be done together.
| Part of the model | Where its numbers come from |
|---|---|
| Water balance of each cell | trained on other river systems, with a unit hydrograph behind it; frozen here |
| Unit hydrograph at each gauge | trained together with that water balance |
| River network (travel time and flattening of each reach) | maps of width, slope and mean flow; not trained |
Both runs cover 2001 to 2011. The first two years are warm-up; the scores below are for 2003–2011, against daily flow observed at the gauges.
Watch a flood: January 2011
In the second week of January 2011 the Rhine and almost all of its tributaries were in flood at the same time. The map below shows the routed flow in every reach, divided by the reach's own mean flow, so that a brook and the Rhine can share one colour scale: 1 is an ordinary day, 5 is five times the usual flow.
- 6 to 9 January. The small rivers change colour first, all over the basin and within a day or two. Their water has only a short way to go.
- 9 to 12 January. The colour runs down the large tributaries: the Neckar, the Main and above all the Moselle, on the left. Choose Cochem on the Moselle and compare the two curves.
- 12 to 17 January. The Moselle and the Neckar are already falling while the Rhine below them is at its highest. The flood on the big river is made of runoff from days earlier, far upstream.
The widget shows two simulations. Here they are with the observed flow, for the two months around the flood.

Look at the January flood at Andernach and Düsseldorf. The network run rises with the river, no more than a day behind it, and has the observed shape of two crests a few days apart. The unit hydrograph produces one smooth hump that rises late. At Düsseldorf it peaks days after the observed peak. But the network run does not stop where the river stopped: it climbs to 10,258 m³/s where 7,840 was observed, % too high. The unit hydrograph's 8,200 m³/s is nearly the right height, on the wrong days.
On the Moselle at Cochem the contrast is sharper. The observed flood is a spike of 2,560 m³/s. The unit hydrograph flattens it to 2,077; the network run makes a spike of the right shape, 3,442 m³/s high and days late. The two December floods show a third thing: there both runs are far too low at every gauge. That is water missing from the runoff, and no routing can add water.
193 gauges, nine years
One flood is an anecdote. The score used here is the Kling–Gupta efficiency (KGE, Session 10) of daily flow over 2003–2011: 1 is perfect, and it loses points for wrong timing (correlation), wrong variability and wrong volume. Each dot below is a gauge, coloured by which routing scores higher there.
| Area above the gauge | gauges | median KGE | network better at | variability ratio | ||
|---|---|---|---|---|---|---|
| unit hydrograph | network | unit hydrograph | network | |||
| below 1,000 km² | 125 | 0.488 | 0.444 | 36% | 0.83 | 0.92 |
| 1,000 to 10,000 km² | 44 | 0.634 | 0.657 | 55% | 0.82 | 0.95 |
| above 10,000 km² | 24 | 0.735 | 0.746 | 50% | 1.03 | 1.07 |
| all gauges | 193 | 0.564 | 0.529 | 42% | ||
The variability ratio is the standard deviation of the simulated flow divided by that of the observed flow, the α of the KGE. 1 is right; above 1 the simulation swings too much. Medians over the gauges of each class.
The result is not the one the flood suggested. Over all gauges the unit hydrograph scores higher, 0.564 against 0.529, and the network is the better one at only 42% of them. Size decides. Below 1,000 km² the network loses: a small catchment's channels are crossed in a few hours, so a channel router passes the runoff on almost at once. Most of the real delay there happens before the water reaches a channel, on slopes and underground, and the router has no store for it. From 1,000 km² up the two are level, with the network slightly ahead.
The gauges of the widget and the figure, in numbers:
| Gauge | area (km²) | to outlet (km) | travel (days) | KGE | lag (days) | variability | |||
|---|---|---|---|---|---|---|---|---|---|
| UH | network | UH | network | UH | network | ||||
UH: unit hydrograph. To outlet: distance along the river to the end of the network at Düsseldorf. Travel: time a wave needs for that distance in the router. Variability: the variability ratio of the table above. Lag: the shift in days that gives the highest correlation with the observed flow; positive means the simulation is late, 0 is right.
On the Rhine itself the network run has the timing as right as the unit hydrograph or better, and at Andernach it removes a two-day delay. Its KGE is nevertheless lower at all six Rhine gauges, for the reason in the last two columns: the routed flow swings too much, with a variability ratio of 1.21 at Düsseldorf where the unit hydrograph has 1.03. Right in time, too high in the peak, as in January 2011. Among the large tributaries the network gains on the Moselle and is level with the unit hydrograph on the Neckar and the Main.
Why the network is not simply better
The network knows where the rivers are; the unit hydrograph is one curve per gauge. How can the curve win? Compare what each does with one day of runoff spread evenly over the whole basin.
The trained unit hydrograph is 7.1 days slow on average, times the 4.4 days that waves need in the channels, and it is still passing water three weeks after the rain. The Rhine's channels are not that slow. The curve was never only a model of the river. It was trained to make the simulated flow match the observed one, so it absorbed every delay the rest of the model lacks: water moving down slopes and through the ground, lakes, reservoirs, floodplains. It also smoothed a water balance that releases its runoff too abruptly, because during training nothing penalised runoff peaks that a slow curve would flatten anyway.
Now freeze that water balance and replace the slow curve by honest channel physics. The channels do their part correctly, and the missing delays and the abrupt runoff, which the curve used to hide, appear in the river: peaks arrive on time and too high. The experiment therefore does not show that a unit hydrograph routes better. It shows that parts of a model that were trained together cannot be swapped one at a time. A fair comparison trains the water balance with the network behind it.
Session 4 called a parameter effective when it stands for more than its name says. The unit hydrograph of a large basin is the same kind of thing: its name says "travel in the river", its value says "everything that delays water, plus whatever errors a delay can hide".
What channels alone cannot do
A channel router moves water downstream and flattens waves a little. It has three blind spots, and each has a recognisable signature at a gauge.
A lake
The Alpine Rhine flows through Lake Constance. At Neuhausen, just below the lake (11,887 km²), both simulations are 7 days early and vary 1.5 times as much as the observed flow; their KGE is 0.39 and 0.38. A lake is a very wide reach with a narrow exit. A flood that enters it raises the level only a little, and the outflow follows the level, so the river below the lake rises slowly and stays high for weeks. Models that handle this add a storage element with its own outflow rule at each lake and reservoir, such as the level-pool scheme of WRF-Hydro [2].
Dams
The White River (60,686 km² at Devalls Bluff, Arkansas; 780 reaches, 18 gauges) runs through a chain of large reservoirs: Bull Shoals (6.7 km³, built 1951) and Table Rock (4.3 km³, 1959) on the main river, Greers Ferry (3.5 km³, 1962) on a tributary, and others. Their operators hold floods back and release the water over the following months. The same network routing with map values turns a median KGE of 0.61 (unit hydrograph) into 0.19.

At the outlet the routed flow varies 2.3 times as much as the observed flow, and the largest simulated peak in the figure is about three times the observed one. Across the globe the effect of reservoirs on high flows is substantial and widespread [3]. A model without them is wrong below every large dam, however good its channels are.
A floodplain
The Rio Purus is a tributary of the Amazon (230,012 km² at Canutama, Brazil). It has no large dams, and still:

Every year the observed flow stops rising near 11,000 m³/s and stays there for months. That flat top is the river leaving its bed: above the bank level, extra water spreads over a forest floodplain many kilometres wide instead of going downstream, and drains back when the river falls. Both simulations are 10 days early and far too high (KGE 0.55 and 0.45), and the network is no better than the unit hydrograph because neither has the floodplain. Others have found the same on this river: a Muskingum–Cunge model without floodplains put the flood peak 19 days early at the lowest gauges of the Purus and the neighbouring Juruá, where a hydrodynamic model with floodplain storage was 1 to 5 days off [4]. Global models of the CaMa-Flood type add a floodplain store beside every reach for this reason [5].
| Storage the channel router lacks | Signature at a gauge below it | What a model needs |
|---|---|---|
| Lake | simulation early and too variable all year | a store with an outflow rule (level pool) |
| Reservoir behind a dam | simulated spikes where the river is flat; observed releases without rain | a store and an operating rule, or release data |
| Floodplain | observed flood with a flat top and a slow rise; simulation early and too high | overbank storage beside the channel |
Learning the routing by gradients
The router is a chain of additions and multiplications, so it is differentiable like the rest of dCREST (Session 12), and its numbers can be trained by gradient descent [6]. The White River was used to try this. The water balance stayed frozen. Only the routing was trained: for the river zone above each of the 18 gauges, three numbers. One multiplies the wave celerity of the zone's reaches, one shifts their flattening, and one sets the time constant of a small store placed before the channel. That makes numbers, trained with 200 steps of Adam, each on a stretch of the years 2012–2020 chosen at random, with the mean of 1 − KGE over the gauges as the loss. It took minutes on one CPU thread. The scores are for 2003–2011, years the training never saw.
Training lifts the network from 0.19 to 0.70: above the unit hydrograph as trained (0.61) and above the unit hydrograph re-fitted at each gauge on the same years with the same loss (0.68). At the outlet, below all the dams, the KGE goes from −0.35 to 0.79; it is the green line in the figure above. Gradients through a router work, and a few dozen routing numbers can be learned from gauges in about an hour.
Now look at what was learned. The celerity multipliers range from 0.05 to 2.5, with a median of 0.33, and 0.05 is the lowest value the training was allowed to use. A multiplier of 0.05 means waves times slower than the maps say: a flood wave that needs months for a stretch of river it really covers in days. The flattening was pushed to its maximum in most zones, and the small store, the one part meant to hold water back, was hardly used (median time constant 0.11 days). The training had no reservoir to work with, so it built one out of the only thing it had: very slow, very flat channels.
The trained router reproduces the White River's flow well, and its numbers are wrong as descriptions of the river. Use it to predict flow at these gauges under the dam operation of these years. Do not read wave speeds from it, do not expect it to hold if the dams are operated differently, and do not carry its numbers to a river without dams. This is equifinality (Session 11) between parts of a model: when a process is missing, training makes another part do its work.
Is it worth it?
Routing on a network costs more than a unit hydrograph, in computing and in data: it needs a river network with widths and slopes, and the runoff of every cell at every step. The Rhine, the White River and the nine catchments of Session 14 give a simple rule for when that pays.
| Your task | Use | Why |
|---|---|---|
| Flow at one gauge, from one rainfall number for the catchment | a unit hydrograph | With uniform runoff, a network adds up to one fixed curve (Session 14): on nine CAMELS catchments the two differ by at most 0.011 in NSE. The curve is trained with the model and costs nothing. |
| Many gauges in one river system; rain that differs across the basin; rivers above a few thousand km²; forecasts of when a crest reaches each town | a river network | One simulation serves every point on the river, and the travel time from each sub-basin is right (Moselle against Alps). Train the water balance with the network behind it. |
| Rivers with large lakes, dams or floodplains | a network with storage elements | Channels alone are early and too peaky there. Training the channels can hide this, at the price of wrong physics. |
The computing cost is smaller than one might expect, because this router does very little per reach and step. Measured on one machine (8 CPU threads; one NVIDIA RTX 4500 Ada Generation GPU):
| What is routed, hourly steps | reaches | sub-reaches | one simulated year, CPU | one simulated year, GPU |
|---|---|---|---|---|
| Unit hydrograph at 193 Rhine gauges (daily, for comparison) | – | – | 0.006 s | – |
| Rhine above Düsseldorf | 2,242 | 7,469 | 2.6 s | 5.5 s |
| All rivers of the globe | 1,887,504 | 5,854,832 | 3,616 s | 22 s |
The whole globe, 1,887,504 reaches in 1,608 rounds, takes 22 seconds per simulated year on the GPU and about hour on the CPU: billion sub-reach updates. For the Rhine alone the GPU is slower than the CPU, because each round holds too few reaches to keep it busy (Session 15). Compare the kinematic wave of EF5 in the FLASH system (Session 15) [7]: a 1-km grid of the conterminous United States at 5-minute steps needs up to about billion cell solves for one simulated day, each an iteration rather than one line of arithmetic. The two are built for different questions. A coarse network with hourly Muskingum–Cunge answers "how much water passes this town, and when" for every large river on Earth. A fine grid with short steps is needed where the answer changes within the hour, in flash floods on small catchments.
Training costs more than simulating. For one year of the Rhine on the CPU, the forward pass that keeps what the gradients need takes 4.6 s and the backward pass another 2.2 s. The larger cost is memory: every hourly state of every sub-reach has to be kept until the backward pass, 0.78 GB for that one year on the GPU. Scaled to the sub-reaches of the globe that is about GB, more than a GPU holds, so global training has to work on one river system or one stretch of time after another.
In Python
The network of this page as arrays: travel times by region, the two responses of the figure above, and the January flood at four gauges.
Check your understanding
The two runs use the same cell runoff. At Andernach the unit hydrograph is two days late over nine years and the network run is not. In December 2010 both are far too low. Which of these two errors is a routing error?
Only the first. The runs differ in nothing but routing, so a difference between them is a routing effect: the network gets the timing right there. An error they share, such as too little water in December, comes from the runoff, and no routing can repair it.
At Düsseldorf the network run is at least as well timed as the unit hydrograph, yet its KGE is lower (0.73 against 0.81). Why?
KGE also scores variability. The routed flow swings too much (variability ratio 1.21 against 1.03): its floods are too high. The water balance was trained behind a slow unit hydrograph that smoothed its abrupt runoff and stood in for delays on slopes, underground and in lakes. With channels only, those show.
Below Lake Constance both simulations are 7 days early. Would a lower wave celerity in the router be the right repair?
It would improve the score and be wrong. The delay comes from storage in the lake, whose outflow follows its level, not from slow waves in a channel. The right repair is a storage element with an outflow rule. Slowing the channels is what the training did on the White River.
On the White River the trained router beats every other variant, with celerity multipliers as low as 0.05. Name one use for which you would trust it and one for which you would not.
Trust it for daily flow at those gauges while the dams are operated as in the training years: it was scored on years it had not seen. Do not trust it for the travel time of a flood wave between two towns, for a change in dam operation, or on another river: its slow channels are a stand-in for reservoirs, not a property of the river.
Which routing would you choose for (a) daily flow at the outlet of a 2,000 km² catchment with one basin-average rainfall series, and (b) forecasts at thirty gauges along a large river, with rainfall on a grid?
(a) A unit hydrograph: with one rainfall number a network adds up to a single curve, and the curve is trained with the model at no cost. (b) A river network: one run gives every gauge, and water from each tributary arrives with its own travel time. If the river has large lakes, dams or floodplains, add storage elements for them.
What to remember
- Cells make runoff and reaches carry it. On the Rhine, routing with map values and nothing trained puts floods on the right days along the main stem, and makes their peaks too high.
- Over 193 gauges the trained unit hydrograph still scores slightly higher (0.56 against 0.53): it had absorbed delays and errors of the whole model. Parts trained together cannot be swapped one at a time.
- Channels alone cannot store water as lakes, reservoirs and floodplains do. Below them a channel router is early and too peaky.
- Routing can be trained by gradients (White River: 0.19 → 0.70), but the training will make channels stand in for missing storage. A good score is not a good explanation.
- One gauge and one rainfall number: a unit hydrograph. Many gauges, distributed rain, large rivers: a network, which costs 22 s per simulated year for the whole globe on a GPU.
The end of the special topic
Three sessions ago routing was one curve at the end of dCREST. Session 14 took the curve apart: a flood is a wave that travels and flattens, and the travel times of a whole river network add up to a unit hydrograph, which is why one curve is enough as long as one rainfall number is all the model knows. Session 15 laid out the methods as one family, from the full equations to a line of arithmetic per reach, and showed that their cost is set by the grid and the time step. This session put a network under a real river. It fixed what a network can fix, the timing along the river, and it exposed what had been hidden inside the curve: slopes, groundwater, lakes, dams and floodplains. The next step for a model like dCREST is clear from here: train the water balance and the river network together, and give the network the stores it lacks.
References
[1] Cunge, J. A.: On the subject of a flood propagation computation method (Muskingum method), Journal of Hydraulic Research, 7(2), 205–230, doi:10.1080/00221686909500264, 1969.
[2] WRF-Hydro v5.4 documentation, Model Physics (lake and reservoir routing), wrf-hydro.readthedocs.io/en/latest/model-physics.html.
[3] Zajac, Z., et al.: The impact of lake and reservoir parameterization on global streamflow simulation, Journal of Hydrology, 548, 552–568, doi:10.1016/j.jhydrol.2017.03.022, 2017.
[4] Paiva, R. C. D., Collischonn, W., and Buarque, D. C.: Validation of a full hydrodynamic model for large-scale hydrologic modelling in the Amazon, Hydrological Processes, 27, 333–346, doi:10.1002/hyp.8425, 2013.
[5] 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(4), doi:10.1029/2010WR009726, 2011.
[6] Bindas, T., et al.: Improving river routing using a differentiable Muskingum-Cunge model and physics-informed machine learning, Water Resources Research, 60(1), e2023WR035337, doi:10.1029/2023WR035337, 2024.
[7] 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.