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.
Sue YANG, You are correct, NF_FLOAT variables are 32 bits wide and nothing can be done to change this (short of rewriting the netCDF library). Sorry. You might be able to use the compilation option that makes REALs equivilent to DOUBLEPRECISIONs on the IRIX system if you define the corresponding netCDF variables as type NF_DOUBLE. You'd probably have to build a special netCDF library with that compilation option and I doubt that you'd be able to use the Fortran-90 interface (because it requires the existance of 4-byte reals). Regards, Steve Emmerson <http://www.unidata.ucar.edu> >Date: Fri, 6 Jul 2001 11:14:53 +1000 >From: "Xue (Sue) YANG" <address@hidden> >Organization: Australian Bureau of Meteorology >To: "Steve Emmerson" <address@hidden> >Subject: RE: 20010705: size of netCDF Fortran real >Keywords: 200107050049.f650nC104302 > > Steve, > > Thanks for your email. > > We've got a big system (in Fortran) developed locally on > Super-computer (NEC machine). In this system, all the variables type > REAL are defined as 64 bits size (by compiling). This system calls > netcdf libraries associated with NF_FLOAT variables to write out > REAL type data into the file. Now we want to transfer this system to > Irix6.5 machine. On our Irix6.5 machine, we've got netcdf libraries > which have the size of netCDF variables of type NF_FLOAT as 32-bits. > WE wondered whether we could keep the variables type REAL as 64 bits > size in our system and change the netcdf libraries with type NF_FLOAT > from 32-bits to 64-bits so that we don't need to change the source > codes of our system for Irix6.5 machine. From your email, it seems > that we couldn't do this way. Am I right? > > Thanks a lot! > > Sue YANG