Previous: Enumerations Next: NetCDF-4 Performance Improvements Table of contents Frames User guide
2008 Unidata NetCDF Workshop for Developers and Data Providers > Introduction to NetCDF-4

11.8 Variable-Length Types
Variable-Length types provide support for ragged arrays.
Simple example: ragged array
  types:
    float(*) row_of_floats;
  dimensions:
    m = 50;
  variables:
    row_of_floats ragged_array(m);
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: Enumerations Next: NetCDF-4 Performance Improvements Table of contents Frames User guide
2008 Unidata NetCDF Workshop for Developers and Data Providers > Introduction to NetCDF-4