[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
- Date: Fri, 8 Mar 1996 16:54:58 -0700
> Date: Fri, 08 Mar 1996 16:16:04 -0500
> From: address@hidden (M. Parsi)
> To: address@hidden
> Subject: NetCDF/XDR on MacOS (compiling and running)
>
>
> I like to hear from people out there who have successfully compiled and
> used the NetCDF library on MacOS platform.
>
> I have down loaded the NetCDFonMac package from the contrib folder of
> netcdf ftp site. I used ThinkC to successfully compiled the netcdf and xdr
> libraries after a bit of trouble, but I can not get it to read a valid
> sample netcdf file (image.nc) from unidata or any
> grd(NetCDF- GMT) file.
>
> More specifically, inside the ncopen routine after confirming the Magic
> number of the netcdf file for image.nc (down loaded from Unidata), it dies
> on reading the attributes(header),
> "ncopen: "String KOAK ..." length 18788 exceeds 128".
>
> ------ code included -------
> if( !xdr_NC_array(xdrs, &((*handlep)->attrs))){
> NCadvise(NC_EXDR, "xdr_cdf:attrs") ;
> return(FALSE) ;
> }
> ------ code included --------
>
> The behavior is a little different with grd(NetCDF- GMT) files, it
> reads the magic number, dims, attrs, and reads NULL for the
> variables, which in turns means that I can not continue with the
> execution of the program.
>
>
> Any help on the above problems is really appreciated. If you
> have successfully used the netcdf/xdr library on MacOS, just
> drop me a note, so I know that it is possible to get this to work.
>
>
> Mahdad
>
>
>
> ~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~
> #include <std.disclaimer.h>
> Mahdad Parsi Internet: address@hidden
> System Analyst/Prgmr Voice Mail:(914)365-8698
> Computer Network Admin Fax: (914)365-8150
> LDEO of Columbia Univ. US Mail: P.O. Box 1000 Palisades, NY 10964
> HTTP: http://www.ldeo.columbia.edu/~mahdad/"
> ~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~
You might want to try using our new ANSI implementation, which we are
calling 3.0 alpha. The reason is that the IO layer and the equivalent of the
XDR layer are separated out and it would be much easier to port.
The downside is that the library itself has a slightly different interface.
I've made the libsrc directory available as
ftp://ftp.unidata.ucar.edu/pub/netcdf/libsrc_3_0alpha.tar.Z
so you can grab it if you want.
Presumably you will not be able to run 'configure', so first edit
libsrc/ncconfig.h to match the characteristics of your system.
That should make ncx.c (which takes the place of XDR) work properly.
If you have a correct XDR library, you can verify ncx against it using
a test driver called t_nc.c.
If there are no POSIX i/o calls available, or you want to use native mac
calls, then roll you own implementation of ncio.c as defined by the interface
in ncio.h. There are two implemntations available to look at, ncioposix.c and
ncioffio.c.
Good luck.
-glenn