landlab.framework.interfaces

The Basic Modeling Interface.

exception BadVarNameError[source]

Bases: Error

Exception to indicate a bad input/output variable name.

__init__(name)[source]
__new__(**kwargs)
add_note()

Exception.add_note(note) – add a note to the exception

args
with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

class BmiBase[source]

Bases: object

Definition of the Basic Modeling Interface.

__init__()
__new__(**kwargs)
finalize()[source]

Clean-up model.

get_current_time()[source]

Current time of model.

get_end_time()[source]

Model stop time.

get_input_var_names()[source]

Get names of input variables to the model as standard names.

Returns:

A list of input standard names as strings

get_output_var_names()[source]

Get names of output variables to the model as standard names.

Returns:

A list of output standard names as strings

get_start_time()[source]

Model start time.

get_time_step()[source]

Model time step.

get_var_rank(var_name)[source]

Rank of exchange item.

get_var_type(var_name)[source]

Get type of an exchange item.

get_var_units(var_name)[source]

Get units of an exchange item.

initialize(file_name)[source]

Initialize model.

File_name:

String of configuration file

update(**kwds)[source]

Update model by one time step.

class BmiExtendedBase[source]

Bases: object

An extension interface for a BMI.

__init__()
__new__(**kwargs)
run_model()[source]

Initialize, run, and finalize a model.

update_until(time)[source]

Update model until some time.

Time:

Update duration

class BmiGridType[source]

Bases: int

Base type to indicate the type of a BMI model’s grid.

Code:

Grid type code as an int

Name:

Name of the grid type as a string

static __new__(cls, code, name)[source]
class BmiNoGrid[source]

Bases: object

BMI for a model that does not have a grid.

__init__()
__new__(**kwargs)
class BmiRectilinear[source]

Bases: object

BMI for a model that uses a rectilinear grid.

__init__()
__new__(**kwargs)
get_columns(name)[source]

Get coordinates of grid columns.

get_grid_shape(name)[source]

Get shape of grid for variable, name.

Name:

Standard name

get_rows(name)[source]

Get coordinates of grid rows.

class BmiStructured[source]

Bases: object

BMI for a model that uses a structured grid.

__init__()
__new__(**kwargs)
get_grid_shape(name)[source]

Get shape of grid for variable, name.

Name:

Standard name

get_x(name)[source]

Get x-coordinates of grid nodes.

get_y(name)[source]

Get y-coordinates of grid nodes.

class BmiUniformRectilinear[source]

Bases: object

BMI for a model that exposes a uniform rectilinear grid.

__init__()
__new__(**kwargs)
get_grid_origin(name)[source]

Get origin of grid for variable, name.

Name:

Standard name

get_grid_shape(name)[source]

Get shape of grid for variable, name.

Name:

Standard name

get_grid_spacing(name)[source]

Get spacing of grid for variable, name.

Name:

Standard name

class BmiUnstructured[source]

Bases: object

BMI for a model that uses an unstructured grid.

__init__()
__new__(**kwargs)
get_connectivity(name)[source]

Get cell connectivity.

get_offset(name)[source]

Get cell offset.

get_x(name)[source]

Get x-coordinates of grid nodes.

get_y(name)[source]

Get y-coordinates of grid nodes.

exception Error[source]

Bases: Exception

Base class for BMI exceptions.

__init__(*args, **kwargs)
__new__(**kwargs)
add_note()

Exception.add_note(note) – add a note to the exception

args
with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception FatalError[source]

Bases: Exception

Raise this exception if an unrecoverable error was found.

__init__(*args, **kwargs)
__new__(**kwargs)
add_note()

Exception.add_note(note) – add a note to the exception

args
with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception MissingModelAttributeError[source]

Bases: Error

Raise this exception if a component is missing a required attribute.

__init__(attrib)[source]
__new__(**kwargs)
add_note()

Exception.add_note(note) – add a note to the exception

args
with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception TimeBoundsError[source]

Bases: Error

Raise this exception if a component updates beyond its time horizon.

__init__(*args, **kwargs)
__new__(**kwargs)
add_note()

Exception.add_note(note) – add a note to the exception

args
with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.