Session 3 · Inside one day

Snow: the degree-day method

The first thing dCREST does each day is decide whether precipitation falls as rain or snow, and whether any stored snow melts. Snow matters because it holds water back: winter precipitation can reach the river weeks or months later. This session explains the two rules dCREST uses, runs them on a real Leaf River snowfall, and lets you move the river north to watch a full snowpack form and melt.

Time about 25 minutesNeeds Session 2
Watch this session first: a 6-minute narrated video with English subtitles. The page below goes further and lets you try each step yourself.

You will be able to

Where we are: the snow store is the first step of every day.

The snowpack as a store

A snowpack is measured by its snow water equivalent, SWE: the depth of water you would get by melting it. Fresh snow is mostly air, so 100 mm of fresh snow might hold only 10 mm of water. In the model, only the water counts, in millimetres, like every other store.

dCREST's snow step has two parameters:

The two rules

For a day with precipitation P and mean temperature T, and a snowpack SWE left from yesterday:

\[ S = \begin{cases} P, & T < \mathit{tsnow} \\ 0, & \text{otherwise} \end{cases} \qquad \text{rain} = P - S \]
\[ M = \min\!\Big(\mathit{SWE} + S,\;\; \mathit{ddf}\cdot\max(T - \mathit{tsnow},\,0)\Big) \qquad \mathit{SWE} \leftarrow \mathit{SWE} + S - M \]

The water that leaves the snow step and moves on to the canopy is \(L = \text{rain} + M\). Read the melt rule from the inside out. \(\max(T - \mathit{tsnow}, 0)\) is the number of degrees above the threshold, or zero on a cold day. Multiplying by ddf gives the melt the day's warmth could produce. The minimum stops the model from melting more snow than exists.

The degree-day method stands in for the full energy balance of a snowpack (sunshine, longwave radiation, wind, humidity) using air temperature alone, which is available almost everywhere. It works surprisingly well over weeks, because warm days are usually also sunny or windy days, and it needs only two numbers.

Leaf River values

Calibration gave the Leaf River tsnow = 0.82 °C and ddf = 6.50 mm/(°C·day). A day at 5 °C with a snowpack therefore melts up to \(6.50 \times (5 - 0.82) = 27.2\) mm of water. With these values, snow is about 1.0% of precipitation in 1989–1999, on about 0.9 days a year. With so few snow days, these two parameters are hard to pin down from the Leaf River's flow alone.

A real snowfall: January 1982

On 11 January 1982 Arctic air reached southern Mississippi, and the low at Collins was −15.6 °C. Over the next three days 32 mm of precipitation fell while the air stayed at or below freezing. Weather observers in the upper part of the basin measured fresh snow on the 14th: 51 mm deep at Bay Springs, 36 mm at Mize and 15 mm at Collins (depth of new snow, which holds much less water). The table runs the model from the start of the record (January 1980) with the Leaf River's parameters. The column Q all rain is the same model with the snow step switched off, so that every drop counts as rain.

datePT °Csnowfall Smelt MSWEQ modelQ all rainQ observed

The model calls all 32 mm snow and keeps it while the cold lasts. It melts the pack over 16–19 January, a little on each mild day. The river behaved the same way. With all that precipitation it hardly moved on 13–15 January (never above 0.66 mm/day), then rose to 1.50 mm/day on 18 January, after the thaw. The model gives 1.54 mm/day on that day. Without the snow step the storm reaches the river at once and peaks at 2.56 mm/day on 15 January, three days early. Over 12–21 January the snow step halves the error: the root-mean-square difference from the observed flow is 0.49 mm/day with it and 0.95 mm/day without. The fit is not perfect. The model's flow drops lower than the river's on 13–15 January, and it keeps too much water on 19–20 January, but it puts the rise on the right days.

When the rule misfires: February 1996

At the start of February 1996 a cold outbreak reached southern Mississippi. The table follows the snow step through those days with the Leaf River's parameters. Every number is computed in your browser by the model.

datePT °Csnowfall Srainmelt MSWEL = rain + MQ modelQ observed

After 0.9 mm of snow on 1 February, the model stores 34 mm of snow on 2 February (at −0.9 °C) and 8 mm more on the 3rd, building a pack of 43 mm. It holds that water until 7 February, when the temperature jumps to about 8 °C and the whole pack melts in one day. The real river did something different. It rose on 2 February (2.6 → 5.0 mm/day), reached 8.4 mm/day on the 3rd and stayed high until the 5th, while the model was holding the water as snow.

