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: address@hidden >Subject: ? Variable put/get for array of values > 64KB >Organization: NOAA/NGDC, Paleoclimatology Group >Keywords: 199610282142.AA16789 Hi Wendy, Sorry about the delay in answering your question. > I am using netcdf to develop an application for a Windows > 16 bit application and I have arrays of data that are greater > than 64KB that I would like to put and get, to and from > a netcdf file in one chunk. Can I do this with netcdf > library calls? > code example: > > . . . > char huge *mydata = glock(globalHandleToMemory); > // Initialize mydata and netcdf file > . . . > ncvarput( ..., (void*)mydata). > . . . > > > Can ncvarput and ncvarget deal with a pointer to huge > memory? No, unfortunately we don't support a variety of memory models for 16-bit architectures in the netCDF library. When we added support for 16-bit architectures back in 1993, we modified our utilities such as ncdump so that they only deal with 64KB or smaller chunks. If you can use the Borland compiler, Ken Prada of Woods Hole compiled a previous library version to support small, medium, large, and huge memory models, and has donated the compiled binary library versions. For more information, see the files in ftp://ftp.unidata.ucar.edu/pub/netcdf/contrib/borland/ With netCDF 2.4, we provide support for the "DJGPP" development environment. DJGPP is a port of the GNU C development environment to MSDOS, freely-available from: ftp://ftp.coast.net/SimTel/vendors/djgpp/ and other archives, and requiring 80386 CPU or better. This environment supports accessing arrays of data that are greater than 64KB, because it uses 32-bit addresses. --Russ _____________________________________________________________________ Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu