scale/offset clarified

NOTE: The netcdf-hdf mailing list is no longer active. The list archives are made available for historical reasons.

try that last part again:

To compute the scale and offset:
   add_offset = dataMin
   scale_factor = (2^nbits - 2) / (dataMax - dataMin)

The precision of the data will be 1.0 / scale_factor.

To move between packed and unpacked values:

unpacked = (packed == 2^nbits-1) ? missing value : packed * scale_factor + add_offset

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