IDL incorporates a number of techniques for reading netCDF files and specifically has a browser to do this (see page 137 of What's new in IDL 5.3). However, the simplest way to create the IDL code you need to read a netCDF file is to use the IDL program cdf2idl, which is available at the Unidata site or at
The concept of this program is similar to that of the cdf2fortran.f, cdf2c.c, and cdf2asc.c programs described on the UCSD website. The program examins a netCDF file and creates an IDL script which can read the netCDF file.
From within IDL all you need to do to read the current meter record rcm01037.nc (for example) is enter
IDL> .run cdf2idl.pro
IDL> cdf2idl, 'rcm00683.nc'
IDL> @script.idl
The first line above starts cdf2idl. The second line creates a script named script.idl. The third line runs the script. At the completion of the script all of the current meter data are in memory ready to be analysed. Thus a total of three lines of IDL code is needed to read this current record. These three lines of code are so general that they will actually read any of the netCDF files from any of the WOCE Data Assembly Centres provided as part of the WOCE Global Data Set.
Return to the top of the primer.