Previous: CDL Example of Variable-Length Types Next: Variable Length C Example Table of contents Frames User guide
2009 Unidata NetCDF Workshop for Developers and Data Providers > User Defined Types in NetCDF-4

23.14 CDL Example of Nested Variable-Length Types
This CDL example shows nested VLENs.
Nested example: in situ observations
types:
  compound obs_t {               // type for a single observation
    float pressure ;
    float temperature ;
    float salinity ;
  }
  obs_t some_obs_t(*) ;          // type for some observations
  compound profile_t {           // type for a single profile
    float latitude ;
    float longitude ;
    int time ;
    some_obs_t obs ;
  }
  profile_t some_profiles_t(*) ; // type for some profiles
  compound track_t {             // type for a single track
    string id ;
    string description ;
    some_profiles_t profiles;
  }
dimensions: 
  tracks = 42;
variables:  
  track_t cruise(tracks); // this cruise has 42 tracks

Notes on netCDF-4 Variable-Length Types

 


Previous: CDL Example of Variable-Length Types Next: Variable Length C Example Table of contents Frames User guide
2009 Unidata NetCDF Workshop for Developers and Data Providers > User Defined Types in NetCDF-4