oggm.tasks.apparent_mb_from_any_mb#
- oggm.tasks.apparent_mb_from_any_mb(gdir, mb_model=None, mb_model_class=<class 'oggm.core.massbalance.MonthlyTIModel'>, mb_years=None)[source]#
Compute apparent mb from an arbitrary mass balance profile.
This searches for a mass balance residual to add to the mass balance profile so that the average specific MB is zero.
- Parameters
- gdir
oggm.GlacierDirectory
the glacier directory to process
- mb_model
oggm.core.massbalance.MassBalanceModel
the mass balance model to use - if None, will use the one given by mb_model_class
- mb_model_classMassBalanceModel class
the MassBalanceModel class to use, default is MonthlyTIModel
- mb_yearsarray, or tuple of length 2 (range)
the array of years from which you want to average the MB for (for mb_model only). If an array of length 2 is given, all years between this range (excluding the last one) are used. Default is to pick all years from the reference geodetic MB period, i.e. PARAMS[‘geodetic_mb_period’]. It does not matter much for the final result, but it should be a period long enough to have a representative MB gradient.
- gdir
Notes
- Files written to the glacier directory:
- inversion_flowlines.pkl
A “better” version of the centerlines, now on a regular spacing i.e., not on the gridded (i, j) indices. The tails of the tributaries are cut out to make more realistic junctions. They are now “1.5D” i.e., with a width.