This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
Brett, I don't have any fortran code. There is online documentation for fortran at: http://www.unidata.ucar.edu/packages/netcdf/guidef/guidef-9.html The man page for fortran is also included in the distribution. You can use ncdump to print out your netcdf file. Using what you find in the ascii dump, you can determine what the variables and types of dimensions you have in your file. Generally, when you write your program to access the data, you need to open the file, inquire about the dimensions, including the unlimited dimension size (usually you will look for every record to read all your data), determine the variable id's for the important parameters (and the dimensions they contain), and then sequentially access you record using the size dimensions. Do you have a resonably small sample of what you files will look like? If so, I can try to give you a skelleton for looping through the data. Steve CHiswell On Mon, 15 Mar 1999, Brett E. McDonald wrote: > Steve, > > I finally got NetCDF compiled this morning - I'm not quite sure why it wasn't > working last week - I thought that I was using the same environment variables > that I was using this morning; but hey, it compiled with no errors. > > I'm trying to read through the code that you gave me. Specifically, > dcreanal.c > > Unfortunately, I don't know C well enough to understand everything. Do you > have > any Fortran code that uses NetCDF? or can only C programs call the NetCDF > routines? > > Thanks for your help. > > Brett >