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 Alex:It wont work because the _FillValue is used to prefill the data array, so it must match the actual data type. IMO, it should not be used as missing value, what it really means is "never written value".
John On 7/3/2013 5:45 PM, Alex Fraser wrote:
Hi John, ----- Original Message -----Yes, that should work.Thanks for that.[...] If anyone on these lists have further opinions, they would be welcome before we standardize on it.Now that I know how it works, I'm happy with the current situation. But I was hoping I could just promote the data type of the fill value for unsigned variables - that way I could treat valid ranges and fill values the same way. That is, ideally I'd like to do this: byte Band1(y, x); Band1:_Unsigned = "true"; Band1:_FillValue = 255s; // short byte Band2(y, x); Band2:_Unsigned = "true"; Band2:valid_range = 0s, 254s; // short But I suspect that wouldn't be backwards-compatible with existing code. Cheers, Alex