The weather stations show why. None of them measured any snowfall that week, and one reported sleet and glaze on 3 February. The precipitation fell as cold rain and freezing rain while the front came through, and the day's mean temperature was below the threshold only because the air behind the front was so cold. A threshold on the daily mean cannot see the order of events within a day. In January 1982 the cold came first and the rule was right. In February 1996 the rain came first and the rule was wrong, and a melt rule driven only by temperature then kept the water frozen until the air warmed up. In a warm climate like this one the error is short-lived. In a snowy climate the method still captures the main effect, which is storing winter precipitation until spring.

Move the Leaf River north

To see a full snow season, the widget subtracts a fixed number of degrees from every day's temperature and runs only the snow step through one water year. With every day 12 °C colder, about a third of water year 1990's precipitation falls as snow and a pack of more than 200 mm builds up: a real snow season, on real weather.

Try itThe snow step through one water year

Top: precipitation, coloured by how the model classifies it. Bottom: the snowpack (SWE) and daily melt. Things to try: raise ddf and watch the spring melt get shorter and sharper; raise tsnow and watch more of the winter's precipitation turn to snow.

What the method leaves out

dCREST v1.0 keeps the snow step deliberately simple. It has no correction for gauges catching too little snow, no liquid water held inside the pack, no "cold content" that must be warmed before melt begins, and no variation of snow cover across the catchment. Each of these exists in more detailed snow models such as Snow-17. In basins where snow dominates dCREST does fall behind the HBV model, but in the paper's tests replacing this snow step by Snow-17 did not close the gap. For the Leaf River none of this matters much.

Design note: a sharp threshold and gradients

Calibration (Session 11) adjusts the parameters by following gradients: how much the result changes when a parameter changes a little. The rain/snow decision is a switch. Moving tsnow by a tiny amount changes nothing unless a day's temperature lies exactly on the threshold, so the switch itself carries no gradient. The model can still learn tsnow from data, because tsnow also appears inside the melt rule, \(\max(T - \mathit{tsnow}, 0)\), which does respond smoothly. The package also contains a smooth version, degree_day_step_soft, that splits precipitation gradually over a band of temperatures. It is not the default, because it changes the results relative to the reference implementation and to the released calibration. Session 12 returns to switches and gradients.

In the code: src/dcrest/kernels/snow.py
def degree_day_step(swe, precip_mm, tair_c, tsnow, ddf, dt_hours=24.0):
    kd = dt_hours / 24.0
    cold = tair_c < tsnow
    snowfall = torch.where(cold, precip_mm, torch.zeros_like(precip_mm))
    rain = precip_mm - snowfall
    melt = torch.minimum(swe + snowfall,
                         ddf * kd * torch.clamp(tair_c - tsnow, min=0.0))
    swe = swe + snowfall - melt
    return rain + melt, swe

Every quantity is a tensor (PyTorch's name for an array of numbers) with one entry per catchment, so these seven lines process all catchments at once. torch.where is the switch, torch.clamp(…, min=0) is \(\max(\cdot, 0)\), and kd scales the daily rate to the time step (it is 1 for daily steps).

In Python

The same rules in plain Python, run on water year 1996 with every temperature lowered by 6 °C. Try changing shift, tsnow or ddf.

Check your understanding

A snowpack holds 20 mm. The day is 4 °C with 5 mm of precipitation. With tsnow = 0 °C and ddf = 3, what are S, M, the new SWE and L?

4 °C is above the threshold, so S = 0 and rain = 5 mm. Potential melt is \(3 \times (4 - 0) = 12\) mm, less than the 20 mm available, so M = 12. The new SWE is 8 mm and L = 5 + 12 = 17 mm.

Same day, but the pack holds only 7 mm. What changes?

The melt is limited by the pack: M = min(7, 12) = 7 mm, the pack disappears (SWE = 0), and L = 5 + 7 = 12 mm.

Can the snow step be the reason the model missed the flow of 2–5 February 1996, although snow is only about 1% of the Leaf River's precipitation in the model?

It can, on those particular days. A small long-term share does not mean a small effect on single events: on 2–3 February the model held 43 mm of water as snow, which is several days of flood flow. Over a whole year the error is small; on those days it is not.

Why does tsnow still receive a gradient although the rain/snow switch has none?

Because tsnow also enters the melt rule, \(\mathit{ddf}\cdot\max(T - \mathit{tsnow}, 0)\), which changes smoothly with tsnow on days with melt.

What to remember