cfdm.QuadraticLatitudeLongitudeSubarray¶
- class cfdm.QuadraticLatitudeLongitudeSubarray(data=None, indices=None, shape=None, compressed_dimensions=None, subarea_indices=None, first=None, parameters=None, dependent_tie_points=None, interpolation_description=None, source=None, copy=True, context_manager=None)[source]¶
Bases:
QuadraticLatitudeLongitudeInterpolation,SubsampledSubarrayA subarray of an array compressed by subsampling.
A subarray describes a unique part of the uncompressed array.
The compressed data is reconstituted by quadratic latitude longitude interpolation.
See CF appendix J “Coordinate Interpolation Methods”.
Added in version (cfdm): 1.10.0.0
Initialisation
- Parameters:
- data: array_like
The full compressed tie points array spanning all subarrays, from which the elements for this subarray are defined by the indices.
- indices:
tuple 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,)}- Parameter example:
{0: (0,), 2: (2,)}
- first:
tupleofbool For each dimension of the tie points array, True if the interpolation subarea is the first along that dimension of the continuous area, otherwise False.
- subarea_indices:
tupleofslice For each dimension of the tie points array, the index that defines the location of the interpolation subarea in interpolation-subarea-space. An index corresponding to a non-interpolated dimension must be
slice(None).- parameters:
dict, optional If the interpolation method requires interpolation parameters then these are provided as array_like values, each keyed by its parameter term name. A parameter array must provide values for all interpolation subareas, from which the applicable elements are defined by the subarea_indices and indices indices.
Each dimension of a parameter array maps to the dimension in the same position of the tie points array. The size of a parameter array dimension must be either i) the size as the corresponding tie points array dimension; ii) the size of the interpolation subarea dimension for the corresponding tie points array dimension; or iii)
1.- dependent_tie_points:
dict, optional If the interpolation method requires dependent tie point arrays then these are provided as array_like values, each keyed by its identity. A dependent tie points array must provide values for all interpolation subareas, from which the applicable elements are defined by the indices indices.
A dependent tie points array must have the same shape as the tie points array, and each dimension maps to the dimension in the same position of the tie points array.
- interpolation_description:
str, optional A complete description of the non-standardised interpolation method.
- source: optional
Convert source, which can be any type of object, to a
QuadraticLatitudeLongitudeSubarrayinstance.All other parameters, apart from copy, are ignored and their values are instead inferred from source by assuming that it has the
QuadraticLatitudeLongitudeSubarrayAPI. Any parameters that can not be retrieved from source in this way are assumed to have their default value.Note that if
xis also aQuadraticLatitudeLongitudeSubarrayinstance thencfdm.QuadraticLatitudeLongitudeSubarray(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, dependent_tie_points, and parameters to
numpyarrays.
Methods¶
Methods
The |
|
Return an independent numpy array containing the data. |
|
Cast the data to a specified type. |
|
True if the tie points array represents bounds tie points. |
|
Mapping of compressed to uncompressed dimensions. |
|
Return a deep copy of the array. |
|
The full compressed array spanning all subarrays. |
|
The dependent tie points dictionary. |
|
The data-type of the uncompressed data. |
|
Relative interpolation subarea positions. |
|
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. |
|
Get a non-standardised interpolation method description. |
|
The units of the array. |
|
The indices of the data that define this subarray. |
|
Number of array dimensions. |
|
The interpolation parameters dictionary. |
|
The shape of the uncompressed data. |
|
Number of elements in the array. |
|
Location of interpolation subarea. |