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: "Armin Beckert" <address@hidden> >Subject: NetCDF-2.4 on IRIX64 ... >Organization: German Aerospace Research Establishment (DLR) >Keywords: 199603181043.AA02941 Hi Armin, > (The programming language is C.) > I'm working on both, 32-bit and 64-bit architectures. > Now I have a Problem with the netcdf-2.4-Version on Irix64. > > I want to write out a long-Variable in a netCDF-File (as NC_LONG) > (under IRIX64), > This causes the same problems than writing out a long-Variable as NC_SHORT on > a 32-bit machine. > Writing out a field of long values, causes a field in which is written only > every second value. > What must I do, to make netCDF understand, that I want to write out a > long-value (in 64-bit mode)?? > Is it necessary to define a special type for long (typedef) > in my header-Files ?? There is already a typedef, `nclong', defined in the netcdf.h include file that is intended to be used for NC_LONG data. Note that NC_LONG data, as stored on the disk, is still only 32 bits, and on 64-bit platforms such as the DEC Alpha and IRIX64, the nclong typedef is an `int'. There is no netCDF type corresponding to 64-bit integers yet. Currently, if you want more precision then you can get in 32-bit integers, you have to use type NC_DOUBLE. ______________________________________________________________________________ Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu