csdms

basic_modeling_interface.grid module

Interface that describes uniform rectilinear grids.

class basic_modeling_interface.grid.BmiGrid[source]

Bases: object

Methods that describe a grid.

Methods

get_grid_rank(grid_id) Get number of dimensions of the computational grid.
get_grid_size(grid_id) Get the total number of elements in the computational grid.
get_grid_type(grid_id) Get the grid type as a string.
get_grid_rank(grid_id)[source]

Get number of dimensions of the computational grid.

Parameters:

grid_id : int

A grid identifier.

Returns:

int

Rank of the grid.

See also

bmi.vars.BmiVars.get_var_grid
Obtain a grid_id.

Notes

/* C */
int get_grid_rank(void * self, int grid_id, int * rank);
get_grid_size(grid_id)[source]

Get the total number of elements in the computational grid.

Parameters:

grid_id : int

A grid identifier.

Returns:

int

Size of the grid.

See also

bmi.vars.BmiVars.get_var_grid
Obtain a grid_id.

Notes

/* C */
int get_grid_size(void * self, int grid_id, int * size);
get_grid_type(grid_id)[source]

Get the grid type as a string.

Parameters:

grid_id : int

A grid identifier.

Returns:

str

Type of grid as a string.

See also

bmi.vars.BmiVars.get_var_grid
Obtain a grid_id.

Notes

/* C */
int get_grid_type(void * self, int grid_id, char * type);