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

Re: 941221: netCDF & file(1



>Organization: .NCAR / ATD
>Keywords: 199412211941.AA00488

Hi Chris,

> Does, netCDF use a magic number, and if so what would my entry into /etc/magic
> look like?  Thanx.

Yes, the first four characters of a netCDF file are 'C', 'D', 'F', SOH.  The
SOH character (001) specifies version 1 of the format.  It may someday be
incremented if we decide it's desirable and practical to support a new
representation format.

Here's an appropriate /etc/magic entry:

0       long            0x43444601              netCDF file

The appropriate constant is also in the source, in libsrc/local_nc.h as the
value of the NCMAGIC macro.

--
Russ Rew                                                UCAR Unidata Program
address@hidden                                          P.O. Box 3000
http://www.unidata.ucar.edu/                          Boulder, CO 80307-3000