= Draft of the CF Data Model 1.5 =
This page is the working draft of the CF data model for CF 1.5, under the terms of reference of ticket #88. The original discussion in ticket #68 have been closed and a new ticket #95 opened to move adapt this draft model to a community accepted model.
== UML Sketch ==
This sketch represents the model in its draft state, illustrating the relationships between types.
[[Image(cf1.5.png)]]
== Controlled Vocabularies ==
==== standard_name ====
Where a type has an attribute of 'standard_name' its value must be taken from the list of standard names [http://cf-pcmdi.llnl.gov/documents/cf-standard-names/ http://cf-pcmdi.llnl.gov/documents/cf-standard-names/]
= Constructs, Types =
== Field ==
The central concept of the data model is a Field. A Field corresponds to exactly one data array together with associated information about the domain and sampling in which the data resides (defined by spatio-temporal and other coordinates) and other metadata. This data model makes a central assumption that each Field is independent.
''The Field defines a domain and one phenomenon described over that domain. It contains a multi-dimensional array of data values, which may include missing data, and the metadata which define the domain.''
Each Field may contain the following, all of which are optional.
* An ordered list of !DomainAxis instances.
* A data array whose shape is determined by the domain axes in the order listed, optionally omitting any domain axes of size one.
* ''(It is possible to omit domain axes of size one because their position in the order of domain axes makes no difference to the order of data elements in the array.) If there are no domain axes of greater size than one, the single datum may be a scalar instead of an array. If the data array has more than one element, they must all be of the same data type, which may be numeric, character or string.''
* A dimension_coords collection of !DimCoord instances:
* A dimension coord member provides physical coordinates to define and locate the cells at unique positions along a single !DomainAxis.
* Each member is referenced by the Field using a qualified association, exclusively mediated by one !DomainAxis instance;
* i.e. a !DomainAxis may reference one or zero !DimCoords as a member of the Field's dimension_coords
* An auxiliary_coords collection of !AuxCoord and !DimCoord instances.
* An auxiliary coord provides physical coordinates to locate the cells along one or more !DomainAxis instances.
* A cell_measures collection of !CellMeasure instances.
* ''A cell methods construct, which refers to the domain axes (but not their sizes).''
* ''A cell_methods container of !CellMethod instances referencing elements of the dimension_coords collection.''
* A collection of Transform constructs
* ''Attributes: key:value pairs which serve to describe the data the field contains.''
* ''Other properties, which are metadata that do not refer to the domain axes, and serve to describe the data the field contains. Properties may be of any data type (numeric, character or string) and can be scalars or arrays. These properties correspond to attributes in the netCDF file, but we use the term "property" instead because not all CF-netCDF attributes are properties in this sense.''
* ''A list of ancillary fields (corresponding to the CF-netCDF ancillary_variables attribute, which identifies other data variables that provide metadata). ''
Collectively, the domain_axes, dimension_coordinates, auxiliary_coordinates, cell_measures and cell_methods describe the domain and sampling in which the data resides. Thus a Field can be regarded as a domain with data in that domain.
== !DomainAxis ==
A !DomainAxis declares a degree of freedom of the field. It must contain
A size: a postive integer greater than zero
== !DimCoord ==
A !DimCoords instance must contain:
* A one-dimensional numerical coordinate array of the size specified by a referencing !DomainAxis.
* ''If the size is one, the single coordinate value may be a scalar instead of an array.''
* If the size is greater than one, the elements of the coordinate array must all be of the same numeric data type, they must all have different non-missing values, and they must be strictly monotonic: increasing or decreasing.
* !DimCoord instances cannot have string-valued coordinates.
and may contain:
* A two-dimensional numerical boundary array, whose slow-varying dimension (first in CDL, second in Fortran) equals the size specified by the referencing !DomainAxis, and whose fast-varying dimension is two indicating the extent of the cell.
* For climatological time dimensions, the bounds are interpreted in a special way indicated by the cell methods.
* ''Sometimes the bounds are the important information for locating the cell, and the coordinates are notional, especially for extensive quantities.''
* ''Attributes: key:value pairs, describing the !DimCoord instance definition''
* ''Properties (in the same sense as for the field construct) serving to describe the coordinates. ''
== !AuxCoord ==
An !AuxCoord must contain:
* A coordinate array whose shape is determined by the referencing !DomainAxes in the order listed
* ''optionally omitting any domain axes of size one. If all domain axes are of size one, the single coordinate value may be a scalar instead of an array.''
* If the array has more than one element, they must all be of the same data type (numeric, character or string), but they do not have to be distinct or monotonic.
* ''Missing values are not allowed (in CF version 1.5).'' ^i thought they were^
and may also contain
* A boundary array with all the dimensions, in the same order, as the coordinate array, and an additional dimension (following the coordinate array dimensions in CDL, preceding them in Fortran) equal to the number of vertices of each cell.
* ''Attributes: key:value pairs, describing the !AuxCoord instance definition''
* ''Properties (in the same sense as for the field construct) serving to describe the coordinates. ''
=== Notes ===
==== Qualified Associations ====
The associations between the Field and its Coordinates and !CellMeasures are qualified associations. These are UML concepts which denote a managed association without mandating how this association is managed; only the constraints of the relationship are detailed.
E.g. a Field may define One or Zero dimension_coordinates (!DimCoord instances) for each !DomainAxis of the Field.