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.
>From: address@hidden (Sherrie Fredrick) >Organization: NCAR/MMM >Keywords: 200205160004.g4G041a05304 netCDF DEC 32-bit Sherrie, >I am trying to use the netcdf libraries on a dec alpha that is a 32 >bit machine. I am reading in model data that has numbers on the order >of 3 to the -44, 3E-44. The netCDF uses IEEE floating point representation. The smallest value that can be represented by IEEE floating point is approx. 1.1754944E-38. Since your values are smaller than this, you must use a double to represent them. >I get a floating exception when these numbers >are encountered. I have tried reading them into both a float and a >double array. When read into a double array they come out as >3E-314 the float arrays come out as 3E-44. Is there any other way >that I can read them in and operate on them. Are you making sure to read the values in as doubles and then write them out to the netCDF as doubles? The problems you are reporting seem to indicate that you are experiencing an underflow somewhere in the process of reading them in from one source and then writing them out to the netCDF. >I hope this makes sense. Please check your method for reading the values in to make sure that you are not getting an underflow at that step. If you are not, then write them out using a double array. By the way, what are you using to list the values after they have been written to the netCDF? Tom Yoksas