Previous: The Next: Another Simple Example Table of contents Frames 2012 Unidata NetCDF Workshop > The NetCDF Classic Data Model

5.7 Introducing CDL (Common Data Language)
CDL (Common Data Language) is a human-readable notation for netCDF objects and data.
  netcdf example {   // example of CDL notation
  dimensions:
	  lon = 3 ;
	  lat = 8 ;
  variables:
	  float rh(lon, lat) ;
		  rh:units = "percent" ;
		  rh:long_name = "Relative humidity" ;
  // global attributes
	  :title = "Simple example, lacks some conventions" ;
  data:
   rh =
    2, 3, 5, 7, 11, 13, 17, 19,
    23, 29, 31, 37, 41, 43, 47, 53,
    59, 61, 67, 71, 73, 79, 83, 89 ;
  }
This example specifies a netCDF dataset with two dimensions (lon and lat), one variable (rh), two variable attributes (units and long_name), one global attribute (title), and some data values for the variable.

 


Previous: The Next: Another Simple Example Table of contents Frames 2012 Unidata NetCDF Workshop > The NetCDF Classic Data Model