Re: netCDF _FillValue attributes [message #43024] |
Fri, 11 March 2005 04:08 |
James Kuyper
Messages: 425 Registered: March 2000
|
Senior Member |
|
|
sdj@tiscali.it wrote:
> Dear All,
>
> I am using IDL to produce some netCDF files.
>
> In order to adhere to the COARDS convention I need to supply the
> _FillValue attribute.
>
> My data variable is in form of a byte array, with values ranging from
0
> to 255.
> My valid values go from 0 to 254, and subsequently I want to have
both
> the _FillValue and the missing_value attributes set to 255.
>
> The problem I am having is that I cannot set the _FillValue to 255.
> By running the code attached below (with the different options ->),
and
> ncdumping -h the resulting netCDF file I always get the _FillValue =
> '\377'
ncdump treats BYTE data as a character type. If the number stored
represents a printable character, it prints it as that character (for
instance, 'C'). Otherwise, it uses C-style escape sequences such as
'\t' for the tab character. If there's no special escape sequence for a
given value, it just prints it as an octal escape sequence like the one
you see. '\377' represents 3*8^2+7*8+7 = 255. No problem.
|
|
|