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.
Yes, the _FillValue should be the same type as the packed data. But for the purpose of the packing formulas, the dataMin and dataMax are assumed to include the unpacked _FillValue as one of the values of "data". In fact, it's legal (though not necessarily recommended) for the unpacked _FillValue to be in the middle of the range of data. But it's also possible for dataMin or dataMax to be equal to the unpacked _FillValue. The use of "data" is bad here, because it's not clear whether we're talking about the actual physically meaningful data or the values stored in the file. So that's yet another source of confusion in the Best Practices advice on packing and unpacking. My only defense is that I didn't write this, I inherited it. When we've written an example, we'll rewrite that section to try to make it clearer. Thanks for pointing out the problems. --Russ Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu Ticket Details =================== Ticket ID: VQZ-726653 Department: Support netCDF Priority: Normal Status: Closed