2010 Unidata NetCDF Workshop > Introduction to the NetCDF APIs and Example Programs
9.15 The NetCDF Example Data Sets
The example datasets are produced by the example programs.
- The current examples write or read one
of three example data sets: simple_xy.nc, sfc_pres_temp.nc, pres_temp_4D.nc.
- For simplicity, the example data sets do not follow some best practices
for data providers (covered later in the workshop).
- The examples represent good error handling for netCDF APIs; all
return codes are checked.
- The examples that are part of the distribution are built with
"make check" as part of the netCDF build process. In addition to
examples, they function as tests.
- The current examples are ordered by increasing complexity, to aid
in understanding the netCDF data model and associated APIs:
- simple_xy.nc: a simple array
- sfc_pres_temp.nc: an example with multiple variables sharing a
common grid
- pres_temp_4D.nc: a 4D example using an unlimited (record)
dimension that accesses data one slice at a time
- simple_nc4.nc: similar to simple_xy.nc, but with groups and a
user-defined type.
2010 Unidata NetCDF Workshop > Introduction to the NetCDF APIs and Example Programs