NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.

To learn about what's going on, see About the Archive Site.

Problem with nc_get_varm_float function???

Hi people,

I _may_ have encountered a problem with the nc_get_varm_float function in
the version 3.4 NetCDF C library. I would be interested to know if anyone
else has encountered a similar problem.

Basically, I have a NetCDF file containing a lot of 4 byte floating point
numbers. My initial investigations indicate the NetCDF file is not corrupt
... the data is exactly as it should be.

However, when I use the nc_get_varm_float function to read this data back,
the read back data is sometimes slightly wrong. It would seem that only a
few of the floating point numbers I read back get "corrupted" (4 or 5
floats out of 5 or 6 thousand). What seems to be the problem is that
occasionally bit number 19 (where the sign bit is bit 1, the exponent bits
are 2-9, and the mantissa bits 10-32) is wrong.

I am using NetCDF on a pentium II machine with redhat 6.2, however I can
exactly duplicate this problem on a PIII with redhat 6.0. Shortly I will
test the function on a Sun workstation. The problem can also be duplicated
using the beta version of the 3.5 library.

Maybe the problem has nothing to do with the NetCDF function ... I am
still in the "detective" stage, trying to identify the cause of
it. However, I would be interested to know if anyone else has encountered
similar problems.

Regards,

Tim Hume

-- 
------------------------------------------------------------------------
Tim Hume
Mesoscale Modeller
Meteorological Service of New Zealand
PO Box 722
Wellington
New Zealand
------------------------------------------------------------------------


  • 2000 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdfgroup archives: