cf.DomainAncillary¶

class
cf.
DomainAncillary
(properties=None, data=None, bounds=None, geometry=None, interior_ring=None, source=None, copy=True, _use_data=True)[source]¶ Bases:
cf.mixin.propertiesdatabounds.PropertiesDataBounds
,cfdm.domainancillary.DomainAncillary
A domain ancillary construct of the CF data model.
A domain ancillary construct provides information which is needed for computing the location of cells in an alternative coordinate system. It is referenced by a term of a coordinate conversion formula of a coordinate reference construct. It contains a data array which depends on zero or more of the domain axes.
It also contains an optional array of cell bounds, stored in a
cf.Bounds
object, recording the extents of each cell (only applicable if the array contains coordinate data), and properties to describe the data.An array of cell bounds spans the same domain axes as the data array, with the addition of an extra dimension whose size is that of the number of vertices of each cell.
NetCDF interface
The netCDF variable name of the construct may be accessed with the
nc_set_variable
,nc_get_variable
,nc_del_variable
andnc_has_variable
methods.Initialization
 Parameters
 properties:
dict
, optional Set descriptive properties. The dictionary keys are property names, with corresponding values. Ignored if the source parameter is set.
Properties may also be set after initialisation with the
set_properties
andset_property
methods. Parameter example:
properties={'standard_name': 'altitude'}
 data:
Data
, optional Set the data array. Ignored if the source parameter is set.
The data array may also be set after initialisation with the
set_data
method. bounds:
Bounds
, optional Set the bounds array. Ignored if the source parameter is set.
The bounds array may also be set after initialisation with the
set_bounds
method. source: optional
Initialize the properties, data and bounds from those of source.
 copy:
bool
, optional If False then do not deep copy input parameters prior to initialization. By default arguments are deep copied.
 properties:
Inspection¶
Methods
A full description of the domain ancillary construct. 

Return the canonical identity. 

Return all possible identities. 
Attributes
Return a description of the construct type. 

A canonical identity. 



Always False. 

Always False. 

Always False. 
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. 
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. 

Set properties. 
Attributes
The add_offset 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 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 datetime units. 
Attributes
The 
Data¶
Attributes
A numpy array deep copy of the data array. 

The 

An independent numpy array of datetime objects. 

Return an element of the data array as a standard Python scalar. 

The 

True if the data array is scalar. 

The number of dimensions in the data array. 

A tuple of the data array’s dimension sizes. 

The number of elements in the data array. 

A numpy array view of the data array. 
Methods
Return a subspace of the field construct defined by indices. 

Remove the data. 

Return the data. 

Whether a data has been set. 

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. 
Data array mask
Apply masking as defined by the CF conventions. 

Count the nonmasked elements of the data. 

Count the masked elements of the data. 

Return the data array missing data value. 
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. 

Mask the array where invalid values occur. 
Changing data values
Called to implement assignment to x[indices] 

Mask the array where invalid values occur. 

Return a new variable whose data is subspaced. 

Set data array elements depending on a condition. 
Miscellaneous
Partition the data array. 

Close all files referenced by the construct. 

Convert reference time data values to have new units. 

Return the commands that would create the construct. 

Set the cyclicity of axes of the data array. 

Return or set the period for cyclic values. 

Return the name of the file or files containing the data. 
Miscellaneous¶
Methods
Join a sequence of variables together. 

Return a deep copy. 

Whether two instances are the same. 

Inspect the object for debugging. 

Uncompress the construct. 
Mathematical operations¶
Methods
Trigonometrical and hyperbolic functions
Take the trigonometric inverse cosine of the data elementwise. 

Take the inverse hyperbolic cosine of the data elementwise. 

Take the trigonometric inverse sine of the data elementwise. 

Take the inverse hyperbolic sine of the data elementwise. 

Take the trigonometric inverse tangent of the data elementwise. 

Take the inverse hyperbolic tangent of the data elementwise. 

Take the trigonometric cosine of the data elementwise. 

Take the hyperbolic cosine of the data elementwise. 

Take the trigonometric sine of the data elementwise. 

Take the hyperbolic sine of the data elementwise. 

Take the trigonometric tangent of the data elementwise. 

Take the hyperbolic tangent of the data elementwise. 
Rounding and truncation
The ceiling of the data, elementwise. 

Limit the values in the data. 

Floor the data array, elementwise. 

Round the data to the nearest integer, elementwise. 

Round the data to the given number of decimals. 

Truncate the data, elementwise. 
Statistical collapses
Alias for 

The unweighted mean the data array. 

The unweighted average of the maximum and minimum of the data array. 

Alias for 

The absolute difference between the maximum and minimum of the data array. 

The number of nonmissing 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, elementwise. 

The logarithm of the data array. 
Datetime operations¶
Attributes
The day of each datetime data array element. 

An independent numpy array of datetime objects. 

The hour of each datetime data array element. 

The minute of each datetime data array element. 

The month of each datetime data array element. 

The reference datetime of units of elapsed time. 

The second of each datetime data array element. 

The year of each datetime 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 elementwise 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. 
Arithmetic and comparison operations¶
Arithmetic, bitwise and comparison operations are defined as elementwise operations on the data, which yield a new construct or, for augmented assignments, modify the construct’s data inplace.
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. 

TODO 

TODO 

TODO 1 