oggm.core.massbalance.LinearMassBalance#
- class oggm.core.massbalance.LinearMassBalance(ela_h, grad=3.0, max_mb=None, use_leap_years=False)[source]#
Constant mass balance as a linear function of altitude.
- Attributes:
- ela_h: float
the equilibrium line altitude (units: [m])
- grad: float
the mass balance gradient (unit: [mm w.e. yr-1 m-1])
- max_mb: float
Cap the mass balance to a certain value (unit: [mm w.e. yr-1])
temp_biasChange the ELA following a simple rule: + 1K -> ELA + 150 m
- __init__(ela_h, grad=3.0, max_mb=None, use_leap_years=False)[source]#
Initialize.
- Parameters:
- ela_h: float
Equilibrium line altitude (units: [m])
- grad: float
Mass balance gradient (unit: [mm w.e. yr-1 m-1])
- max_mb: float
Cap the mass balance to a certain value (unit: [mm w.e. yr-1])
- use_leap_yearsbool
If the calendar should use leap years
Methods
__init__(ela_h[, grad, max_mb, use_leap_years])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, **kwargs)Like self.get_monthly_mb(), but for annual MB.
get_daily_mb(heights[, year, fl_id, fls])Daily mass balance at given altitude(s) for a moment in time.
get_ela([year])Get the equilibrium line altitude for a given year.
get_monthly_mb(heights, **kwargs)Monthly mass balance at given altitude(s) for a moment in time.
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.
reset_state()Reset any internal state of the model.
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
temp_biasChange the ELA following a simple rule: + 1K -> ELA + 150 m