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.
>To: address@hidden >From: "Charlease L. Bobo" <address@hidden> >Subject: netCDF on Unix and Windows >Organization: Mission Research Corporation >Keywords: 199902231937.MAA09071 Hi Charlease, > I am currently creating a netCDF file on an > SGI running 6.5.2. I then try to open the > netCDF file from a Windows NT computer using > PV-Wave netCDF utilities. But, I'm unable to > open the file. I can open files on the PC > when they are created on the PC. I have > tried using a unixtodos utility, and I'm > still unable to open the file. > > Are netCDF files incompatible between UNIX > and DOS ? No the files are compatible and you should be able to read (or write) netCDF files written on SGI (or any other platform) on a DOS PC. You should not have to use any "unixtodos" utility; using such a utility would probably just corrupt a binary netCDF file, since such utilities are usually intended for text files, to handle newlines and "carriage returns" that terminate text lines. My first guess would be that the copy you have on your PC of the file created on your SGI is not an exact copy, but has been changed somehow in transferring it. For example, if you used ftp to copy it and did not specify binary mode, the file would get mangled. Do you have some way to verify that the copy on your PC is byte-for-byte identical to the original file created on SGI? If not, perhaps you could attach the file to a mail message and we could verify whether it looks like a good netCDF file or not. In case it helps, the first 4 bytes of every netCDF file should be 'C', 'D', 'F', and '\001' in that order, where '\001' indicates a byte that corresponds to the ASCII SOH character, which has the numeric value 1. If the first four bytes are anything else or not in this order, then the netCDF library will not recognize the file and will refuse to open it. --Russ _____________________________________________________________________ Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu