2008 Unidata NetCDF Workshop for Developers and Data Providers > The "Classic" NetCDF Data Model
3.7 Variables
Variables hold data values. In the classic
netCDF data model, a variable can hold a multidimensional array of
values of the same type.
A variable has a name, type, shape, attributes, and values.
- In the classic data model, the type of a variable is the
external type of its data as represented on disk, one of
- char
- byte (8 bits)
- short (16 bits)
- int (32 bits)
- float (32 bits)
- double (64 bits)
- The shape of a variable is specified with a list of
dimensions.
- no dimensions: a scalar variable with only one value
- 1 dimension: a 1-D (vector) variable
- 2 dimensions: a 2-D (matrix or grid) variable
- ...
- A variable may have attributes to specify properties
such as units.
- The values of variables are the data in a netCDF file.
- A record variable is a variable that uses a record (or
unlimited) dimension. It can grow efficiently by having data added
along the record dimension.
2008 Unidata NetCDF Workshop for Developers and Data Providers > The "Classic" NetCDF Data Model