2010 Unidata NetCDF Workshop > Using Groups and NetCDF-4 Types
22.2 CDL Example of Groups
This CDL example demonstrates one use of groups.
Organizing data by a named property such as region:
regions.cdl
Some things to note in this example:
- There are 3 different, independent dimensions named "station",
one for each of the subgroups "Colorado", "Wyoming", and
"Alaska".
- The unlimited dimension "time" in the "USA" group is inherited
by each of the subgroups, which use it to define the shape of their
different "temperature" variables.
Here is C code that creates the corresponding netCDF file, generated
by running:
ncgen -k 3 -l C regions.cdl > regions.c
regions.c
2010 Unidata NetCDF Workshop > Using Groups and NetCDF-4 Types