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.
Sue, Yes, to be CF-compliant, if both the valid_range and _FillValue attribute are present, then the _FillValue should be outside the valid_range. I don't think that convention recommendation needs to change. CF-compliant data is a subset of valid netCDF data. The _FillValue attribute is handled by the netCDF library and is used in files that follow other conventions or no conventions at all. So netCDF data that has a _FillValue anywhere in the range must be interpreted correctly by the library, and by generic applications such as ncdump or the NCO programs that handle packed data. Our example of packing, writing, reading, and unpacking data that includes a _FillValue will put the _FillValue at one end of the valid range, as we consider that a "best practice". I just don't think we can change the packing/unpacking formulas to *require* the _FillValue to be at the bottom or top of values that are considered valid. --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