I work with netCDF files of atmospheric and oceanographic mode/observational data. I found it very important to understand a little bit about the format first before attempting to work with it so I would recommend that as a starting point for you (the Wikipedia entry is a fairly good basic overview). Essentially the header is the part of the netCDF file that describes the rest of the file. It tells you what axes and variables are contained within and their types, units, sizes etc. Basically it tells you everything you could need to know about the actual data contained within the file. Here is an example of a netCDF header:
Code:
netcdf mslp {
dimensions:
time0 = UNLIMITED ; // (841 currently)
z16_msl = 1 ;
latitude0 = 145 ;
longitude1 = 192 ;
variables:
double time0(time0) ;
time0:units = "days since 1970-01-01 00:00:0" ;
time0:calendar = "360_day" ;
time0:axis = "T" ;
float z16_msl(z16_msl) ;
z16_msl:units = "" ;
z16_msl:axis = "Z" ;
double latitude0(latitude0) ;
latitude0:point_spacing = "even" ;
latitude0:standard_name = "latitude" ;
latitude0:units = "degrees_north" ;
latitude0:axis = "Y" ;
float longitude1(longitude1) ;
longitude1:point_spacing = "even" ;
longitude1:standard_name = "longitude" ;
longitude1:axis = "X" ;
longitude1:units = "degrees_east" ;
longitude1:modulo = "360.0" ;
longitude1:topology = "circular" ;
float p_3(time0, z16_msl, latitude0, longitude1) ;
p_3:stash_item = 222 ;
p_3:missing_value = -1.073742e+09f ;
p_3:stash_model = 1 ;
p_3:lookup_source = "defaults (cdunifpp V0.8)" ;
p_3:referrer = "cdat" ;
p_3:stash_section = 16 ;
p_3:long_name = "PRESSURE AT MEAN SEA LEVEL" ;
p_3:cell_methods = "time0: mean" ;
p_3:units = "Pa" ;
p_3:name = "p_3" ;
Unfortunately I neither own a Mac or an IDL license! Therefore cannot give you any specific advice for reading headers in IDL (I use Matlab/CDAT for my data analysis).
As regards installation of ncdump (netCDF), you might be able to install it via the ports system if that is any easier than compiling from the source code. Again I don't have any experience of this so you would have to search around for yourself a bit.
If the program you downloaded gives you all the information you need about a netCDF file in order to be able to work on it with IDL then you don't need to worry about ncdump.
Also I would imagine you won't be able to do a lot of the work on your Mac anyway unless you are allowed to install IDL on it (unlikely I would have thought). This kind of work is usually done on some kind of central unix/linux server (is that where IDL is run from?) and that might have the netCDF tools already installed.
For example I do all of my work on the central server which I connect to remotely from my Linux workstation.
I hope that helps you a little bit!
Bookmarks