Groups and User Defined Types in NetCDF-4
NetCDF-4 group and user defined types are powerful new netCDF-4 features.
NetCDF-4 files can organize variables, dimensions, and attributes in hierarchical groups.
Using User Defined Types
User-defined types can be used to store N-dimensional arrays structs, variable length arrays, enumerations, and opaque data ojects of known size.
Learning about User Defined Types
Inquiry functions in netCDF-4 allow users to learn about user-defined types when reading a file.
Using Compound Types
Compound types can store arrays of structures.
Using Variable Length Types
The variable length type can hold arrays of variable length.
Using Variable Length Types, Continued
Memory for variable length array data is allocated by the library when they are read, and must be freed by the user.
The enumerated type can associate labels with names.
Using the Opaque Type
The opaque type holds arrays of unknown contents, with known size.
Sea Sounding Example Code
Sea Sounding Example
The ncdump output shows the type defined by nc_test4/cdm_sea_soundings.c.