Models, Conventions, and Formats
Data models, conventions, and formats are at different levels of abstraction.
NetCDF Data Models
NetCDF supports two data models: classic and enhanced.
NetCDF files are containers for Dimensions, Variables, and Global Attributes.
Dimensions are used to specify variable shapes, common grids, and coordinate systems.
Variables hold data values. In the classic netCDF data model, a variable can hold a multidimensional array of values of the same type.
Things you can do with a netCDF variable include getting information about it, putting data values into it, and getting data values out of it.
Attributes hold metadata (data about data). An attribute contains information about properties of a variable or dataset.
Things you can do with a netCDF attribute include inquiring about its type or length, defining its value, and getting its value.
The "Classic" NetCDF Data Model
The classic netCDF data model uses dimensions, variables, and attributes, to capture the meaning of array-oriented scientific data.
Introducing CDL (Common Data Language)
CDL (Common Data Language) is text notation for netCDF objects and data. It will be used for examples during the workshop.
Another Simple Example
In this example, a simple data file is examined with ncdump, showing its dimensions, variables, and attributes as CDL.
A Convention for Coordinates: Coordinate Variables
Coordinate Variables contain the coordinate values for a dimension.
An Example of Coordinate Variables
A concrete example of simple coordinate variables.
Variables Versus Attributes
When should you use variables or attributes?
Classic NetCDF Model Limitations
The classic netCDF data model used for netCDF-3 has some limitations.
The NetCDF-4 Data Model
The netCDF-4 data model adds Groups and User-Defined Types to the classic netCDF data model, but backward compatibility is preserved.
When to Use the Enhanced Data Model
The enhanced data model offers rich features, but breaks backward compatibility.