2.4. Point operations: a snow melt model

2.4.1. Precipitation and temperature

In this exercise you will use the dataset introduced in the visualisation section to build a simple spatial hydrological model, including rainfall, snowfall, snowmelt, and runoff.

Open dynamicTimeSeries.py created in the previous exercises, save it under a new name, temp.py. It reads the precipitation timeseries from disk. Add a statement that reads the temperature timeseries temp.tss from disk and assigns the temperature values (degrees celcius) to the map variable temperatureObserved. Write the results to disk, run the model, and have a look at the output.


Question: Which function did you use to read the temperature from disk?

  1. open
  2. timeinputscalar
  3. timeinputnominal
  4. timeinput
  5. report

The temperature timeseries contains the temperature observed at a meteostation that is close by. However, temperature will be spatially variable, as it depends on the surface elevation. The temperature ti at a grid cell i can be calculated as:

ti = tobs - l (ei - eobs)

In the equation, tobs is the temperature observed at the meteostation, ei is the elevation at a grid cell, eobs is the elevation at the meteo station (here: 2058.1 m) and l is the temperature lapse rate (here: 0.005).

Add statements to your script temp.py to calculate a map (call it temperatureCorrection) containing the term l (ei - eobs). Write the map to disk and check the results.


Question: Where did you add the statements to calculate temperatureCorrection?

  1. In the __init__.
  2. In the initial.
  3. In the dynamic.
  4. In the initial and in the dynamic


Question: How much colder is it at the highest point in the area compared to the temperature at the meteostation (i.e., at 2058.1 m)?

  1. About 2 degrees.
  2. About 12 degrees.
  3. About 7 degrees.
  4. There is no difference.

As a next step, calculate and write to disk a time series of maps containing ti. Save the script (temp.py), run and display the new output.

We assume that precipitation falls as snow when tiis below zero. Add statements to calculate and store a time series of maps (use the variable name freezing) that is True at a cell if the temperature is below zero degrees and False elsewhere. Use a comparison operator. Run the script and check the results.

Create two time series of maps containing respectively snowfall (m/day, variable name snowFall) and rainfall (m/day, variable name rainFall). You will need the operations ifthenelse and a Boolean operator. Write them to disk and display the results.


Question: Which comparison operator did you use, and where?

  1. ==, in the dynamic
  2. or, in the dynamic
  3. while`, in the ``initial
  4. > or < or >= or <=, in the dynamic

2.4.2. The snow store

To simulate snow melt in each cell, a snow store is used containing a snow pack ai(t) (m water equivalent) that changes over time:

ai(t) = ai(t-1) + si(t) - bi(t)

In the equation, (t) refers to the current time step and (t-1) to the previous time step (day). The variable si(t) is snowfall and bi(t) is snowmelt. Actual snowmelt bi(t) is modelled as:

bi(t) = min(ai(t), bp,i(t))

with, bp,i(t), potential snowmelt. Potential snowmelt is:

bp,i(t) = mti, for ti > 0

bp,i(t) = 0, for ti <= 0

with m, a degree day factor (here: 0.01).

Add this snow store in a stepwise manner to the model, in the following way. Let’s first assume there is no snow melt. Open temp.py and save it as snow.py. Add the variable snow representing the snow store ai, assuming there is no snow at the start of the model run (as it is end of summer), and increasing the snowstore with snowfall in each time step.


Question: Without snow melt (as was assumed here), what is the maximum snowpack thickness (m water equivalent) found in the area at the end of the model run? Idem, the minimum thickness?

  1. Maximum thickness: 0.11 m, minimum: 0.01 m
  2. Maximum thickness: 1.12 m, minimum: 0.15 m
  3. Maximum thickness: 0.85 m, minimum: 0.00 m
  4. Maximum thickness: 1.96 m, minimum: 0.62 m
  5. Maximum thickness: 0.57 m, minimum: 0.01 m

Add snowmelt to the model. First, calculate a variable potentialMelt, containing bp,i(t). Write to disk and check the results. Second, calculate actual snowmelt bi(t). Check the results.


Question: How did you calculate actual snowmelt?

  1. It is equal to the potential snow melt in this case.
  2. It is a fraction of the potential melt.
  3. It depends on the potential melt and the actual snow thickness.
  4. It is constant, so it needs to be calculated in the initial.

And as the third step, update the snow store by subtracting actual snowmelt from the store. Write the snow store to disk (directly after subtracting actual snowmelt). Save the model under the same name snow.py.


Question: From what time step on is the main valley in the top-right corner snow-free, in spring? Idem, for the valley in the top-left corner?

  1. Top-right corner: day 128. Top-left corner: day 130.
  2. Top-right corner: day 110. Top-left corner: day 110.
  3. Top-right corner: day 112. Top-left corner: day 140.
  4. Top-right corner: day 92. Top-left corner: day 118.

2.4.3. Runoff generation

Runoff generated in each cell (m/day) is the sum of the rainfall in that cell and the snowmelt. Add a statement to snow.py calculating a time series of maps containing the total amount of runoff generated. Write results to disk and evaluate the results.


Question: In what time of the year is the largest amount of runoff generated?

  1. Melting snow generates a large amount of runoff around time step 70.
  2. Melting snow generates a large amount of runoff around time step 90.
  3. Melting snow generates a large amount of runoff around time step 110.
  4. Melting snow generates a large amount of runoff around time step 130.