OGGM / massbalance-sandbox

New generation of OGGM mass-balance models
BSD 3-Clause "New" or "Revised" License
6 stars 11 forks source link

OGGM Mass-Balance sandbox

Next generation of OGGM's mass-balance models. Work in process!

You are welcome to discover some new mass-balance options such as different climate resolutions or surface type distinction. However, we want to make clear that this is work in process and is part of my PhD project:

  • the new mass-balance module from this sandbox is of course less stable, less robust, slower and less documented than the default MBmodel (i.e. the PastMassBalance class in OGGM)
  • it has no pre-mass-balance-calibrated gdirs
  • although I try to include tests as I can, they might be less rigorous as the ones from pure OGGM

The OGGM mass-balance sandbox has been used by the preprint "Glacier projections sensitivity to temperature-index model choices and calibration strategies" (Schuster et al. 2023, in review, submitted to Annals of Glaciology). We uploaded the preprint to EarthArXiv, and it is available under the DOI https://doi.org/10.31223/X5C65S. Most options are described there in details. If you use the OGGM mass-balance sandbox, please cite the preprint. The scripts to reproduce the analysis of the preprint and that use this OGGM mass-balance sandbox are here available: https://github.com/lilianschuster/oggm_mb_sandbox_option_intercomparison.

If you can't wait until the OGGM massbalance-sandbox is integrated into OGGM default and want to use it already now for your specific OGGM application, please contact me first either by:

  • opening an issue
  • writing an e-mail to me (Lilian Schuster)
  • or, the easiest way, discuss it inside of our OGGM slack channel

At the moment these options of climate resolution are available inside TIModel:

In addition, a surface type distinction model is included with a bucket system together with a melt_f that varies with age inside of TIModel_Sfc_Type:

All options have been tested with the elevation-band flowlines.

How to install!

The OGGM MB sandbox needs OGGMv153 and does currently not work with the latest OGGMv16. It also needs some developments after the OGGM v153 release. Thus, it is best if you install a more recent OGGM development version which is still before OGGM v16 (e.g. "OGGM version: '1.5.4.dev60+g9d17303'": https://github.com/OGGM/oggm/commit/9d173038862f36a21838034da07243bd189ef2d0) by doing:

$ conda create --name env_mb
$ source activate env_mb
$ pip install --no-deps "git+https://github.com/OGGM/oggm.git@9d173038862f36a21838034da07243bd189ef2d0"
$ git clone https://github.com/OGGM/massbalance-sandbox
$ cd massbalance-sandbox
$ pip install -e .

Test the installation via pytest while being in the massbalance-sandbox folder, best is if you do :

$ pytest -v -m "not no_w5e5"

(Attention: Just doing pytest ., downloads several climate datasets and does example ensemble projections into the future. If you only want to use W5E5 climate data, the tests run with the line above are sufficient)

If you have issues to install the right package versions, you can install the packages dependent on oggm_v153 by using for example the following .yml file: https://github.com/OGGM/OGGM-dependency-list/blob/master/Linux-64/oggmdev-1.5.3.202209061450_20221107_py39.yml

The MBsandbox package can be imported in python by

>>> import MBsandbox

code inside of MBsandbox

How to use!

There is not a lot of documentation, but here are some example notebooks with explanations inside of the docs folder. More example scripts of the OGGM massbalance-sandbox are in the https://github.com/lilianschuster/oggm_mb_sandbox_option_intercomparison repository.

hydro_compatility:

equilibrium runs

other notebooks not directly related to the MBSandbox: