Routing: reservoir and unit hydrograph
The soil and the aquifer decide how much water leaves the land each day. Routing decides when it passes the gauge. Water generated in the far corners of the Leaf River's 1924 km² needs days to travel down the channels, so a storm's runoff arrives spread out over the following week. This session covers the three steps that do this: the fast reservoir, the loss fraction and the unit hydrograph.
You will be able to
- step the fast reservoir and say what qc does;
- explain the loss fraction lf;
- build the gamma unit hydrograph from nshape, kmult and the catchment area;
- compute river flow as a convolution of daily runoff with the unit hydrograph.
The fast reservoir
Overland flow from the soil step (Session 6) first enters a store, the fast reservoir, holding Fs mm. Each day it releases a fixed fraction qc of what it holds:
This is the linear reservoir of Session 2. For the Leaf River qc = 0.659 per day: 66% of a day's overland flow leaves the same day, 22% the next day and 8% the day after. The minimum guards against releasing more than the store holds, which could only happen with a time step longer than a day.
Losses
The three outflows are added up and a fixed fraction lf is removed:
\(r\) is the day's runoff, ready to be routed to the gauge. The loss represents water that leaves the catchment without passing the gauge, such as deep groundwater flowing under the river or water withdrawn for use. Like other parameters it is effective. It also absorbs systematic errors in the forcing, for example rainfall estimates that are slightly too high. For the Leaf River lf = 0.108: about 11% of runoff, 60 mm per year over 1989–1999, is removed.
The unit hydrograph
Suppose 10 mm of runoff is generated across the catchment on one day. Water produced next to the gauge passes it within hours; water from the headwaters takes days. The share of the day's runoff that passes the gauge 0, 1, 2, … days later is the catchment's unit hydrograph: the river's response to one unit of runoff. dCREST uses a gamma distribution for it, a curve that rises quickly and then decays slowly:
\(w_i\): share of a day's runoff passing the gauge \(i\) days later. \(\Delta t\) = 24 h. Each day is represented by its midpoint, \(i + \tfrac12\). The weights are normalised to sum to exactly 1, so no water is lost or gained.
The shape is set by \(n\) = nshape: for the same time scale, larger values give a later and broader response (and a more symmetric one). The time scale \(k\) (hours) comes from the catchment's size, scaled by kmult:
\(k_g\) is a rule of thumb: larger catchments respond more slowly, roughly with area to the power 0.38. It makes kmult a dimensionless correction that can be compared between catchments of different sizes. For the Leaf River, \(A\) = 1924 km² gives \(k_g\) = 10.8 h. With kmult = 1.83, \(k\) = 19.7 h and, with \(n\) = 2.74, the weights are:
| days after | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
|---|---|---|---|---|---|---|---|---|
| share \(w_i\) | 17.3% | 34.6% | 24.8% | 13.1% | 6.0% | 2.5% | 1.0% | 0.4% |
So the peak of a storm's runoff passes the gauge the day after it is generated, and most has passed within four days.
\(k\) has a floor: it cannot be shorter than 1 hour. An earlier version set the floor at half a day. Because \(\mathit{kmult}\cdot k_g\) is shorter than 12 hours in most CAMELS catchments, the floor was active almost everywhere, and kmult had no effect at all on the result: the model could not be calibrated in that parameter, yet nothing in the scores showed it. The gradients exposed it (Session 12), and v1.0 lowered the floor to 1 hour.
River flow is a convolution
Each day's runoff is spread over the following days by the same weights, and the river flow on any day is the sum of the shares arriving from all earlier days:
This operation is called a convolution. Step through it below on the days around the 27 August 1992 storm.
Shape the response
def gamma_uh(nshape, kscale_h, *, nstep=30, dt_hours=24.0, kmin_h=None, eps=1e-6):
n = torch.clamp(nshape, min=0.5, max=12.0)
kmin = dt_hours * 0.5 if kmin_h is None else kmin_h # the old floor was dt / 2
k = torch.clamp(kscale_h, min=kmin)
t = (torch.arange(nstep, dtype=n.dtype, device=n.device) + 0.5) * dt_hours
tt = t[:, None] / k[None, :]
logw = (n[None, :] - 1.0) * torch.log(tt + eps) - tt - torch.lgamma(n[None, :])
w = torch.exp(logw)
return w / torch.clamp(w.sum(0, keepdim=True), min=eps)
# model.py, after the daily loop has produced runoff for every day:
weights = gamma_uh(params["nshape"], lag * params["kmult"], nstep=cfg.uh_nstep,
dt_hours=cfg.dt_hours, kmin_h=cfg.uh_kmin_h)
discharge = convolve_uh(runoff, weights)
Routing comes after the daily loop, because it does not feed back into any store. The whole runoff series is convolved in one pass, which on a GPU is a single grouped convolution over all catchments. The weights are computed in log space for numerical safety.
In Python
Check your understanding
The fast reservoir holds 4 mm, receives 6 mm of overland flow, and qc = 0.5. What is released and what remains?
It first holds 10 mm, releases \(0.5 \times 10 = 5\) mm, and keeps 5 mm.
Runoff is 10 mm today and zero on all other days. With the Leaf River's weights, what is the river flow tomorrow?
\(10 \times w_1 \approx 10 \times 0.346 \approx 3.5\) mm/day.
Why does a larger catchment get a larger time scale \(k_g\)?
Water has further to travel to the outlet, so the response is slower and more spread out. The rule \(k_g \propto A^{0.38}\) captures this on average.
Can the unit hydrograph create or destroy water?
No. The weights sum to 1, so every millimetre of runoff eventually passes the gauge; routing only changes when. (Water still "in transit" at the end of a simulation has not yet arrived.)
What to remember
- Overland flow is delayed by a linear reservoir releasing a fraction qc per day.
- The three outflows are summed and reduced by the loss fraction lf.
- A gamma unit hydrograph with shape nshape and time scale \(\max(\mathit{kmult}\cdot k_g, 1\ \text{h})\) spreads each day's runoff over 30 days: the same day and the 29 after it.
- River flow is the convolution \(Q_t = \sum_i w_i r_{t-i}\), computed once after the daily loop.