2008 Unidata NetCDF Workshop for Developers and Data Providers > Using Groups and the New NetCDF-4 Atomic Types
15.1 What are Groups?
NetCDF-4 files can organize variables, dimensions, and attributes in
hierarchical groups.
- Groups are like directories in a file system, except they are all
within a file.
- When using groups, the "ncid" becomes the ID of the file and the
group within that file. That is, different groups in the same file
will have different ncids.
- Every file contains at least the root group. The ncid of the root
groups is returned on an open or create.
- Groups (other than the root group) are part of the enhanced
model. Using groups means that no existing netCDF software (except
ncdump) will be able to read the file.
- Dimensions are scoped such that they can be seen in all child
groups.
- A global attribute is now global to the group, not the file.
- To read enhanced model netCDF-4 files in a general way, recursion
is required.
- Use of Groups is
optional, with backward compatibility maintained by putting everything
in the top-level unnamed Group.
- Unlike HDF5, netCDF-4 requires
that Groups form a strict hierarchy.
2008 Unidata NetCDF Workshop for Developers and Data Providers > Using Groups and the New NetCDF-4 Atomic Types