cfdm.core.Field¶
-
class
cfdm.core.
Field
(properties=None, source=None, copy=True, _use_data=True)[source]¶ Bases:
cfdm.core.mixin.constructaccess.ConstructAccess
,cfdm.core.abstract.propertiesdata.PropertiesData
A field construct of the CF data model.
The field construct is central to the CF data model, and includes all the other constructs. A field corresponds to a CF-netCDF data variable with all of its metadata. All CF-netCDF elements are mapped to a field construct or some element of the CF field construct. The field construct contains all the data and metadata which can be extracted from the file using the CF conventions.
The field construct consists of a data array and the definition of its domain (that describes the locations of each cell of the data array), field ancillary constructs containing metadata defined over the same domain, and cell method constructs to describe how the cell values represent the variation of the physical quantity within the cells of the domain. The domain is defined collectively by the following constructs of the CF data model: domain axis, dimension coordinate, auxiliary coordinate, cell measure, coordinate reference and domain ancillary constructs. All of the constructs contained by the field construct are optional.
The field construct also has optional properties to describe aspects of the data that are independent of the domain. These correspond to some netCDF attributes of variables (e.g. units, long_name and standard_name), and some netCDF global file attributes (e.g. history and institution).
New in version (cfdm): 1.7.0
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': 'air_temperature'}
- source: optional
Initialize the properties, data and metadata constructs from those of source.
Note that if source is a
Field
instance thencfdm.core.Field(source=source)
is equivalent tosource.copy()
.- copy:
bool
, optional If False then do not deep copy input parameters prior to initialization. By default arguments are deep copied.
- properties:
Properties¶
Methods
Remove a property. |
|
Return a property. |
|
Whether a property has been set. |
|
Set a property. |
|
Return all properties. |
|
Remove all properties. |
|
Set properties. |
Data¶
Methods
Remove the data. |
|
Return the data. |
|
Whether a data has been set. |
|
Set the data of the field construct. |
|
Remove the keys of the domain axis constructs spanned by the data of the field or of a metadata construct. |
|
Return the keys of the domain axis constructs spanned by the data of the field or of a metadata construct. |
|
Whether the domain axis constructs spanned by the data of the field or of a metadata construct have been set. |
|
Set the domain axis constructs spanned by the data of the field or of a metadata construct. |
Attributes
Return the data. |
Metadata constructs¶
Methods
Remove a metadata construct. |
|
Return a metadata construct. |
|
Whether a metadata construct exists. |
|
Set a metadata construct. |
|
Remove the keys of the domain axis constructs spanned by the data of the field or of a metadata construct. |
|
Return the keys of the domain axis constructs spanned by the data of the field or of a metadata construct. |
|
Whether the domain axis constructs spanned by the data of the field or of a metadata construct have been set. |
|
Set the domain axis constructs spanned by the data of the field or of a metadata construct. |
Attributes
Return the metadata constructs. |
Docstring substitutions¶
Methods
Return the special docstring substitutions. |
|
Return the docstring substitutions that apply to methods of the given class. |
|
Return the package depth, N, for {{package}} docstring substitutions for the given class. |
|
Return the names of methods to exclude from docstring substitutions for the given class. |