[netcdfgroup] need to id netcdf files

Rob Latham robl at mcs.anl.gov
Tue Feb 2 10:04:01 CST 2010


On Tue, Feb 02, 2010 at 08:39:05AM -0700, Jim Edwards wrote:
> Hi,
> 
> 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?

Hi Jim.  Not sure if there's a function, but the first four bytes of
the file are CDF-X, where X is 1, 2, or 5, or X-HDF, where I don't
know what X is but at least on one file I'm looking at is 0x86

==rob

-- 
Rob Latham
Mathematics and Computer Science Division
Argonne National Lab, IL USA


More information about the parallel-netcdf mailing list