oggm.tasks.mb_calibration_from_geodetic_mb

oggm.tasks.mb_calibration_from_geodetic_mb#

oggm.tasks.mb_calibration_from_geodetic_mb(gdir, *, settings_filesuffix='', observations_filesuffix='', use_observations_file=False, ref_mb_period=None, file_path=None, temp_bias_file_path=None, write_to_gdir=True, overwrite_gdir=False, use_regional_avg=False, override_missing=None, use_2d_mb=False, informed_threestep=False, calibrate_param1='melt_f', calibrate_param2=None, calibrate_param3=None, mb_model_class=<class 'oggm.core.massbalance.MonthlyTIModel'>, **kwargs: dict)[source]#

Calibrate for geodetic MB data (from Hugonnet et al., 2021 or other).

The data table can be obtained with utils.get_geodetic_mb_dataframe(). It is equivalent to the original data from Hugonnet, but has some outlier values filtered. See this notebook* for more details.

https://nbviewer.org/urls/cluster.klima.uni-bremen.de/~oggm/geodetic_ref_mb/convert_vold1.ipynb

This glacier-specific calibration can be replaced by a region-wide calibration by using regional averages (same units: mm w.e.) instead of the glacier specific averages.

The problem of calibrating many unknown parameters on geodetic data is currently unsolved. This is OGGM’s current take, based on trial and error and based on ideas from the literature.

Parameters:
gdiroggm.GlacierDirectory

the glacier directory to calibrate

settings_filesuffix: str

You can use a different set of settings by providing a filesuffix. This is useful for sensitivity experiments. Code-wise the settings_filesuffix is set in the @entity-task decorater.

observations_filesuffix: str

The observations filesuffix, where the used calibration data will be stored. Code-wise the observations_filesuffix is set in the @entity-task decorater.

use_observations_filebool

By default this function reads the data from Hugonnet and adds it to the observations file. If you want to use different observations within this function you can set this to True. This can be useful for sensitivity tests. Default is False.

ref_mb_periodstr, default: PARAMS[‘geodetic_mb_period’]

one of ‘2000-01-01_2010-01-01’, ‘2010-01-01_2020-01-01’, ‘2000-01-01_2020-01-01’. If ref_mb is set, this should still match the same format but can be any date.

file_pathstr, optional

path or URL to a custom geodetic mass-balance file, passed to utils.get_geodetic_mb_dataframe.

temp_bias_file_pathstr, optional

path or URL to a custom temperature-bias file, passed to utils.get_temp_bias_dataframe. Only used with informed_threestep. When set, it overrides the default w5e5/era5 file selection based on the glacier’s climate source, so it can be used together with an arbitrary (custom) climate dataset. The file must follow the same format as the default temp-bias files (check the format first!).

write_to_gdirbool

whether to write the results of the calibration to the glacier directory. If True (the default), this will be saved as mb_calib.json and be used by the MassBalanceModel class as parameters in subsequent tasks.

overwrite_gdirbool

if a mb_calib.json exists, this task won’t overwrite it per default. Set this to True to enforce overwriting (i.e. with consequences for the future workflow).

use_regional_avgbool

use the regional average instead of the glacier specific one.

override_missingscalar

if the reference geodetic data is not available, use this value instead (mostly for testing with exotic datasets, but could be used to open the door to using other datasets).

use_2d_mbbool

Set to True if the mass balance calibration has to be done of the 2D mask of the glacier (for fully distributed runs only).

informed_threestepbool

the magic method Fabi found out one day before release. Overrides the calibrate_param order below.

calibrate_param1str

in the three-step calibration, the name of the first parameter to calibrate (one of ‘melt_f’, ‘temp_bias’, ‘prcp_fac’).

calibrate_param2str

in the three-step calibration, the name of the second parameter to calibrate (one of ‘melt_f’, ‘temp_bias’, ‘prcp_fac’). If not set and the algorithm cannot match observations, it will raise an error.

calibrate_param3str

in the three-step calibration, the name of the third parameter to calibrate (one of ‘melt_f’, ‘temp_bias’, ‘prcp_fac’). If not set and the algorithm cannot match observations, it will raise an error.

mb_model_classMassBalanceModel, default MonthlyTIModel

the MassBalanceModel to use for the calibration. Needs to use the same parameters as MonthlyTIModel (the default): melt_f, temp_bias, prcp_fac.

kwargsdict

kwargs to pass to the mb_model_class instance

Returns:
the calibrated parameters as dict

Notes

Files written to the glacier directory:
mb_calib.json

A dict containing the glacier’s mass balance calibration parameters.