Skip to content

bounds

BoundaryArrayView

__init__(data, boundary_type, dims, origin, extent)

sel(**kwargs)

Convenience method to perform indexing using dimension names without knowing dimension order.

Parameters:

Name Type Description Default
**kwargs slice | int

slice/index to retrieve for a given dimension name

{}

Returns:

Name Type Description
view_selection ndarray

an ndarray-like selection of the given indices on self.view

BoundedArrayView

A container of objects which provide indexing relative to corners and edges of the computational domain for convenience.

Default start and end indices for all dimensions are modified to be the start and end of the compute domain. When using edge and corner attributes, it is recommended to explicitly write start and end offsets to avoid confusion.

Indexing on the object itself (view[:]) is offset by the origin, and default start and end indices are modified to be the start and end of the compute domain.

For corner attributes e.g. northwest, modified indexing is done for the two axes according to the edges which make up the corner. In other words, indexing is offset relative to the intersection of the two edges which make the corner.

For interior, start indices of the horizontal dimensions are relative to the origin, and end indices are relative to the origin + extent. For example, view.interior[0:0, 0:0, :] would retrieve the entire compute domain for an x/y/z array, while view.interior[-1:1, -1:1, :] would also include one halo point.

origin property

the start of the computational domain

extent property

the shape of the computational domain

northwest property

northeast property

southwest property

southeast property

interior property

__init__(array, dims, origin, extent)