NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.
To learn about what's going on, see About the Archive Site.
I want to be able to use unsigned byte and/or unsigned short integers to store "compressed" data. Under "compressed" I mean floating point values mapped into integer values via the 'scale_factor' and 'add_offset' attributes. The description of the deprecated 'signedness' attribute states: "Deprecated attribute, originally designed to indicate whether byte values should be treated as signed or unsigned. The attributes 'valid_min' and 'valid_max' may be used for this purpose. For example, if you intend that a byte variable store only nonnegative values, you can use 'valid_min' = 0 and 'valid_max' = 255. This attribute is ignored by the netCDF library." How that scheme is supposed to work with 'scale_factor' != 1 and 'add_offset' != 0 ? It would have been simple if 'valid_range' was referring to the stored, not yet unpacked(unscaled) variables, but it does not seems to be the case. Regards, Sergey Panov
netcdfgroup
archives: