[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

960411: "ncvarput: xdr_NC_fill"



John,

>Date: Thu, 11 Apr 1996 10:42:08 -0400 (EDT) 
>From: address@hidden (John Sheldon)
>Organization: NOAA/GFDL
>Subject: Re: 960409: "ncvarput: xdr_NC_fill" 
>Keywords: 199603281505.AA27313

In the above message you wrote:

> I've narrowed it down to the "_FillValue" for the "short" variable.
> Apparently, it doesn't like -32768; 32767 and -32767 work.
> 
> Another Cray peculiarity?

Yes and no.  The value -32768 is representable in two-complement format,
but not ones-complement format (assuming 16-bit shorts).  Also, Standard
C is not required to support that value for a `short' (the minimum
magnitude SHRT_MIN is -32767).  This is why we chose the value -32767 as
the default fill-value for shorts.  If your routines use -32768, then
you should change them if at all possible (i.e. if this won't cause
problems with legacy code or datasets).

Please let me know if this fixes your problem.

FYI, our UNICOS 8 CRAYs handle the value -32768.

--------
Steve Emmerson   <address@hidden>