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.
Hi John, >Date: Thu, 31 Oct 1996 11:09:32 -0500 (EST) >From: address@hidden (John Sheldon) >Organization: Princeton/GFDL >To: address@hidden >Subject: "-r8" for netCDF on SGI's >Keywords: 199610311609.AA20173 In the above message you wrote: > Hi Steve- > > Some users here are quite interested in running models on their SGI, > but need to use the "-r8" option. I checked your mail archives and saw > an interchange from 1993 which indicated that "you should not use the > `-r8' option because the netCDF FORTRAN interface assumes that a > FORTRAN REAL is the same as a C `float'". Is this still true? I'm afraid it's still true that the netCDF code assumes that a FORTRAN REAL is the default REAL on the system (in your case, a REAL*4 rather than a REAL*8). > What > would the recourse be? Should they explicitly declare a REAL*4 chunk > of memory to copy the data to first before sending on to the netCDF > API? They could do that if they wanted to store the data in netCDF variables of type NC_FLOAT. Alternatively, *if* the representation of a FORTRAN REAL under the `-r8' option is the same as a FORTRAN DOUBLE under no option (and at first glance at the manual page they appear to be the same) then they could just use the data arrays at hand providing they declare the corresponding netCDF variables to be of type NC_DOUBLE. Please let me know if this helps. -------- Steve Emmerson <address@hidden>