Code for the paper "How sensitive are mountain glaciers to climate change?"
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Code for "How sensitive are mountain glaciers to climate change? Insights from a block model"

This repository contains the code for the paper "How sensitive are mountain glaciers to climate change? Insights from a block model" by Eviatar Bach, Valentina Radić, and Christian Schoof, 2018, published in the Journal of Glaciology.

The code is for computing response times and sensitivity to equilibrium line altitude (ELA) changes for mountain glaciers worldwide, using a block model with volume–area–length scaling and a piecewise linear mass balance profile.

All the code was written by Eviatar Bach. Licensed under the GNU Public License v3.0.

You can contact me with any questions at

Setup instructions

The easiest way to install the dependencies is with conda. After installing that and cloning this repository, the following instructions should get you a working local installation of the project.

  1. Install the dependencies using the conda environment: conda env create -f environment.yml
  2. Switch into the project environment: source activate glaciers
  3. You will need to install the R sensitivity package, since it is not installed with the conda environment. In either the command-line interface R or in RStudio, run install.packages("sensitivity"). This will download and compile the package.

That's it! Now you can run any of the files in the repository (see Description of files below). The serialized data files are included, so you do not have to run the load_*.py files. If you want to, see below.

Data sources

Except for the glacier thickness estimates, the other data must be downloaded and extracted as described to allow the data loading to work.

Libraries used

Description of files

  • contains various constants, including the scaling constant, uncertainty values for different parameters, and functions for computing equilibrium volumes
  • environment.yml: conda environment for the project
  • contains the functions for calling the R library sensitivity to compute the Hilbert--Schmidt independence criterion
  • interpolates volumes and lengths for glaciers that are missing them. Notably, these are interpolated for all the glaciers in Alaska and Southern Andes, due to a mismatch in numbering between the Randolph Glacier Inventory 5.0 and the Huss & Farinotti data
  • load climate data to be used for estimating mass-balance gradients
  • calls all the other data-loading scripts in the correct order. Running this will load and serialize all the data necessary for running the model.
  • load geometry data from the RGI and Matthias Huss's thickness estimates
  • estimates mass-balance gradients for all glaciers in the data set. The variables used in the regression are specified at the top of the file, and were selected using
  • estimate mass-balance gradients for glaciers that have mass-balance data provided by WGMS
  • generates Figure 6 in the paper
  • generates Figures 3 (center) and 3 (right) in the paper
  • generates Figure 3 (left) in the paper
  • sets plot font configuration. If you do not have the Optima font, comment out line 15.
  • generates Figure 2 in the paper
  • generates Figure 5 in the paper
  • generates Figure 4 (left) in the paper
  • generates Figure 7 in the paper
  • generates Figure 4 (right) in the paper
  • calculates the correlations between regional mean quantities and the regional sensitivities and response times
  • functions for finding equilibrium values of the model
  • sampling functions for use with the HSIC analysis
  • compute the sensitivities and response times for all glaciers in the data set
  • finds the set of variables to use for predicting mass-balance gradients
  • verify_derivation.nb: a Mathematica notebook for verifying the derivation of the nondimensionalized equation