cf.Coordinate

class cf.Coordinate(properties={}, data=None, attributes={}, bounds=None)[source]

Bases: cf.variable.Variable

A CF dimension or auxiliary coordinate construct.

The coordinate array’s bounds (if present) are stored in the bounds attribute. The climatology CF property indicates if the bounds are intervals of climatological time.

If the coordinate is connected to one or more transform constructs then pointers to the transformations are stored in the transforms attribute.

Initialization

Parameters :
properties : dict, optional

Initialize a new instance with CF properties from the dictionary’s key/value pairs. Values are deep copied.

data : cf.Data, optional

Provide the new instance with an N-dimensional data array. The array is deep copied.

attributes : dict, optional

Provide the new instance with attributes from the dictionary’s key/value pairs. Values are deep copied.

bounds : cf.CoordinateBounds, optional

Provide the new instance with cell bounds.

Coordinate CF properties

add_offset The add_offset CF property.
axis The axis CF property.
calendar The calendar CF property.
comment The comment CF property.
_FillValue The _FillValue CF property.
history The history CF property.
leap_month The leap_month CF property.
leap_year The leap_year CF property.
long_name The long_name CF property.
missing_value The missing_value CF property.
month_lengths The month_lengths CF property.
positive The positive CF property.
scale_factor The scale_factor CF property.
standard_name The standard_name CF property.
units The units CF property.
valid_max The valid_max CF property.
valid_min The valid_min CF property.
valid_range The valid_range CF property.

Coordinate data attributes

array A numpy array deep copy of the data array.
Data The Data object containing the data array.
dtype Numpy data-type of the data array.
_FillValue The _FillValue CF property.
first_datum The first element of the data array.
hardmask Whether the mask is hard (True) or soft (False).
isscalar True if and only if the data array is a scalar array.
last_datum The last element of the data array.
mask A variable containing the mask of the data array.
ndim Number of dimensions in the data array.
shape Tuple of the data array’s dimension sizes.
size Number of elements in the data array.
Units The Units object containing the units of the data array.
varray Return a numpy view of the data.

Coordinate attributes

bounds The cf.CoordinateBounds object containing the data array’s cell
climatology Indicator for the coordinate array’s bounds representing climatological time intervals.
id A definitive identity for the variable.
isbounded True if and only if the coordiante has cell bounds.
islatitude True if and only if the coordinate represents latitude.
islongitude True if and only if the coordinate represents longitude.
properties A dictionary of the CF properties.
subspace Return a new coordinate whose data and bounds are subspaced in a consistent manner.
transforms A list containing pointers to the coordinate’s transforms.

Coordinate methods

binary_mask Return a binary missing data mask of the data array.
chunk
contiguous Return True if a coordinate is contiguous.
copy Return a deep copy.
cos Take the trigonometric cosine of the data array and bounds in place.
delprop Delete a CF property.
dump Return a string containing a full description of the coordinate.
equals True if two variables are logically equal, False otherwise.
expand_dims axis is an integer
flip Flip dimensions of the data array and bounds in place.
getprop Get a CF property.
hasprop Return True if the variable has a CF property.
identity Return the variable’s identity.
insert_data Insert a new data array into the coordinate in place.
insert_bounds Insert a new bounds data array into the coordinate in-place.
match Determine whether or not a variable satisfies conditions.
name Return a name for the variable.
override_units Override the data array units in place.
select Return the instance if it matches the given conditions.
setitem Set selected elements of the data array in place.
setmask Set selected elements of the data array’s mask in place.
setprop Set a CF property.
sin Take the trigonometric sine of the data array and bounds in place.
squeeze Remove size 1 dimensions from the data array and bounds in place.
transpose Permute the dimensions of the data array and bounds in place.

Table Of Contents

Previous topic

cf.CellMethods.strings

Next topic

cf.Coordinate.add_offset

This Page