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.
Hi,
The air variable in the attached file has the attributes:
air:add_offset = 512.81f ;
air:scale_factor = 0.01f ;
As described in the section on "common attributes" in the
NetCDF Users Guide, these indicate the 32-bit floating-point
values have been stored in 16-bit packed integers. You can
recover the unpacked values using a formula such as
unpacked_data_value = packed_data_value * scale_factor + add_offset
See:
http://www.unidata.ucar.edu/software/netcdf/docs/BestPractices.html#Packed%20Data%20Values
and
http://www.unidata.ucar.edu/software/netcdf/docs/netcdf.html#Attribute-Conventions
--Russ
Russ Rew UCAR Unidata Program
address@hidden http://www.unidata.ucar.edu
Ticket Details
===================
Ticket ID: SPQ-770598
Department: Support netCDF
Priority: Normal
Status: Closed