oggm.tasks.mb_calibration_from_geodetic_mb#
- oggm.tasks.mb_calibration_from_geodetic_mb(gdir, *, ref_period=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'>, filesuffix='')[source]#
Calibrate for geodetic MB data from Hugonnet et al., 2021.
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:
- gdir
oggm.GlacierDirectory the glacier directory to calibrate
- ref_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.
- 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 class
the MassBalanceModel to use for the calibration. Needs to use the same parameters as MonthlyTIModel (the default): melt_f, temp_bias, prcp_fac.
- filesuffix: str
add a filesuffix to mb_calib.json. This could be useful for sensitivity analyses with MB models, if they need to fetch other sets of params for example.
- gdir
- 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.