2011 Unidata NetCDF Workshop > Using Groups and NetCDF-4 Types
16.18 Example of Variable-Length Types
This examples shows a 1D VLEN array.
A simple 1D VLEN array can representing a
ragged array (rows of differing lengths):
ragged array in vlens.cdl
Here is C code that creates the corresponding netCDF file, generated
by running:
ncgen -k 3 -l C vlens.cdl > vlens.c
vlens.c
Notes on netCDF-4 Variable-Length Types
- Any base type may be used (including compound types and other
variable-length types).
- There is no associated shared dimension, unlike unlimited dimensions.
2011 Unidata NetCDF Workshop > Using Groups and NetCDF-4 Types