- oggm.tasks.run_random_climate(gdir, nyears=1000, y0=None, halfsize=15, ys=None, ye=None, bias=0, seed=None, temperature_bias=None, precipitation_factor=None, store_monthly_step=False, store_model_geometry=None, store_fl_diagnostics=None, mb_model_class=<class 'oggm.core.massbalance.MonthlyTIModel'>, climate_filename='climate_historical', climate_input_filesuffix='', output_filesuffix='', init_model_fls=None, init_model_filesuffix=None, init_model_yr=None, zero_initial_glacier=False, unique_samples=False, **kwargs)#
Runs the random mass balance model for a given number of years.
This will initialize a
oggm.core.massbalance.MultipleFlowlineMassBalance, and run a
the glacier directory to process
length of the simulation
- ysint, default: 0 or init_model_yr
first year of the fake output timeseries. Since these simulations are idealized, the concept of “time” is only relative to the start of the simulation.
- yeint, default: nyears
can be used instead of “nyears”
central year of the random climate period. Has to be set!
- halfsizeint, optional
the half-size of the time window (window size = 2 * halfsize + 1)
bias of the mb model (offset to add to the MB). Default is zero.
seed for the random generator. If you ignore this, the runs will be different each time. Setting it to a fixed seed across glaciers can be useful if you want to have the same climate years for all of them
add a bias to the temperature timeseries (note that this is added to any bias that the calibration decided is needed)
- precipitation_factor: float
multiply a factor to the precipitation time series (note that this factor is multiplied to any factor that was decided during calibration or by global parameters)
whether to store the diagnostic data at a monthly time step or not (default is yearly)
whether to store the full model geometry run file to disk or not. (new in OGGM v1.4.1: default is to follow cfg.PARAMS[‘store_model_geometry’])
whether to store the model flowline diagnostics to disk or not. (default is to follow cfg.PARAMS[‘store_fl_diagnostics’])
- mb_model_classMassBalanceModel class
The MassBalanceModel class to use inside the RandomMassBalance (default MonthlyTIModel)
name of the climate file, e.g. ‘climate_historical’ (default) or ‘gcm_data’
- climate_input_filesuffix: str
filesuffix for the input climate file
this add a suffix to the output file (useful to avoid overwriting previous experiments)
if you want to start from a previous model run state. Can be combined with init_model_yr
the year of the initial run you want to start from. The default is to take the last year of the simulation.
list of flowlines to use to initialise the model (the default is the present_time_glacier file from the glacier directory)
if true, the ice thickness is set to zero before the simulation
- 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
kwargs to pass to the FluxBasedModel instance
Files written to the glacier directory: