cf.CellMeasure¶
-
class
cf.
CellMeasure
(properties={}, attributes=None, data=None, copy=True)[source]¶ Bases:
cf.variable.Variable
A CF cell measure construct containing information that is needed about the size, shape or location of the field’s cells.
It is a variable which contains a data array and metadata comprising properties to describe the physical nature of the data.
Attributes
Attribute Type Description measure
str
The spatial measure being represented. Either 'area'
or'volume'
are allowed by the CF conventions.Initialization
Parameters: - properties: dict, optional
Initialize a new instance with CF properties from the dictionary’s key/value pairs.
- attributes: dict, optional
Provide the new instance with attributes from the dictionary’s key/value pairs.
- data: cf.Data, optional
Provide the new instance with an N-dimensional data array.
- copy: bool, optional
If False then do not deep copy arguments prior to initialization. By default arguments are deep copied.
CellMeasure CF properties¶
add_offset |
The add_offset 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. |
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. |
CellMeasure attributes¶
array |
A numpy array deep copy of the data array. |
data |
The cf.Data object containing the data array. |
dtarray |
An independent numpy array of date-time objects. |
dtype |
The numpy data type of the data array. |
hardmask |
Whether the mask is hard (True) or soft (False). |
isscalar |
True if the data array is scalar. |
mask |
The mask of the data array. |
ndim |
The number of dimensions in the data array. |
properties |
A dictionary of the CF properties. |
shape |
A tuple of the data array’s dimension sizes. |
size |
The number of elements in the data array. |
subspace |
Return a new variable whose data is subspaced. |
Units |
The cf.Units object containing the units of the data array. |
varray |
A numpy array view of the data array. |
CellMeasure methods¶
binary_mask |
A binary (0 and 1) missing data mask of the data array. |
chunk |
Partition the data array. |
clip |
Clip (limit) the values in the data array in place. |
close |
Close all files referenced by the variable. |
copy |
Return a deep copy. |
cos |
Take the trigonometric cosine of the data array. |
datum |
Return an element of the data array as a standard Python scalar. |
delprop |
Delete a CF property. |
dump |
Return a string containing a full description of the cell measure. |
equals |
True if two cell measures are equal, False otherwise. |
expand_dims |
Insert a size 1 axis into the data array. |
files |
Return the names of any files containing parts of the data array. |
fill_value |
Return the data array missing data value. |
flip |
Flip dimensions of the data array in place. |
getprop |
Get a CF property. |
hasprop |
Return True if a CF property exists, otherise False. |
HDF_chunks |
Specify HDF5 chunks for the data array. |
identity |
Return the cell measure’s identity. |
insert_data |
Insert a new data array into the variable in place. |
mask_invalid |
Mask the array where invalid values occur (NaN or inf). |
match |
Determine whether or not a variable satisfies conditions. |
name |
Return a name for the cell measure. |
override_units |
Override the units. |
select |
Return the instance if it matches the given conditions. |
setprop |
Set a CF property. |
sin |
Take the trigonometric sine of the data array. |
squeeze |
Remove size 1 dimensions from the data array in place. |
transpose |
Permute the dimensions of the data array. |
where |
Set data array elements depending on a condition. |