cfdm.BoundsFromNodesSubarray¶
- class cfdm.BoundsFromNodesSubarray(data=None, indices=None, shape=None, compressed_dimensions=None, node_coordinates=None, start_index=None, cell_dimension=None, source=None, copy=True, context_manager=None)[source]¶
Bases:
MeshSubarrayA subarray of cell bounds defined by UGRID node coordinates.
A subarray describes a unique part of the uncompressed array.
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
See also
Initialisation
- Parameters:
- data: array_like
A 2-d integer array that contains indices that 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. This array contains the mapping for all subarrays.
- indices:
tupleofslice The indices of data that define this subarray.
- shape:
tupleofint The shape of the uncompressed subarray.
- compressed_dimensions:
dict Mapping of compressed to uncompressed dimensions.
A dictionary key is a position of a dimension in the compressed data, with a value of the positions of the corresponding dimensions in the uncompressed data. Compressed array dimensions that are not compressed must be omitted from the mapping.
- Parameter example:
{1: (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. This array contains the node coordinates for all subarrays.
- start_index:
int The base of the indices provided by the integer index array. Must be
0or1for zero- or one-based indices respectively.- cell_dimension:
int The position of the data dimension that indexes the cells, either
0or1.- source: optional
Convert source, which can be any type of object, to a
BoundsFromNodesSubarrayinstance.All other parameters, apart from copy, are ignored and their values are instead inferred from source by assuming that it has the
BoundsFromNodesSubarrayAPI. Any parameters that can not be retrieved from source in this way are assumed to have their default value.Note that if
xis also aBoundsFromNodesSubarrayinstance thencfdm.BoundsFromNodesSubarray(source=x)is equivalent tox.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.
- context_manager: function, optional
A context manager that provides a runtime context for the conversion of data and node_coordinates to
numpyarrays.
Methods¶
Methods
The |
|
Return an independent numpy array containing the data. |
|
Cast the data to a specified type. |
|
The position of the dimension that indexes the cells. |
|
Mapping of compressed to uncompressed dimensions. |
|
Return a deep copy of the array. |
|
The full compressed array spanning all subarrays. |
|
The data-type of the uncompressed data. |
|
The attributes of the array. |
|
The calendar of the array. |
|
Returns the array's compression type. |
|
Return the name of the file containing the data. |
|
The units of the array. |
|
The indices of the data that define this subarray. |
|
Number of array dimensions. |
|
The coordinates representing the node locations. |
|
The shape of the uncompressed data. |
|
Number of elements in the array. |
|
The start index of values in the compressed data. |