Bases: cf.variable.Variable
A field construct according to the CF data model.
A field is a container for a data array and metadata comprising properties to describe the physical nature of the data and a coordinate system (called a domain) which describes the positions of each element of the data array.
The field’s domain may contain dimensions and auxiliary coordinate and cell measure objects (which themselves contain data arrays and properties to describe them) and transform objects.
All components of a field are optional.
Miscellaneous
Field objects are picklable.
Initialization
Parameters : |
|
---|
add_offset | The add_offset CF property. |
calendar | The calendar CF property. |
cell_methods | The cf.CellMethods object containing the CF cell methods of the data |
comment | The comment CF property. |
Conventions | The Conventions CF property. |
_FillValue | The _FillValue CF property. |
flag_masks | The flag_masks CF property. |
flag_meanings | The flag_meanings CF property. |
flag_values | The flag_values CF property. |
history | The history CF property. |
institution | The institution 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. |
references | The references CF property. |
scale_factor | The scale_factor CF property. |
source | The source CF property. |
standard_error_multiplier | The standard_error_multiplier CF property. |
standard_name | The standard_name CF property. |
title | The title 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. |
ancillary_variables | A cf.AncillaryVariables object containing CF ancillary data. |
array | A numpy array deep copy of the data array. |
attributes | A dictionary of the attributes which are not CF properties. |
data | The cf.Data object containing the data array. |
day | The day of each data array element. |
domain | The cf.Domain object containing the field’s domain. |
dtarray | An independent numpy array of date-time objects. |
dtvarray | A numpy array view the data array converted to date-time objects. |
dtype | The numpy data type of the data array. |
Flags | A cf.Flags object containing self-describing CF flag values. |
hardmask | Whether the mask is hard (True) or soft (False). |
hour | The hour of each data array element. |
isscalar | True if and only if the data array is a scalar array. |
mask | A field containing the mask of the data array. |
minute | The minute of each data array element. |
month | The month of each data array element. |
ndim | Number of dimensions in the data array. |
properties | A dictionary of the CF properties. |
second | The second of each data array element. |
shape | Tuple of the data array’s dimension sizes. |
size | Number of elements in the data array. |
subspace | Return a new object which will get or set a subspace of the field. |
unique | The unique elements of the array. |
Units | The cf.Units object containing the units of the data array. |
varray | A numpy array view of the data array. |
year | The year of each data array element. |
asdatetime | Change the internal representation of data array elements from numeric reference times to datatime-like objects. |
asreftime | Change the internal representation of data array elements from datatime-like objects to numeric reference times. |
aux | Return an auxiliary coordinate object of the domain, or its domain identifier. |
auxs | Return auxiliary coordinate objects of the domain. |
axes | Return domain axis identifiers from the field. |
binary_mask | Return 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 field. |
cm | Return a cell measure object of the domain, or its domain identifier. |
cms | Return cell measure objects of the domain. |
coord | Return a dimension or auxiliary coordinate object of the domain, or its domain identifier. |
coords | Return dimension and auxiliary coordinate objects of the domain. |
copy | Return a deep copy. |
cos | Take the trigonometric cosine of the data array. |
data_axes | Return the axes of the field’s data array. |
datum | Return an element of the data array as a standard Python scalar. |
delattr | Delete a named attribute. |
delprop | Delete a CF property. |
dim | Return a dimension coordinate object of the domain, or its domain identifier. |
dims | Return dimension coordinate objects of the domain. |
dump | Return a string containing a description of the field. |
equals | True if two fields are logically equal, False otherwise. |
equivalent | True if and only if two fields are logically equivalent. |
equivalent_data | Equivelence is defined as both fields having the same data arrays after accounting for different but equivalent units, size one dimensions, different dimension directions and different dimension orders. |
equivalent_domain | |
expand_dims | Insert a size 1 axis into the data array. |
fill_value | Return the data array missing data value. |
flip | Flip (reverse the direction of) axes of the field. |
getattr | Get a named attribute. |
getprop | Get a CF property. |
hasattr | Return whether an attribute exists. |
hasprop | Return True if a CF property exists, otherise False. |
identity | Return the variable’s identity. |
indices | Return the data array indices which correspond to one dimensional coordinate object values. |
insert_aux | Insert an auxiliary coordinate object into the domain in place. |
insert_axis | Insert an axis into the domain in place. |
insert_cm | Insert an cell measure object into the domain in place. |
insert_data | Insert a new data array into the field in place. |
insert_dim | Insert a dimension coordinate object into the domain in place. |
insert_transform | Insert a transform object into the domain in place. |
item | Return an item, or its domain identifier, from the field. |
item_axes | Return the axes of a domain item of the field. |
items | Return domain items from the field. |
iter | Return a single element iterable for the output of a method (with arguments). |
mask_invalid | Mask the array where invalid values occur (NaNs or infs). |
match | Test whether or not the field satisfies the given conditions. |
method | Return the results of a callable method (with arguments) applied to the field. |
name | Return a name for the variable. |
override_units | Override the data array units in place. |
remove_axes | Remove and return axes from the field. |
remove_axis | Remove and return an axis from the field. |
remove_data | Remove and return the data array of the field. |
remove_item | Remove and return a domain item from the field. |
remove_items | Remove and return domain items from the domain. |
select | Return the field if it satisfies the given conditions. |
setattr | Set a named attribute. |
setdata | Set data array elements depending on a condition. |
setprop | Set a CF property. |
sin | Take the trigonometric sine of the data array. |
sort | Sort of the field in place. |
squeeze | Remove size 1 axes from the data array. |
subspace | Return a new object which will get or set a subspace of the field. |
transform | Return a transform object of the domain, or its domain identifier. |
transforms | Return transforms of the domain. |
transpose | Permute the axes of the data array in place. |
unsqueeze | Insert size 1 axes into the data array of the field. |
See the section on arithmetic and comparison operations.
Standard library functions
__deepcopy__ | Used if copy.deepcopy is called on the variable. |
__hash__ | x.__hash__() <==> hash(x) |
Container customization
__len__ | |
__getitem__ | x.__getitem__(index) <==> x[index] |
__contains__ | Membership test operators |
String representations
__repr__ | |
__str__ |