cfdm.CellConnectivityArray


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

Bases: CompressedArrayMixin, MeshArray

A connectivity array derived from a UGRID connectivity variable.

A UGRID connectivity variable contains indices which map each cell to its neighbours, as found in a UGRID “face_face_connectivity” or “volume_volume_connectivity” variable.

The connectivity array has one more column than the corresponding UGRID variable. The extra column, in the first position, contains the identifier for each cell.

Added in version (cfdm): 1.11.0.0

Initialisation

Parameters:
cell_connectivity: array_like

A 2-d integer array that contains indices which map each cell to its neighbours, as found in a UGRID “face_face_connectivity”, or “volume_volume_connectivity” variable.

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.

source: optional

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

All other parameters, apart from copy, are ignored and their values are instead inferred from source by assuming that it has the CellConnectivityArray 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 CellConnectivityArray instance then cfdm.CellConnectivityArray(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 data as required by the decompression algorithm.

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_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.