Patch request for datatype conversion in SDF code

Remik.Ziemlinski Remik.Ziemlinski at NOAA.GOV
Thu May 31 15:23:27 EDT 2007


On our IA64 platform, a bug was found in src/gasdf.{h,c} where "int"
data in Netcdf files are assumed to be "long".
Our suggestion is to replace all references to NC_LONG, to NC_INT, and
to replace the associated "long" casts to "int", since Netcdf only
defines 4 byte integers, whereas on IA64, "long" is 8 bytes, hence the
incorrect data conversion.

This error came up when processing the time axis of a netcdf file that
was declared with "int".  Most often, time axes are of "double" type, so
this casting bug was overlooked in the past.  Also, IRIX seems a bit
more robust when casting between these types, even though they too are 4
and 8 bytes like with IA64.  Thanks.

--
Remik Ziemlinski                        Raytheon Company
NOAA/Geophysical Fluid Dynamics Lab.    Remik.Ziemlinski at noaa d0t gov
P.O. Box 308                            1.609.452.6500 ext. 6977
Princeton, NJ 08542 USA                 1.609.987.5063 fax



More information about the gradsusr mailing list