Unidata - To provide the data services, tools, and cyberinfrastructure leadership that advance Earth system science, enhance educational opportunities, and broaden participation. Unidata
         
  advanced  
 

[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
russ@xxxxxxxxxxxxxxxx                     http://www.unidata.ucar.edu



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


 
 
  Contact Us     Site Map     Search     Terms and Conditions     Privacy Policy     Participation Policy
 
National Science Foundation (NSF) UCAR Office of Programs University Corporation for Atmospheric Research (UCAR)   Unidata is a member of the UCAR Office of Programs, is managed by the University Corporation for Atmospheric Research, and is sponsored by the National Science Foundation.
P.O. Box 3000     Boulder, CO 80307-3000 USA     Tel: 303-497-8643     Fax: 303-497-8690