oggm.core.massbalance.MonthlyTIModel

oggm.core.massbalance.MonthlyTIModel#

class oggm.core.massbalance.MonthlyTIModel(gdir, filename: str = 'climate_historical', input_filesuffix: str = '', settings_filesuffix: str = '', fl_id: int = None, melt_f: float = None, temp_bias: float = None, prcp_fac: float = None, bias: float = 0.0, temp_melt: float = None, ys: int = None, ye: int = None, repeat: bool = False, check_calib_params: bool = True, check_climate_data: bool = True, use_leap_years: bool = False)[source]#

Monthly temperature index model.

__init__(gdir, filename: str = 'climate_historical', input_filesuffix: str = '', settings_filesuffix: str = '', fl_id: int = None, melt_f: float = None, temp_bias: float = None, prcp_fac: float = None, bias: float = 0.0, temp_melt: float = None, ys: int = None, ye: int = None, repeat: bool = False, check_calib_params: bool = True, check_climate_data: bool = True, use_leap_years: bool = False)[source]#

Monthly temperature index model.

Parameters:
gdirGlacierDirectory

The glacier directory.

filenamestr, default ‘climate_historical’

Set to a different BASENAME if you want to use alternative climate data.

input_filesuffixstr, optional

Append a suffix to the climate input filename (useful for GCM runs).

settings_filesuffixstr, optional

Append a suffix to the settings file (useful for sensitivity runs).

fl_idint, optional

If this flowline has been calibrated alone and has specific model parameters.

melt_ffloat, optional

The value of the melt factor you want to use, here the unit is kg m-2 day-1 K-1. Defaults to the calibrated value.

temp_biasfloat, optional

The value of the temperature bias. Defaults to the calibrated value.

prcp_facfloat, optional

The value of the precipitation factor. Defaults to the calibrated value.

biasfloat, default 0.0

The value of the calibration bias [mm we yr-1]. Defaults to the calibrated value. Note that this bias is subtracted from the computed MB. Indeed: BIAS = MODEL_MB - REFERENCE_MB.

temp_meltfloat or None, default None

The threshold for the air temperature above which ice melt is assumed to occur (-1°C the default for monthly mb models). If None settings[‘temp_melt’] is used.

ysint, optional

The start of the climate period where the MB model is valid. Defaults to the period with available data.

yeint, optional

The end of the climate period where the MB model is valid. Defaults to the period with available data.

repeatbool, default False

Whether the climate period given by [ys, ye] should be repeated indefinitely in a circular way

check_calib_paramsbool, default True

OGGM will try hard not to use wrongly calibrated parameters by checking the global parameters used during calibration and the ones you are using at run time. If they don’t match, it will raise an error. Set to False to suppress this check.

check_climate_databool, default True

If True the climate input data is checked if it is provided in total years and that the length matches.

use_leap_yearsbool, default False

If the calendar should use leap years

Methods

__init__(gdir[, filename, input_filesuffix, ...])

Monthly temperature index model.

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_climate(heights[, year])

Annual climate information at given heights.

get_annual_mb(heights[, year, add_climate])

Get annual mass balance.

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_climate(heights[, year])

Monthly climate information at given heights.

get_monthly_mb(heights[, year, add_climate])

Get monthly mass balance.

get_specific_mb([heights, widths, fls, ...])

Specific mass balance for a given glacier geometry.

is_year_valid(year)

Check if a year is within the climate period.

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.

validate_year(year)

Get and validate if a year is outside the data's time range.

Attributes

calib_params

prcp_fac

Precipitation factor (default: gdir.settings['prcp_fac'])

temp_bias

Add a temperature bias to the time series