Previous: All the data Next: Data for a few specified variables Table of contents Frames User guide
2009 Unidata NetCDF Workshop for Developers and Data Providers > NetCDF Utilities: ncdump and ncgen

5.5 Annotate values by index
To look at data values annotated with array indices:

You can specify brief (-b) or full (-f) annotation, showing indices in either 1-based Fortran or 0-based C order.

5.5.0 Brief annotation, Fortran order
$ ncdump -b f mslp.nc
netcdf mslp {
dimensions:
	lat = 6 ;
	lon = 4 ;
	time = UNLIMITED ; // (2 currently)
variables:
	float lat(lat) ;
		lat:units = "degrees_north" ;
	float lon(lon) ;
		lon:units = "degrees_east" ;
	double time(time) ;
		time:units = "seconds since 2009-01-01" ;
	float pr(time, lat, lon) ;
		pr:standard_name = "air_pressure_at_sea_level" ;
		pr:units = "hPa" ;

// global attributes:
		:title = "example for workshop" ;
data:

 lat = 25, 30, 35, 40, 45, 50 ;

 lon = -125, -110, -95, -80 ;

 time = 7776000, 15552000 ;

 pr =
  // pr(1-4 ,1,1)
    900.5, 901, 902, 903,
  // pr(1-4 ,2,1)
    904, 905, 906, 907,
  // pr(1-4 ,3,1)
    908, 909, 910, 911,
  // pr(1-4 ,4,1)
    912, 913, 914, 915,
  // pr(1-4 ,5,1)
    916, 917, 918, 919,
  // pr(1-4 ,6,1)
    920, 921, 922, 923,
  // pr(1-4 ,1,2)
    972, 973, 974, 975,
  // pr(1-4 ,2,2)
    976, 977, 978, 979,
  // pr(1-4 ,3,2)
    980, 981, 982, 983,
  // pr(1-4 ,4,2)
    984, 985, 986, 987,
  // pr(1-4 ,5,2)
    988, 989, 990, 991,
  // pr(1-4 ,6,2)
    992, 993, 994, 995 ;
}
5.5.1 Full annotation, C order
$ ncdump -f c mslp.nc
netcdf mslp {
dimensions:
	lat = 6 ;
	lon = 4 ;
	time = UNLIMITED ; // (2 currently)
variables:
	float lat(lat) ;
		lat:units = "degrees_north" ;
	float lon(lon) ;
		lon:units = "degrees_east" ;
	double time(time) ;
		time:units = "seconds since 2009-01-01" ;
	float pr(time, lat, lon) ;
		pr:standard_name = "air_pressure_at_sea_level" ;
		pr:units = "hPa" ;

// global attributes:
		:title = "example for workshop" ;
data:

 lat =
    25,  // lat(0)
    30,  // lat(1)
    35,  // lat(2)
    40,  // lat(3)
    45,  // lat(4)
    50;  // lat(5)
    
 lon =
    -125,  // lon(0)
    -110,  // lon(1)
    -95,  // lon(2)
    -80;  // lon(3)
    
 time =
    7776000,  // time(0)
    15552000;  // time(1)
    
 pr =
  900.5,  // pr(0,0,0)
    901,  // pr(0,0,1)
    902,  // pr(0,0,2)
    903,  // pr(0,0,3)
    904,  // pr(0,1,0)
    905,  // pr(0,1,1)
    906,  // pr(0,1,2)
    907,  // pr(0,1,3)
    908,  // pr(0,2,0)
    909,  // pr(0,2,1)
    910,  // pr(0,2,2)
    911,  // pr(0,2,3)
    912,  // pr(0,3,0)
    913,  // pr(0,3,1)
    914,  // pr(0,3,2)
    915,  // pr(0,3,3)
    916,  // pr(0,4,0)
    917,  // pr(0,4,1)
    918,  // pr(0,4,2)
    919,  // pr(0,4,3)
    920,  // pr(0,5,0)
    921,  // pr(0,5,1)
    922,  // pr(0,5,2)
    923,  // pr(0,5,3)
    972,  // pr(1,0,0)
    973,  // pr(1,0,1)
    974,  // pr(1,0,2)
    975,  // pr(1,0,3)
    976,  // pr(1,1,0)
    977,  // pr(1,1,1)
    978,  // pr(1,1,2)
    979,  // pr(1,1,3)
    980,  // pr(1,2,0)
    981,  // pr(1,2,1)
    982,  // pr(1,2,2)
    983,  // pr(1,2,3)
    984,  // pr(1,3,0)
    985,  // pr(1,3,1)
    986,  // pr(1,3,2)
    987,  // pr(1,3,3)
    988,  // pr(1,4,0)
    989,  // pr(1,4,1)
    990,  // pr(1,4,2)
    991,  // pr(1,4,3)
    992,  // pr(1,5,0)
    993,  // pr(1,5,1)
    994,  // pr(1,5,2)
    995;  // pr(1,5,3)
    }

5.5.0  Brief annotation, Fortran order
5.5.1  Full annotation, C order

 


Previous: All the data Next: Data for a few specified variables Table of contents Frames User guide
2009 Unidata NetCDF Workshop for Developers and Data Providers > NetCDF Utilities: ncdump and ncgen