cfdm.BoundsFromNodesArray


class cfdm.BoundsFromNodesArray(*args, **kwargs)[source]

Bases: CompressedArrayMixin, MeshArray

An array of cell bounds defined by UGRID node coordinates.

The UGRID node coordinates contain the locations of the nodes of the domain topology. In UGRID, the bounds of edge or face cells may be defined by the these locations in conjunction with a mapping from from each cell boundary vertex to its corresponding coordinate value.

Added in version (cfdm): 1.11.0.0

Initialisation

Parameters:
node_connectivity: array_like

A 2-d integer array that contains indices which map each cell boundary vertex to its corresponding position in the 1-d node_coordinates array, as found in a UGRID “edge_node_connectivity” or “face_node_connectivity” variable.

shape: tuple

The shape of the bounds array.

start_index: int

The base of the indices provided by the integer index array. Must be 0 or 1 for zero- or one-based indices respectively.

cell_dimension: int

The position of the data dimension that indexes the cells, either 0 or 1.

node_coordinates: array_like

A 1-d array that contains a coordinate location for each mesh node, as found in a UGRID “node_coordinates” variable.

source: optional

Convert source, which can be any type of object, to a BoundsFromNodesArray instance.

All other parameters, apart from copy, are ignored and their values are instead inferred from source by assuming that it has the BoundsFromNodesArray API. Any parameters that can not be retrieved from source in this way are assumed to have their default value.

Note that if x is also a BoundsFromNodesArray instance then cfdm.BoundsFromNodesArray(source=x) is equivalent to x.copy().

copy: bool, optional

If True (the default) then deep copy the input parameters prior to initialisation. By default the parameters are not deep copied.

Methods

Methods

Units

The Units object containing the units of the array.

array

Returns a numpy array containing the uncompressed data.

astype

Cast the data to a specified type.

compressed_array

Returns an independent numpy array with the compressed data.

compressed_dimensions

Mapping of compressed to uncompressed dimensions.

conformed_data

The conformed node connectivity and node coordinate data.

copy

Return a deep copy of the array.

dtype

The data-type of the uncompressed data.

get_Subarray

Return the Subarray class.

get_attributes

The attributes of the array.

get_calendar

The calendar of the array.

get_cell_dimension

Return the position of the cell dimension.

get_compressed_axes

Return axes that are compressed in the underlying array.

get_compressed_dimension

Returns the compressed dimension's position in the array.

get_compression_type

Returns the array's compression type.

get_filename

Return the name of the file containing the compressed data.

get_node_coordinates

The coordinates representing the node locations.

get_start_index

Return the start index.

get_units

The units of the array.

ndim

Number of array dimensions.

shape

Shape of the uncompressed data.

size

Number of elements in the array.

source

Return the underlying array object.

subarray_parameters

Non-data parameters required by the Subarray class.

subarray_shapes

Create the subarray shapes along each uncompressed dimension.

subarrays

Return descriptors for every subarray.

to_dask_array

Convert the data to a dask array.

to_memory

Bring data on disk into memory.