netCDF
4.2.1.1
|
This example is an unrealistically simple netCDF file, to demonstrate the minimum operation of the netCDF APIs.
Users should seek to make their netCDF files more self-describing than this primitive example.
As in all the netCDF tutorial examples, this example file can be created by C and by ncgen, which creates it from a CDL script. Both ncgen and the C example create identical files, “simple_xy.nc.”
The simple_xy.nc data file contains two dimensions, “x” and “y”, and one netCDF variable, “data.”
The CDL for this example is shown below. For more information on ncdump and ncgen see NetCDF Utilities.
netcdf simple_xy {
dimensions:
x = 6 ;
y = 12 ;
variables:
int data(x, y) ;
data:
data =
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71 ;
}