[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ncgen-style "reading" generator



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