Florian Herla, Simon Horton, Patrick Mair, and Pascal Haegeli
Geoscientific Model Development, 14, 239–258, https://doi.org/10.5194/gmd-14-239-2021
Publication year: 2021

This is an Open Access article accessible to everybody. Click here to download a copy.


Snowpack models simulate the evolution of the snow stratigraphy based on meteorological inputs and have the potential to support avalanche risk management operations with complementary information relevant to their avalanche hazard assessment, especially in data-sparse regions or at times of unfavorable weather and hazard conditions. However, the adoption of snowpack models in operational avalanche forecasting has been limited, predominantly due to missing data processing algorithms and uncertainty around model validity. Thus, to enhance the usefulness of snowpack models for the avalanche industry, numerical methods are required that evaluate and summarize snowpack model output in accessible and relevant ways. We present algorithms that compare and assess generic snowpack data from both human observations and models. Our approach exploits Dynamic Time Warping, a well-established method in the data sciences, to match layers between snow profiles and thereby align them. The similarity of the aligned profiles is then evaluated by our independent similarity measure based on characteristics relevant for avalanche hazard assessment. Since our methods provide the necessary quantitative link to data clustering and aggregating methods, we demonstrate how snowpack model output can be grouped and summarized according to similar hazard conditions. Through emulating a human avalanche hazard assessment approach, our methods aim to promote the operational application of snowpack models so that avalanche forecasters can begin to build understanding in how to interpret and when to trust operational snowpack simulations.

DTW Snow Profile Alignment App

If you cannot see the app in the frame below, please click here to access it.


Dynamic Time Warping can be used to automate the alignment of two snow profiles. We call those two profiles query and reference. A first intermediate step is to compute the alignment maps that link layers in the query profile to layers in the reference profile (drawn in dashed gray lines between the corresponding layers – every line corresponds to one layer). With the aid of those alignment maps, the query profile can be warped and then represented as the warped query. The warped query contains all layer information of the query, but its layers have been stretched and compressed to match the corresponding reference height. In a second step, the alignment maps are exploited to compute a similarity measure between the profiles. This measure is a scalar value that represents the similarity between the two profiles while taking into account the structural stratigraphy of the snowpack.

Both the alignment maps and the similarity measure serve as the basis for snow profile aggregation and clustering: A group of profiles will be aligned to compute the group’s representative profile, whereas the similarity measure can be used to distinguish between different groups. As the method can be applied to both modeled and human profiles, future application cases can be, e.g. (i) aggregating human observations, (ii) evaluating modeled snowpack summaries against human observations.


  1. Load profiles (examples provided, or upload your own files: meaningful profile pairs are from the same date, but from different locations, or from the same location, but at different dates)
  2. Examine the alignment maps, the warped query, the similarity measure, the cost density and the warping path of the profiles using the default configuration
  3. Play with different settings if necessary: e.g.
    • Scale profiles to equal height – counterproductive when the two profiles are from different dates
    • Open End alignments for when either the topmost or lowermost layers are different
    • Bottom-up alignments for profiles with the same early season meteorological forcing
    • Top-down alignments for profiles with a different early season meteorological forcing
    • Warping window: do you want to increase the search window for corresponding layers? Contrarily, a warping window of zero (for resampled profiles) corresponds to a rigid lockstep comparison of the layers.
    • Local slope constraint: P = 1 corresponds to a local layer stretching/compression limit of a factor of 2; this setting is preferred for overall comparisons between the two profiles (default). P = 2 allows for less warping than P = 1. unconstrained corresponds to unlimited local stretching and compression; often superior if the question is whether a specific signature layer is apparent in the query profile. Also, this setting is often superior in conjunction with profiles that are not resampled. However, in most cases, unconstrained warping yields unrealistic warped profiles.
    • Weights: do you want to base the alignment predominantly on one layer characteristic?
    • Add date information to the calculation of the alignment: see special paragraph below.
    • Similarity assessment method: With updated versions of our package, we have implemented different approaches to compute the similarity measure between snow profiles. 
      1. Herla et al (2021): the method described in our paper, which divides the grain types into grain type classes (new snow, weak layers, crusts, bulk layers) and averages the scores from each class.
      2. Layerwise computes the similarity measure without grain type classes, but purely based on the layerwise comparison of the aligned profiles. In that case, thin layers influence the measure less than thick layers.
      3. TSA detection: this method is similar to Herla et al (2021), but weak layers are classified based on the structural stability lemons. To compute the lemons, the profiles need to contain grain size information.
      4. RTA scaling: this method takes the layerwise comparison of the aligned profiles and scales each layer with the relative threshold sums (relative lemons). Therefore, the more structurally weak layers appear, the more strongly they influence the overall similarity measure.

Date information

Checking the date checkbox will allow to configure how strongly the alignment is supposed to be based on the date information in relation to the grain type and hardness information. The choice of those weights is heavily dependent on the profiles at hand: A small spatial scale will allow to use date information alone, as the same meteorological processes are happening at the same time. However, the larger the spatial scale, the more importance may be given to the structural stratigraphy. Additionally to the weights, the date normalization factor needs to be specified: For example, a value of 3 indicates that two layers that have been formed with a delay of three days, are as different as two grain types that have a similarity of zero. In other words, that factor can be interpreted as the meteorological delay that is anticipated between the two locations of the profiles.

Also note, that

  • not all layers need an associated date in order to use that information. Check out the example Human vs modeled: the date information is only available for one specific layer – check Label deposition date
  • if only a few layers are labeled with their date tags, it can improve the alignment to untick the checkbox “Apply a layer weighting scheme for preferential layer matching”.
  • aligning profiles from the same location at different dates requires at least a few known layer dates in order to yield meaningful results. An alignment that is purely based on grain type and hardness usually breaks down after a new storm snow undergoes some sort of metamorphosis.
  • the similarity measure can not be used to find the best alignment configuration as soon as date information is included in the calculation of the alignment.


For any questions about the snow profile alignment app and its application, please contact Florian Herla at florian_herla@sfu.ca.