2.6. Calculating descriptive statistics: the snow melt model

2.6.1. Over the spatial domain

For analysis or application of model outputs, it is often needed to calculate statistical values (e.g., mean, maximum value) over regions or time periods. We focus first on regions.

Display the map skiregio.map. It contains two skiing regions in the study area.

Open the script runoff.py and save as ski.py. For evaluation of the regions for possibilities for skiing, calculate the average snowpack (m water equivalent) in each of these regions, for each time step. Use the function areaaverage. Write the results to disk and display. Plot a time series (right-click on the legend) and click on one of the regions to get the time series for that particular region.


Question: Which of the two regions has in general the largest amount of snow?

  1. Region 1.

  2. Region 2.


Although average snow pack is important, it is more important that the snowpack thickness is above a certain threshold required for skiing. Calculate for each time step:

  • A map of the study area that is True at cells with a snowpack that is thicker than 0.2 m (water equivalent thickness), and

  • A map with the proportion (a value between zero and one) of each area that has a snowpack that is thicker than 0.2 m.

For the second step, convert the map created in the first step to scalar data type using scalar. Now you can use it in an areatotal function. To get the fraction, you need the number of cells for each region, which can be calculated by:

areaarea(skiregio.map)/cellarea()

Store under the same filename ski.py and run.


Question: Compare the two regions by plotting timeseries. For approximately how many days is each region fully covered with a snow pack that is sufficiently thick for skiing ?

  1. Based on the results we can conclude that there is never sufficient snow in both areas.

  2. 5 days.

  3. 10 days.

  4. 40 days.


2.6.2. Over time

It is also possible to calculate statistics over time.

Calculate a map with the maximum snowpack thickness (water equivalent) over time. Use the function max. Add the required statements to ski.py.


Question: What is the maximum snow thickness in the bottom right corner cell?

  1. 0.30 m

  2. 0.91 m

  3. 0.27 m

  4. 1.90 m