Re: [netcdfgroup] need to id netcdf files

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



  • 2010 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdfgroup archives: