2011 Unidata NetCDF Workshop > The Two NetCDF Data Models
4.6 Attributes
Attributes hold metadata (data about data). An attribute contains
information about properties of a variable or dataset.
An attribute has a name, type, and values. Attributes are used to
specify such properties as units, standard names (that identify types
of quantity), special values, maximum and minimum valid values,
scaling factors, offsets, and measurement parameters.
- Like variables, the type of an attribute may be one of char, byte, short, int,
float, or double for the classic model, or additionally unsigned
byte, unsigned short, unsigned int, int64, unsigned int64, string,
or user-defined type for the enhanced model.
- An attribute may have multiple values, but
attributes cannot be multidimensional.
- Global attributes apply to a whole file. Variable attributes
apply to a specific variable.
- NetCDF conventions are defined primarily in terms of
attributes. Thus the names of attributes are standardized rather
than the names of variables.
- Attributes cannot have attributes.
- Attributes are scalars or 1-D arrays.
2011 Unidata NetCDF Workshop > The Two NetCDF Data Models