oggm.tasks.perturbate_mb_params#
- oggm.tasks.perturbate_mb_params(gdir, perturbation=None, reset_default=False, filesuffix='')[source]#
Replaces pre-calibrated MB params with perturbed ones for this glacier.
It simply replaces the existing mb_calib.json file with an updated one with perturbed parameters. The original ones are stored in the file for re-use after perturbation.
Users can change the following 4 parameters: - ‘melt_f’: unit [kg m-2 day-1 K-1], the melt factor - ‘prcp_fac’: unit [-], the precipitation factor - ‘temp_bias’: unit [K], the temperature correction applied to the timeseries - ‘bias’: unit [mm we yr-1], substracted from the computed MB. Rarely used.
All parameter perturbations are additive, i.e. the value provided by the user is added to the precalibrated value. For example, temp_bias=1 means that the temp_bias used by the model will be the precalibrated one, plus 1 Kelvin.
The only exception is prpc_fac, which is multiplicative. For example prcp_fac=1 will leave the precalibrated prcp_fac unchanged, while 2 will double it.
- Parameters:
- perturbationdict
the parameters to change and the associated value (see doc above)
- reset_defaultbool
reset the parameters to their original value. This might be unnecessary if using the filesuffix mechanism.
- filesuffixstr
write the modified parameters in a separate mb_calib.json file with the filesuffix appended. This can then be read by the MassBalanceModel for example instead of the default one. Note that it’s always the default, precalibrated params file which is read to start with.
Notes
- Files written to the glacier directory:
- mb_calib.json
A dict containing the glacier’s mass balance calibration parameters.