This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
>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