Configuration File#
PyGEM’s configuration file (~/PyGEM/config.yaml) is where the user is able to specify the glaciers to model, choose model parameterizations and calibration options, specify relative filepaths and filenames for the model to function, and specify other model details and constants. The configuration settings are loaded to PyGEM as a dictionary object.
Warning
The only configuration setting a user must modify before running PyGEM is the root data path. Most other common parameter settings can be passed to PyGEM’s operational scripts as command-line arguments.
The configuration is loosely organized to have the most frequently changed items at the top of the file, while also separating the file into organized chunks/keys. The general organization (by primary dictionary key) is:
root: root filepath - all other input and ouput filepaths are relative to this
user: user information
setup: glacier selection
oggm: OGGM settings
climate: climate data and time periods
calib: calibration options
sim: simulation options
mb: mass balance model options
rgi: RGI glacier data
time: model time period details
constants: model constants
debug: debugging options
Note
config.yaml is heavily commented, so this information should hopefully be clear when modifying variables within the file itself.
General Formatting Rules#
Boolean values: Either
trueorfalseExponential values: Should be formatted as
##.#e+#(e.g.,1.2e+3for 1200)Infinity values: Represented as
.infor-.infNull values: Represented as
null(imported asNonein Python)Lists: Indicated with a
-before each item
Root Path#
Variable |
Type |
Comment/Note |
|---|---|---|
|
|
Base path for input and output data. Must be modified to the appropriate location. |
User Information#
Variable |
Type |
Comment/Note |
|---|---|---|
|
|
User’s name |
|
|
Institution name |
|
|
Contact email |
Note
The user information is strictly for bookkeeping purposes. This information is stored within each model output file.
Glacier Selection#
Variable |
Type |
Comment/Note |
|---|---|---|
|
|
List of RGI order 01 region numbers to include |
|
|
List of RGI order 02 subregion numbers to include, or |
|
|
Glacier numbers to skip |
|
|
List of RGI glacier numbers (e.g., |
|
|
Minimum glacier area (km\(^{2}\)) threshold |
|
|
Include land-terminating glaciers |
|
|
Include lake-terminating glaciers |
|
|
Include marine-terminating glaciers |
|
|
Ignore calving and treat tidewater glaciers as land-terminating |
Warning
Set glac_no will always overwrite the rgi regions, so if you want to use the rgi region options, then set glac_no=None
OGGM Settings#
Variable |
Type |
Comment/Note |
|---|---|---|
|
|
URL for OGGM glacier directories |
|
|
Log level ( |
|
|
Border size (options: |
|
|
Relative path to OGGM glacier directories |
|
|
Overwrite glacier directories if they exist |
|
|
Model has internet access to download data from OGGM’s server |
Climate Data and Time Periods#
Variable |
Type |
Comment/Note |
|---|---|---|
|
|
Historical reference climate dataset (e.g. |
|
|
Reference period start year (inclusive, default is |
|
|
Reference period end year (inclusive, default is |
|
|
Reference period year type ( |
|
|
Climate dataset used for simulations (can be reference climate or GCM, e.g. |
|
|
Climate emission scenario (e.g. |
|
|
Start year for model simulation (inclusive, e.g. |
|
|
End year for model simulation (inclusinve, e.g. |
|
|
Year type ( |
|
|
Number of years from |
|
|
Relative filepaths, filenames and variable names for climate datasets (relative to |
Note
ref (short for ‘reference’) refers to the calibration period (will typically vary between 1980-present). sim (short for ‘simulation’) refers to simulation period.
Calibration Options#
Variable |
Type |
Comment/Note |
|---|---|---|
|
|
Calibration option ( |
|
|
Prior distribution of regional model parameters (specify filename, relative to |
HH2015 Parameters#
Variable |
Type |
Comment/Note |
|---|---|---|
|
|
Initial temperature bias [K] |
|
|
Temperature bias step size [K] |
|
|
Initial precipitation factor [-] |
|
|
Lower bound for precipitation factor [-] |
|
|
Upper bound for precipitation factor [-] |
|
|
Initial degree-day factor for snow [mm w.e. d\(^{-1}\) K\(^{-1}\)] |
|
|
Lower bound for degree-day factor for snow [mm w.e. d\(^{-1}\) K\(^{-1}\)] |
|
|
Upper bound for degree-day factor for snow [mm w.e. d\(^{-1}\) K\(^{-1}\)] |
HH2015mod Parameters#
Variable |
Type |
Comment/Note |
|---|---|---|
|
|
Initial temperature bias [K] |
|
|
Temperature bias step size [K] |
|
|
Initial precipitation factor [-] |
|
|
Lower bound for precipitation factor [-] |
|
|
Upper bound for precipitation factor [-] |
|
|
Initial degree-day factor for snow [mm w.e. d\(^{-1}\) K\(^{-1}\)] |
|
|
SciPy optimization scheme (‘SLSQP’ or ‘L-BFGS-B’) |
|
|
Parameters to optimize (e.g., ‘tbias’, ‘kp’) |
|
|
Tolerance for SciPy optimization scheme |
|
|
Epsilon for SciPy optimization scheme (e.g., 1e-6) |
Emulator Parameters#
Variable |
Type |
Comment/Note |
|---|---|---|
|
|
Number of simulations to develop the emulator |
|
|
Whether to overwrite emulator simulations |
|
|
Option to also perform HH2015_mod calibration using emulator |
|
|
Temperature bias step size [K] |
|
|
Initial temperature bias [K] |
|
|
Initial precipitation factor [-] |
|
|
Lower bound for precipitation factor [-] |
|
|
Upper bound for precipitation factor [-] |
|
|
Initial degree-day factor for snow [mm w.e. d\(^{-1}\) K\(^{-1}\)] |
|
|
Option to keep area constant or evolve |
|
|
Temperature bias distribution type (‘truncnormal’, ‘uniform’) |
|
|
Temperature bias standard deviation [K] |
|
|
Precipitation factor gamma distribution alpha [-] |
|
|
Precipitation factor gamma distribution beta [-] |
|
|
Degree-day factor for snow distribution type (‘truncnormal’) |
|
|
Degree-day factor for snow mean [mm w.e. d\(^{-1}\) K\(^{-1}\)] |
|
|
Degree-day factor for snow standard deviation [mm w.e. d\(^{-1}\) K\(^{-1}\)] |
|
|
Lower bound for degree-day factor for snow [mm w.e. d\(^{-1}\) K\(^{-1}\)] |
|
|
Upper bound for degree-day factor for snow [mm w.e. d\(^{-1}\) K\(^{-1}\)] |
|
|
SciPy optimization scheme (‘SLSQP’ or ‘L-BFGS-B’) |
|
|
Parameters to optimize (e.g., ‘tbias’, ‘kp’) |
|
|
Tolerance for SciPy optimization scheme |
|
|
Epsilon for SciPy optimization scheme |
MCMC Parameters#
Variable |
Type |
Comment/Note |
|---|---|---|
|
|
Switch to emulator instead of full mass balance model |
|
|
Number of emulator simulations |
|
|
Temperature bias step size [K] |
|
|
Small temperature bias step size [K] |
|
|
Option to keep area constant or evolve |
|
|
MCMC step size (in terms of standard deviation of each parameters prior distribution) |
|
|
Number of MCMC chains (min 1, max 3) |
|
|
Number of MCMC steps |
|
|
Percentage of steps to burn-in (0 records all steps) |
|
|
Thin interval for reducing file size |
|
|
Degree-day factor for snow distribution type (‘truncnormal’, ‘uniform’) |
|
|
Degree-day factor for snow mean [mm w.e. d\(^{-1}\) K\(^{-1}\)] |
|
|
Degree-day factor for snow standard deviation [mm w.e. d\(^{-1}\) K\(^{-1}\)] |
|
|
Lower bound for degree-day factor for snow [mm w.e. d\(^{-1}\) K\(^{-1}\)] |
|
|
Upper bound for degree-day factor for snow [mm w.e. d\(^{-1}\) K\(^{-1}\)] |
|
|
Precipitation factor distribution type (‘gamma’, ‘lognormal’, ‘uniform’) |
|
|
Temperature bias distribution type (‘normal’, ‘truncnormal’, ‘uniform’) |
|
|
Temperature bias mean [K] |
|
|
Temperature bias standard deviation [K] |
|
|
Lower bound for temperature bias [K] |
|
|
Upper bound for temperature bias [K] |
|
|
Precipitation factor gamma distribution alpha [-] |
|
|
Precipitation factor gamma distribution beta [-] |
|
|
Precipitation factor lognormal distribution mean [-] |
|
|
Precipitation factor lognormal distribution tau [-] |
|
|
Precipitation factor normal distribution mean [-] |
|
|
Precipitation factor normal distribution standard deviation [-] |
|
|
Lower bound for precipitation factor [-] |
|
|
Upper bound for precipitation factor [-] |
Calibration Datasets#
Variable |
Type |
Comment/Note |
|---|---|---|
|
|
Path to Hugonnet (2021) mass balance data (relative to |
|
|
Filename for Hugonnet (2021) mass balance data |
|
|
Filename for corrected Hugonnet (2021) mass balance data |
|
|
Path to OIB lidar surface elevation data (relative to |
|
|
Elevation rebinning interval [meters] |
|
|
Pixel count percentile filter (filters out any data from each survey where the pixel count for a given bin is below the specified threshold) |
|
|
Path to frontal ablation data (relative to |
|
|
Filename for frontal ablation calibration data |
|
|
Path to reference ice thickness data (relative to |
Ice Thickness Calibration#
Variable |
Type |
Comment/Note |
|---|---|---|
|
|
Regional glacier area fraction used for ice thickness calibration (e.g., 0.9 means the largest 90% of glaciers by area) |
Simulation Options#
Variable |
Type |
Comment/Note |
|---|---|---|
|
|
Glacier dynamics scheme ( |
|
|
Bias adjustment option ( |
|
|
Number of simulations to run. Default is 1. More than 1 simulation can be run for glaciers that have been calibrated using the |
Output Options#
Variable |
Type |
Comment/Note |
|---|---|---|
|
|
Output statistics ( |
|
|
Export all simulation results (for |
|
|
Export extra variables (temperature, precipitation, melt, etc.) |
|
|
Export binned ice data |
|
|
Export mass balance components |
Dynamics#
Variable |
Type |
Comment/Note |
|---|---|---|
|
|
Time step threshold [seconds] |
|
|
Time step threshold for marine-terimating glaciers [seconds] |
|
|
Use regionally averaged glen_a creep paremeter |
|
|
Path to comma-separated value file containing regionally averaged |
|
|
Oerlemans sliding parameter |
|
|
glen_a multiplier if not using regionally calibrated glen_a |
|
|
advancing glacier ice thickness change threshold (if not running OGGM dynamics) |
|
|
glacier elevation range considered terminus, used to size advancing new bin (if not running OGGM dynamics) [%] |
Model Parameters#
Variable |
Type |
Comment/Note |
|---|---|---|
|
|
Use constant or variable lapse rate |
|
|
Precipitation factor [-] |
|
|
Temperature bias [K] |
|
|
Snow degree-day factor [mm w.e. d\(^{-1}\) K\(^{-1}\)] |
|
|
Ratio of snow to ice degree-day factor [-] |
Mass Balance Model Options#
Variable |
Type |
Comment/Note |
|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
Path to debris dataset (relative to |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Month number in which refreezing is reset to zero each year ( |
|
|
Number of refreezing layers (default is 8) |
|
|
Layer thickness [m] |
|
|
Number of time steps for numerical stability |
|
|
Critical melt amount to initialize refreezing [m w.e.] |
|
|
Additional refreeze water fraction for bare ice |
|
|
Snow density at surface [kg m\(^{-3}\)] |
|
|
Snow density at bottom refreezing layer [kg m\(^{-3}\)] |
|
|
Refreezing limit option |
RGI Glacier Data#
Variable |
Type |
Comment/Note |
|---|---|---|
|
|
Filepath for RGI files (relative to |
|
|
Name of latitude column |
|
|
Name of longitude column (360-based) |
|
|
Name of elevation column |
|
|
Name of glacier index column |
|
|
Name of glacier ID column |
|
|
Name of floating-point glacier ID column |
|
|
Columns to drop from RGI dataset |
Model Time Period Details#
Variable |
Type |
Comment/Note |
|---|---|---|
|
|
|
|
|
Start date (MM-DD), used with custom calendars |
|
|
End date (MM-DD), used with custom calendars |
|
|
Water year start month |
|
|
First month of winter |
|
|
First month of summer |
|
|
Time step (currently only |
Model Constants#
Variable |
Type |
Comment/Note |
|---|---|---|
|
|
Density of ice [900 kg m\(^{-3}\)] |
|
|
Density of water [1000 kg m\(^{-3}\)] |
|
|
Thermal conductivity of ice [2.330 J s\(^{-1}\) K\(^{-1}\) m\(^{-1}\)] |
|
|
Thermal conductivity of air [0.023 J s\(^{-1}\) K\(^{-1}\) m\(^{-1}\)] |
|
|
Volumetric heat capacity of ice [1890000 J K\(^{-1}\) m\(^{-3}\)] |
|
|
Volumetric heat capacity of air [1297 J K\(^{-1}\) m\(^{-3}\)] |
|
|
Latent heat of fusion [333550 J kg\(^{-1}\)] |
|
|
Model tolerance (used to remove rounding errors) |
Debugging Options#
Variable |
Type |
Comment/Note |
|---|---|---|
|
|
Debug option for refreezing module |
|
|
Debug option for mass balance calculations |