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

Re: 951115- netCDF on NT



Susannah,

> The file I downloaded was netcdf-2.4-beta3.tar.Z, and really, winnt_io.h
> wasn't there (I did it twice, once yesterday afternoon).  Or maybe I'm
> crazy, but you might want to double-check.

No, you aren't crazy, and I'm really sorry for all the trouble I put you
through, and really glad I didn't announce the beta3 release to the
netcdfgroup mailing list yet.  You're right, it's not there, even though
it's in the MANIFEST in the Makefile.in, which is supposed to guarantee that
it gets in the distribution.

I'm remaking the distribution, naming it beta4, and making sure it has what
is supposed to be there before announcing it.  I've also appended the
libsrc/winnt_io.h file, just in case.  You must have already derived all
these macros to get it running.

> One more question: we had been using version 1.58 of the library in DOS
> and Windows 3.1, and I'm not doing very well reading the old .cdf files we
> have with this new library.  Is this a 16-bit/32-bit problem, or have
> there been changes to the file format since then?

There have been no changes to the file format.  A couple of years ago, we
recommended using the ".nc" extension instead of ".cdf" for netCDF files, to
avoid confusion with NASA CDF files, but we haven't changed the format.

It's possible that this is a bug in the Windows NT implementation.  One way
to diagnose the problem would be to see if you can read your old .cdf files
with a version of the ncdump utility built on a UNIX or VMS platform.  If
not, then there is something wrong with the library that created the old
.cdf files.  Also check if a netCDF file created on Windows NT with the new
library (with ncgen, say) looks OK with the old DOS ncdump utility.  Another
quick check is that the first four bytes of a netCDF file should be the
three ASCII characters 'C', 'D', 'F', followed by a 001 byte (the format
version number).

If this doesn't reveal the problem, let me know.

I may be able to help diagnose the problem if you can make a netCDF file
from each platform available in some way that preserves the byte order, say
via anonymous FTP or uuencoded in an e-mail message.

______________________________________________________________________________

Russ Rew                                           UCAR Unidata Program
address@hidden                              http://www.unidata.ucar.edu

===================== libsrc/winnt_io.h ==================================
/*
 * include file to fix i/o renaming
 *
 * to be included after:  io.h, fcntl.h, sys/types.h, sys/stat.h
 */

#define open _open
#define close _close
#define read _read
#define write _write
#define lseek _lseek

#define O_APPEND _O_APPEND
#define O_BINARY _O_BINARY
#define O_CREAT  _O_CREAT
#define O_RDONLY _O_RDONLY
#define O_WRONLY _O_WRONLY
#define O_RDWR   _O_RDWR
#define O_TRUNC  _O_TRUNC
#define O_EXCL   _O_EXCL
#define O_BINARY _O_BINARY