NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.
To learn about what's going on, see About the Archive Site.
Hi Russ, Maybe I can distill the essence of this function since my goal is to use it before I call the netcdf open function. I think that 64-bit-offset is the pnetcdf format that I was referring to. Thanks for the hint about hdf5 files. - Jim On Tue, Feb 2, 2010 at 9:58 AM, Russ Rew <russ@xxxxxxxxxxxxxxxx> wrote: > Jim, > > > I am in need of a function that can identify a file as netcdf3, netcdf4, > or > > pnetcdf 64-bit. > > Preferably I would like this function to work without having linked any > of > > the mentioned netcdf libraries. > > > > Does anyone have or know of one? > > Although it doesn't match your preference for independence from netCDF > libraries, the nc_inq_format() function documented here: > > > http://www.unidata.ucar.edu/software/netcdf/docs/netcdf-c.html#nc_005finq-Family > > distinguishes among the 4 netCDF format variants: > > http://www.unidata.ucar.edu/software/netcdf/docs/faq.html#fv1 > > in the netCDF-4 library or between classic and 64-bit-offset formats in > a netCDF-3 library. It doesn't recognize the pnetcdf 64-bit variant. > > By the way, an HDF5 file can't necessarily be distinguished by its first > 4 bytes, because HDF5 files may begin with a "user-block" of size 512, > 1024, 2048, ... bytes, before the 4-byte file-type signature. > > --Russ >
netcdfgroup
archives: