oggm.core.massbalance.MultipleFlowlineMassBalance#
- class oggm.core.massbalance.MultipleFlowlineMassBalance(gdir, settings_filesuffix='', fls=None, mb_model_class=<class 'oggm.core.massbalance.MonthlyTIModel'>, use_inversion_flowlines=False, flowlines_filesuffix='', input_filesuffix=None, **kwargs)[source]#
Handle mass balance at the glacier level instead of flowline level.
Convenience class doing not much more than wrapping a list of mass balance models, one for each flowline.
This is useful for real-case studies, where each flowline might have different model parameters.
- Attributes:
- flslist
list of flowline objects
- __init__(gdir, settings_filesuffix='', fls=None, mb_model_class=<class 'oggm.core.massbalance.MonthlyTIModel'>, use_inversion_flowlines=False, flowlines_filesuffix='', input_filesuffix=None, **kwargs)[source]#
Initialize.
- Parameters:
- gdirGlacierDirectory
the glacier directory
- settings_filesuffixstr, optional
You can use a different set of settings by providing a filesuffix. This is useful for sensitivity experiments.
- flslist, optional
list of flowline objects to use (defaults to ‘model_flowlines’)
- mb_model_classMassBalanceModel, default
MonthlyTIModel the MassBalanceModel to use e.g.
DailyTIModel,ConstantMassBalance.- use_inversion_flowlines: bool, optional
use ‘inversion_flowlines’ instead of ‘model_flowlines’
- flowlines_filesuffixstr
suffix to the flowlines filename to use (could be ‘inversion_flowlines’ or ‘model_flowlines’, depending on ‘use_inversion_flowlines’). Default is ‘’
- kwargskwargs to pass to mb_model_class
Methods
__init__(gdir[, settings_filesuffix, fls, ...])Initialize.
days_in_month(year)Get the number of days of a month, with or without leap years, depending on self.use_leap_years.
days_in_year(year)Get the number of days of a year, with or without leap years, depending on self.use_leap_years.
get_annual_mb(heights[, year, fl_id])Like self.get_monthly_mb(), but for annual MB.
get_annual_mb_on_flowlines([fls, year])Get the MB on all points of the glacier at once.
get_daily_mb(heights[, year, fl_id])Daily mass balance at given altitude(s) for a moment in time.
get_daily_mb_on_flowlines([fls, year])Get the MB on all points of the glacier at once.
get_ela([year])Get the equilibrium line altitude for a given year.
get_monthly_mb(heights[, year, fl_id])Monthly mass balance at given altitude(s) for a moment in time.
get_monthly_mb_on_flowlines([fls, year])Get the MB on all points of the glacier at once.
get_specific_mb([heights, widths, fls, ...])Specific mass balance for a given glacier geometry.
is_year_valid(year)Checks if a given date year be simulated by this model.
load_from_file(gdir[, filesuffix, ...])Load a
MultipleFlowlineMassBalancefrom a saved nc file.reset_state()Reset any internal state of the model.
save_to_file([filesuffix])Save the state of all flowline MB models to a single NetCDF file.
sec_in_month(year)Get the seconds of the month, with or without leap years, depending on self.use_leap_years.
sec_in_year(year)Get the seconds of the year, with or without leap years, depending on self.use_leap_years.
Attributes
biasResidual bias to apply to the original series.
filenameinput_filesuffixmelt_fMelt factor.
prcp_facPrecipitation factor to apply to the original series.
temp_biasTemperature bias to add to the original series.
ye_floatys_float