cf.AuxiliaryCoordinate¶
-
class
cf.
AuxiliaryCoordinate
(properties=None, data=None, bounds=None, geometry=None, interior_ring=None, source=None, copy=True, _use_data=True)[source]¶ Bases:
cf.mixin.coordinate.Coordinate
,cf.mixin.propertiesdatabounds.PropertiesDataBounds
,cfdm.auxiliarycoordinate.AuxiliaryCoordinate
An auxiliary coordinate construct of the CF data model.
An auxiliary coordinate construct provides information which locate the cells of the domain and which depend on a subset of the domain axis constructs. Auxiliary coordinate constructs have to be used, instead of dimension coordinate constructs, when a single domain axis requires more then one set of coordinate values, when coordinate values are not numeric, strictly monotonic, or contain missing values, or when they vary along more than one domain axis construct simultaneously. CF-netCDF auxiliary coordinate variables and non-numeric scalar coordinate variables correspond to auxiliary coordinate constructs.
The auxiliary coordinate construct consists of a data array of the coordinate values which spans a subset of the domain axis constructs, an optional array of cell bounds recording the extents of each cell (stored in a
Bounds
object), and properties to describe the coordinates. An array of cell bounds spans the same domain axes as its coordinate array, with the addition of an extra dimension whose size is that of the number of vertices of each cell. This extra dimension does not correspond to a domain axis construct since it does not relate to an independent axis of the domain. Note that, for climatological time axes, the bounds are interpreted in a special way indicated by the cell method constructs.NetCDF interface
The netCDF variable name may be accessed with the
nc_set_variable
,nc_get_variable
,nc_del_variable
, andnc_has_variable
methods.The netCDF variable group structure may be accessed with the
nc_set_variable
,nc_get_variable
,nc_variable_groups
,nc_clear_variable_groups
, andnc_set_variable_groups
methods.The netCDF UGRID node coordinate variable name may be accessed with the
nc_set_node_coordinate_variable
,nc_get_node_coordinate_variable
,nc_del_node_coordinate_variable
, andnc_has_node_coordinate_variable
methods.The netCDF UGRID node coordinate variable group structure may be accessed with the
nc_set_node_coordinate_variable
,nc_get_node_coordinate_variable
,nc_variable_node_coordinate_groups
,nc_clear_node_coordinate_variable_groups
, andnc_set_node_coordinate_variable_groups
methods.Initialisation
- Parameters
- properties:
dict
, optional Set descriptive properties. The dictionary keys are property names, with corresponding values.
Properties may also be set after initialisation with the
set_properties
andset_property
methods.- Parameter example:
properties={'standard_name': 'latitude'}
- data: data_like, optional
Set the data.
A data_like object is any object that can be converted to a
Data
object, i.e.numpy
array_like objects,Data
objects, and cf instances that containData
objects.The data also may be set after initialisation with the
set_data
method.- bounds:
Bounds
, optional Set the bounds array.
The bounds array may also be set after initialisation with the
set_bounds
method.- geometry:
str
, optional Set the geometry type.
The geometry type may also be set after initialisation with the
set_geometry
method.- Parameter example:
geometry='polygon'
- interior_ring:
InteriorRing
, optional Set the interior ring variable.
The interior ring variable may also be set after initialisation with the
set_interior_ring
method.- source: optional
Convert source, which can be any type of object, to a
AuxiliaryCoordinate
instance.All other parameters, apart from copy, are ignored and their values are instead inferred from source by assuming that it has the
AuxiliaryCoordinate
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 aAuxiliaryCoordinate
instance thencf.AuxiliaryCoordinate(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.
- properties:
Inspection¶
Methods
Return |
|
A full description of the auxiliary coordinate construct. |
|
Return the canonical identity. |
|
Return all possible identities. |
Attributes
Return a description of the construct type. |
|
An identity for the AuxiliaryCoordinate object. |
|
The CF coordinate type. |
|
True if and only if the data are coordinates for a CF ‘T’ axis. |
|
True if and only if the data are coordinates for a CF ‘X’ axis. |
|
True if and only if the data are coordinates for a CF ‘Y’ axis. |
|
True if and only if the data are coordinates for a CF ‘Z’ axis. |
Bounds¶
Methods
Remove the bounds. |
|
Return the bounds. |
|
Whether or not there are bounds. |
|
Set the bounds. |
|
Return the bounds data. |
|
Return True if a construct has contiguous cells. |
Attributes
Return the bounds. |
|
The cell sizes. |
|
The lower bounds of cells. |
|
The upper bounds of cells. |
Geometries¶
Methods
Remove the geometry type. |
|
Return the geometry type. |
|
True if there is a geometry type. |
|
Set the geometry type. |
|
Remove the geometry type. |
|
Return the interior ring variable for polygon geometries. |
|
Whether or not there is an interior ring variable. |
|
Set the interior_ring. |
|
Remove the node count variable for geometry bounds. |
|
Return the node count variable for geometry bounds. |
|
Whether geometry bounds have a node count variable. |
|
Set the node count variable for geometry bounds. |
|
Remove the part node count variable for geometry bounds. |
|
Return the part node count variable for geometry bounds. |
|
Whether geometry bounds have a part node count variable. |
|
Set the part node count variable for geometry bounds. |
Attributes
Return the interior ring variable for polygon geometries. |
Climatology¶
Methods
Remove the climatology setting. |
|
Return the climatology setting. |
|
True if the coordinates are climatological. |
|
Set whether or not coordinates are climatological. |
Selection¶
Methods
Determine whether or not a variable satisfies conditions. |
|
Whether or not the data has a given dimensionality. |
|
Whether or not the netCDF variable name satisfies conditions. |
|
Determine whether or not a variable satisfies conditions. |
|
Whether or not the construct has given units. |
Properties¶
Methods
Remove a property. |
|
Get a CF property. |
|
Whether a property has been set. |
|
Set a property. |
|
Return all properties. |
|
Remove all properties. |
|
Remove properties. |
|
Set properties. |
Attributes
The add_offset CF property. |
|
The axis CF property. |
|
The calendar CF property. |
|
The comment CF property. |
|
The _FillValue CF property. |
|
The history CF property. |
|
The leap_month CF property. |
|
The leap_year CF property. |
|
The long_name CF property. |
|
The missing_value CF property. |
|
The month_lengths CF property. |
|
The positive CF property. |
|
The scale_factor CF property. |
|
The standard_name CF property. |
|
The units CF property. |
|
The valid_max CF property. |
|
The valid_min CF property. |
|
The valid_range CF property. |
Units¶
Methods
Override the units. |
|
Override the calendar of date-time units. |
Attributes
The |
Data¶
Attributes
A numpy array deep copy of the data. |
|
The |
|
An independent numpy array of date-time objects. |
|
Return an element of the data array as a standard Python scalar. |
|
The |
|
True if the data array is scalar. |
|
The number of data dimensions. |
|
A tuple of the data array’s dimension sizes. |
|
The number of elements in the data. |
|
A numpy array view of the data. |
Methods
Convert the data to a |
|
Return a subspace of the field construct defined by indices. |
|
Remove the data. |
|
Return the data. |
|
Whether or not the construct has data. |
|
Set the data. |
Rearranging elements
Flatten axes of the data. |
|
Flip (reverse the direction of) data dimensions. |
|
Expand the shape of the data array. |
|
Roll the data along an axis. |
|
Remove size one axes from the data array. |
|
Interchange two axes of an array. |
|
Permute the axes of the data array. |
Expanding the data
Expand the data by adding a halo. |
|
Pad an axis with missing data. |
Data array mask
Apply masking as defined by the CF conventions. |
|
Count the non-masked elements of the data. |
|
Count the masked elements of the data. |
|
Return the data array missing data value. |
|
Mask the array where invalid values occur (NaN or inf). |
A binary (0 and 1) missing data mask of the data array. |
|
Whether the mask is hard (True) or soft (False). |
|
The mask of the data array. |
Changing data values
Called to implement assignment to x[indices] |
|
Mask the array where invalid values occur (NaN or inf). |
|
Return a new variable whose data is subspaced. |
|
Set data array elements depending on a condition. |
Cyclicity¶
Methods
Set the period of cyclicity where it can be determined. |
Attributes
Whether or not a given axis is cyclic. |
|
True if a given axis is periodic. |
Miscellaneous
Change the chunk structure of the data. |
|
Close all files referenced by the construct. |
|
Convert reference time data values to have new units. |
|
Get or set the cyclicity of axes of the data array. |
|
Return or set the period for cyclic values. |
|
The names of files containing the original data and metadata. |
|
Persist the underlying dask array into memory. |
Miscellaneous¶
Methods
Join a sequence of variables together. |
|
Return a deep copy. |
|
Return the commands that would create the construct. |
|
Whether two instances are the same. |
|
Inspect the object for debugging. |
|
Bring data on disk into memory. |
|
Uncompress the construct. |
Mathematical operations¶
Methods
Trigonometrical and hyperbolic functions
Take the trigonometric inverse cosine of the data element- wise. |
|
Take the inverse hyperbolic cosine of the data element-wise. |
|
Take the trigonometric inverse sine of the data element-wise. |
|
Take the inverse hyperbolic sine of the data element-wise. |
|
Take the trigonometric inverse tangent of the data element- wise. |
|
Take the inverse hyperbolic tangent of the data element-wise. |
|
Take the trigonometric cosine of the data element-wise. |
|
Take the hyperbolic cosine of the data element-wise. |
|
Take the trigonometric sine of the data element-wise. |
|
Take the hyperbolic sine of the data element-wise. |
|
Take the trigonometric tangent of the data element-wise. |
|
Take the hyperbolic tangent of the data element-wise. |
Rounding and truncation
The ceiling of the data, element-wise. |
|
Limit the values in the data. |
|
Floor the data array, element-wise. |
|
Round the data to the nearest integer, element-wise. |
|
Round the data to the given number of decimals. |
|
Truncate the data, element-wise. |
Statistical collapses
The maximum of the data array. |
|
The unweighted mean the data array. |
|
The unweighted average of the maximum and minimum of the data array. |
|
The minimum of the data array. |
|
The absolute difference between the maximum and minimum of the data array. |
|
The number of non-missing data elements in the data array. |
|
The sum of the data array. |
|
The unweighted sample standard deviation of the data array. |
|
The unweighted sample variance of the data array. |
Exponential and logarithmic functions
The exponential of the data, element-wise. |
|
The logarithm of the data array. |
Date-time operations¶
Attributes
The day of each date-time data array element. |
|
An independent numpy array of date-time objects. |
|
The hour of each date-time data array element. |
|
The minute of each date-time data array element. |
|
The month of each date-time data array element. |
|
The reference date-time of units of elapsed time. |
|
The second of each date-time data array element. |
|
The year of each date-time data array element. |
Logic functions¶
Truth value testing
Test whether all data elements evaluate to True. |
|
Test whether any data elements evaluate to True. |
Comparison
Test whether all data are element-wise equal to other, broadcastable data. |
|
True if two constructs are equal, False otherwise. |
Set operations
The unique elements of the data. |
NetCDF¶
Methods
Remove the netCDF variable name. |
|
Return the netCDF variable name. |
|
Whether the netCDF variable name has been set. |
|
Set the netCDF variable name. |
|
Remove the netCDF node coordinate variable name. |
|
Return the netCDF node coordinate variable name. |
|
Whether the netCDF node coordinate variable name is set. |
|
Return the netCDF node coordinate variable group hierarchy. |
|
Set the netCDF node coordinate variable name. |
|
Set the netCDF node_coordinate_variable group hierarchy. |
|
Remove the netCDF node coordinate variable group hierarchy. |
Groups¶
Methods
Return the netCDF variable group hierarchy. |
|
Set the netCDF variable group hierarchy. |
|
Remove the netCDF variable group hierarchy. |
CFA¶
Methods
Add a new file location in-place. |
|
Remove all of the CFA-netCDF file name substitutions. |
|
Remove a CFA-netCDF file name substitution. |
|
Return the CFA-netCDF file name substitutions. |
|
Set CFA-netCDF file name substitutions. |
|
Remove a file location in-place. |
|
The locations of files containing parts of the data. |
Aliases¶
Methods
Alias for |
|
Alias for |
|
Alias for |
|
Alias for |
|
Alias for |
Attributes
Alias for |
Arithmetic and comparison operations¶
Arithmetic, bitwise and comparison operations are defined as element-wise operations on the data, which yield a new construct or, for augmented assignments, modify the construct’s data in-place.
Comparison operators
The rich comparison operator |
|
The rich comparison operator |
|
The rich comparison operator |
|
The rich comparison operator |
|
The rich comparison operator |
|
The rich comparison operator |
Binary arithmetic operators
The binary arithmetic operation |
|
The binary arithmetic operation |
|
The binary arithmetic operation |
|
The binary arithmetic operation |
|
The binary arithmetic operation |
|
The binary arithmetic operation |
|
The binary arithmetic operations |
|
The binary arithmetic operation |
Binary arithmetic operators with reflected (swapped) operands
The binary arithmetic operation |
|
The binary arithmetic operation |
|
The binary arithmetic operation |
|
The binary arithmetic operation |
|
The binary arithmetic operation |
|
The binary arithmetic operation |
|
The binary arithmetic operations |
|
The binary arithmetic operation |
Augmented arithmetic assignments
The augmented arithmetic assignment |
|
The augmented arithmetic assignment |
|
The augmented arithmetic assignment |
|
The augmented arithmetic assignment |
|
The augmented arithmetic assignment |
|
The augmented arithmetic assignment |
|
The augmented arithmetic assignment |
|
The binary arithmetic operation |
Unary arithmetic operators
The unary arithmetic operation |
|
The unary arithmetic operation |
|
The unary arithmetic operation |
Binary bitwise operators
The binary bitwise operation |
|
The binary bitwise operation |
|
The binary bitwise operation |
|
The binary bitwise operation |
|
The binary bitwise operation |
Binary bitwise operators with reflected (swapped) operands
The binary bitwise operation |
|
The binary bitwise operation |
|
The binary bitwise operation |
|
The binary bitwise operation |
|
The binary bitwise operation |
Augmented bitwise assignments
The augmented bitwise assignment |
|
The augmented bitwise assignment |
|
The augmented bitwise assignment |
|
The augmented bitwise assignment |
|
The augmented bitwise assignment |
Unary bitwise operators
The unary bitwise operation |
Special¶
Methods
Called to implement membership test operators. |
|
Called by the |
|
Return a subspace of the field construct defined by indices. |
|
Called by the |
|
Called to implement assignment to x[indices] |
|
Called by the |
|
Returns a numpy array representation of the data. |
|
Returns a new reference to the data. |
|
Query interface method for an “is close” condition. |
Deprecated¶
Methods
Deprecated at version 3.0.0. |
|
Deprecated at version 3.0.0. |
|
Partition the data array. |
|
Deprecated at version 3.0.0, use method |
|
Deprecated at version 3.0.0, use method |
|
Deprecated at version 3.4.0, consider using the |
|
Return the name of the file or files containing the data. |
|
Deprecated at version 3.0.0, use method |
|
Deprecated at version 3.0.0, use method |
|
Deprecated at version 3.0.0, use |
|
Mask the array where invalid values occur. |
|
Deprecated at version 3.0.0, use method ‘identity’ instead. |
|
Deprecated at version 3.0.0, use method |
|
Deprecated at version 3.0.0. |
|
Deprecated at version 3.0.0, use method |
Attributes
Deprecated at version 3.0.0. |
|
Deprecated at version 3.0.0, use |
|
Deprecated at version 3.0.0. |
|
Deprecated at version 3.0.0, use method |
|
Deprecated at version 3.0.0, use |
|
Deprecated at version 3.7.0, use |
|
Deprecated at version 3.7.0, use |
|
Deprecated at version 3.7.0, use |
|
Deprecated at version 3.7.0, use |
|
Deprecated at version 3.7.0, use |
|
Deprecated at version 3.0.0, use |