oggm.FlowlineModel

class oggm.FlowlineModel(flowlines, mb_model=None, y0=0.0, glen_a=None, fs=None, inplace=False, smooth_trib_influx=True, is_tidewater=False, is_lake_terminating=False, mb_elev_feedback='annual', check_for_boundaries=None, water_level=None, required_model_steps='monthly')[source]

Interface to OGGM’s flowline models

__init__(flowlines, mb_model=None, y0=0.0, glen_a=None, fs=None, inplace=False, smooth_trib_influx=True, is_tidewater=False, is_lake_terminating=False, mb_elev_feedback='annual', check_for_boundaries=None, water_level=None, required_model_steps='monthly')[source]

Create a new flowline model from the flowlines and a MB model.

Parameters
flowlineslist

a list of oggm.Flowline instances, sorted by order

mb_modeloggm.core.massbalance.MassBalanceModel

the MB model to use

y0int

the starting year of the simulation

glen_afloat

glen’s parameter A

fs: float

sliding parameter

inplacebool

whether or not to make a copy of the flowline objects for the run setting to True implies that your objects will be modified at run time by the model (can help to spare memory)

smooth_trib_influxbool

whether to smooth the mass influx from the incoming tributary. The default is to use a gaussian kernel on a 9 grid points window.

is_tidewater: bool, default: False

is this a tidewater glacier?

is_lake_terminating: bool, default: False

is this a lake terminating glacier?

mb_elev_feedbackstr, default: ‘annual’

‘never’, ‘always’, ‘annual’, or ‘monthly’: how often the mass-balance should be recomputed from the mass balance model. ‘Never’ is equivalent to ‘annual’ but without elevation feedback at all (the heights are taken from the first call).

check_for_boundariesbool

whether the model should raise an error when the glacier exceeds the domain boundaries. The default is to follow PARAMS[‘error_when_glacier_reaches_boundaries’]

required_model_stepsstr

some Flowline models have an adaptive time stepping scheme, which is randomly taking steps towards the goal of a “run_until”. The default (‘monthly’) makes sure that the model results are consistent whether the users want data at monthly or annual timesteps by forcing the model to land on monthly steps even if only annual updates are required. You may want to change this for optimisation reasons for models that don’t require adaptive steps (for example the deltaH method).

Methods

__init__(flowlines[, mb_model, y0, glen_a, ...])

Create a new flowline model from the flowlines and a MB model.

check_domain_end()

Returns False if the glacier reaches the domains bound.

get_mb(heights[, year, fl_id, fls])

Get the mass balance at the requested height and time.

reset_flowlines(flowlines[, inplace, ...])

Reset the initial model flowlines

reset_y0(y0)

Reset the initial model time

run_until(y1)

Runs the model from the current year up to a given year date y1.

run_until_and_store(y1[, diag_path, ...])

Runs the model and returns intermediate steps in xarray datasets.

run_until_equilibrium([rate, ystep, max_ite])

Runs the model until an equilibrium state is reached.

step(dt)

Advance the numerical simulation of one single step.

to_geometry_netcdf(path)

Creates a netcdf group file storing the state of the model.

Attributes

area_km2

area_m2

length_m

mb_model

volume_bsl_km3

volume_bsl_m3

volume_bwl_km3

volume_bwl_m3

volume_km3

volume_m3

yr