Previous: Additional Numeric Types Next: Using User Defined Types Table of contents Frames User guide
2008 Unidata NetCDF Workshop for Developers and Data Providers

16 User Defined Types in NetCDF-4
NetCDF-4 introduces user defined types in the enhanced data model.

16.0  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.
16.1  Writing and Reading Data of User Defined Type
Use these functions to read or write data of user defined type.
16.2  Learning about User Defined Types
Inquiry functions in netCDF-4 allow users to learn about user-defined types when reading a file.
16.3  Introduction to Compound Types
Use compound types to group data together.
16.4  Compound Type CDL Example
This CDL exampls shows a compound type.
16.5  Using Compound Types
Compound types can store arrays of structures.
16.6  Using Enums
The enumerated type can associate labels with names.
16.7  Uses of Enumerations
What are the uses for enum data?
16.8  Enum CDL Example
A CDL example shows enumerations which classify cloud types.
16.9  Enum Example
This example shows how to use enums from the C API.
16.10  Using the Opaque Type
The opaque type holds arrays of unknown contents, with known size.
16.11  Variable-Length Types
Variable-Length types provide support for ragged arrays.
16.12  Introuction to Variable Length Types
Variable length array types allow for the storage of ragged arrays.
16.13  CDL Example of Variable-Length Types
This CDL example shows a 1D VLEN array.
16.14  Variable Length C Example
This example shows the use of a VLEN type as an attribute.
16.15  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.
16.16  Sea Sounding Example Code
16.17  Sea Sounding Example
The ncdump output shows the type defined by nc_test4/cdm_sea_soundings.c.

 


Previous: Additional Numeric Types Next: Using User Defined Types Table of contents Frames User guide
2008 Unidata NetCDF Workshop for Developers and Data Providers