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:
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
:
there are two options for how often the melt factor should be updated and how many buckets exist
melt_f_update=annual
melt_f_update=monthly
:
there are different option of how and how fast the snow/firn melt factor approximates to the ice melt factor.
melt_f_change=linear
melt_f_change='neg_exp'
tau_e_fold_yr
is per default 1 year (but can be changed to another value)default is to use a spinup of 6 years. So to compute the specific mass balance between 2000 and 2020, with spinup=True
, the annual mb is computed since 1994 where at first everything is ice, and then it accumulates over the next years, so that in 2000 there is something in each bucket ...
the ratio of snow melt factor to ice melt factor is set to 0.5 (as in GloGEM, PyGEM, ...) but it can be changed via melt_f_ratio_snow_to_ice
melt_f_ratio_snow_to_ice=1
the melt factor is equal for all buckets, hence the results are equal to no surface type distinction (as in TIModel
)get_annual_mb
and get_monthly_mb
work as in the OGGM v153 PastMassBalance
class, however they only accept the height array that corresponds to the inversion height (so no mass-balance elevation feedback can be included at the moment!)
the buckets are automatically updated when using get_annual_mb
or get_monthly_mb
via the TIModel_Sfc_Type.pd_bucket
dataframe
to make sure that we do not compute mass-balance twice and to always have a spin-up of 6 years, we save the mass balance under
get_annual_mb.pd_mb_annual
: for each year
get_monthly_mb
for several years, after computing the December month, the pd_mb_annual
dataframe is updatedget_annual_mb.pd_mb_monthly
: for each month
All options have been tested with the elevation-band flowlines.
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
TIModel_Parent
with children TIModel
and TIModel_Sfc_Type
TIModel
, not yet tested for TIModel_Sfc_Type
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.
how_to_use.ipynb : simple use case that shows how to use different climate resolutions
surface_type_distinction/oggm_sfc_type_bucket.ipynb : use case of how the surface type distinction with different melt factors works
how_to_daily_input_daily_output.ipynb : how to get daily mb output and calibrate with geodetic data
hydro_compatility:
equilibrium runs
other notebooks not directly related to the MBSandbox:
geodetic_mb_calibration_to_volume_changes.ipynb : template how to calibrate a glacier by using the geodetic estimates (for the default PastMassBalanceModel
of OGGMv153!!! )