oggm.core.massbalance.RandomMassBalance¶
-
class
oggm.core.massbalance.
RandomMassBalance
(gdir, mu_star=None, bias=None, y0=None, halfsize=15, seed=None, filename='climate_monthly', input_filesuffix='', all_years=False, unique_samples=False)[source]¶ Random shuffle of all MB years within a given time period.
This is useful for finding a possible past glacier state or for sensitivity experiments.
Note that this is going to be sensitive to extreme years in certain periods, but it is by far more physically reasonable than other approaches based on gaussian assumptions.
-
__init__
(self, gdir, mu_star=None, bias=None, y0=None, halfsize=15, seed=None, filename='climate_monthly', input_filesuffix='', all_years=False, unique_samples=False)[source]¶ Initialize.
Parameters: - gdir : GlacierDirectory
the glacier directory
- mu_star : float, optional
set to the alternative value of mu* you want to use (the default is to use the calibrated value)
- bias : float, optional
set to the alternative value of the calibration bias [mm we yr-1] you want to use (the default is to use the calibrated value) Note that this bias is substracted from the computed MB. Indeed: BIAS = MODEL_MB - REFERENCE_MB.
- y0 : int, optional, default: tstar
the year at the center of the period of interest. The default is to use tstar as center.
- halfsize : int, optional
the half-size of the time window (window size = 2 * halfsize + 1)
- seed : int, optional
Random seed used to initialize the pseudo-random number generator.
- filename : str, optional
set to a different BASENAME if you want to use alternative climate data.
- input_filesuffix : str
the file suffix of the input climate file
- all_years : bool
if True, overwrites
y0
andhalfsize
to use all available years.- unique_samples: bool
if true, chosen random mass-balance years will only be available once per random climate period-length if false, every model year will be chosen from the random climate period with the same probability
Methods
__init__
(self, gdir[, mu_star, bias, y0, …])Initialize. get_annual_mb
(self, heights[, year, fl_id])Like self.get_monthly_mb(), but for annual MB. get_ela
(self[, year])Compute the equilibrium line altitude for this year get_monthly_mb
(self, heights[, year, fl_id])Monthly mass-balance at given altitude(s) for a moment in time. get_specific_mb
(self[, heights, widths, …])Specific mb for this year and a specific glacier geometry. get_state_yr
(self[, year])For a given year, get the random year associated to it. Attributes
bias
Residual bias to apply to the original series. prcp_bias
Precipitation factor to apply to the original series. temp_bias
Temperature bias to add to the original series. -