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.
Hi Steve, > A teensey question: > > ncgen -f and ncgen -c can generate code that would **write** the given netCDF > file. Is there an analagous program to generate a generic netCDF file > **reading** skeleton? Such an option for ncgen has been on my list for a while, but I'm afraid I haven't gotten to it. However, there is a program for generating Fortran programs to read a netCDF file from our user-contributed software: gennet.f Barry Schwartz's program to generate a Fortran program to read a netCDF file. It opens a specified netCDF file and generates the necessary Fortran code to declare the corresponding Fortran dimensions and variables and read all the data into the Fortran variables. It's available from ftp://ftp.unidata.ucar.edu/pub/netcdf/contrib/gennet.f. And there's two more such programs, one for Fortran (cdf2fortran) and one for C (cdf2c) available from the CIDS project, although they only make SGI executables available: http://borneo.ucsd.edu/~cids/SOFTWARE/visual.html If you could convince the CIDS/CEPEX people to make the sources for these available, I'd be happy to put them in our contrib/ directory. --Russ