4.0 Using IDL to read netCDF files

IDL can read netCDF files and specifically has a browser to do this (see page 137 of What's new in IDL 5.3). In addition IDL has specific routines for reading netCDF files. However, the simplest way to create the IDL code you need to read a netCDF file is to use the IDL programs cdf2idl (at the above site or http://www-c4.ucsd.edu/~cids/software/visual.html ). The concept of this program is similar cdf2fortran.f, cdf2c.c, and cdf2asc.c programs and is provided by the same group (C4 Interactive Display System). This program reads a netCDF file and creates another IDL script which can read the netCDF file.

4.1 Example of using cdf2idl

From within IDL all you need to do, to read the current meter data file shown for the cdf2fortran example is

IDL> .run cdf2idl.pro

IDL> cdf2idl, 'rcm00683.cdf'

IDL> @script.idl

At the completion of this script all of the current meter data are in memory ready to be analysed. A total of 3 lines of IDL code needed to read this data set. 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 V3.0.