[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[netCDF #YUZ-849018]: NetCDF float vs double in attribute



Seth,

If the attribute value is specified as -97.f, it is stored exactly as
a 32-bit float.  If it were specified as -97.0, it would be stored
exactly as a 64-bit double.  The values are exactly equal, whether you
compare them by converting the float to a double first or vice versa.

The reason this notation is used is to indicate the type of the
attribute without an explicit type declaration, by using the type of
the attribute value.  This worked fine for the six netCDF-3 types, but
netCDF-4 will also permit explicit attribute type declarations in CDL.

--Russ

Russ Rew                                         UCAR Unidata Program
address@hidden                     http://www.unidata.ucar.edu



Ticket Details
===================
Ticket ID: YUZ-849018
Department: Support netCDF
Priority: Normal
Status: Closed