Hi David,
I have introduced a fix to NCL that causes it to convert _FillValues  
of the wrong
type to the correct type when the variable data is copied to an NCL  
variable.
A warning is issued. The little script you sent (modified as follows):
begin
  nc = addfile( "sie_1973-2001.nc", "r" )
  SIE = nc->sie
  printVarSummary(SIE)
end
now produces the following:
warning:FileReadVar: _FillValue attribute type differs from variable  
(sie) type in file (sie_1973-2001), forcing type conversion; may  
result in overflow and/or loss of precision
warning:FileReadVar: _FillValue attribute type differs from variable  
(time) type in file (sie_1973-2001), forcing type conversion; may  
result in overflow and/or loss of precision
warning:FileReadVar: _FillValue attribute type differs from variable  
(lon) type in file (sie_1973-2001), forcing type conversion; may  
result in overflow and/or loss of precision
Variable: SIE
Type: float
Total Size: 501120 bytes
             125280 values
Number of Dimensions: 2
Dimensions and sizes:	[time | 348] x [lon | 360]
Coordinates:
             time: [1973.042..2001.958]
             lon: [-179.5..179.5]
Number Of Attributes: 4
   _FillValue :	-999
   desc :	Sea Ice Edge
   long_name :	Latitude of Sea Ice Edge
   units :	degrees
  -dave
On Nov 12, 2009, at 2:05 PM, David B. Reusch wrote:
> Sorry, I think this one was my fault, or at least NCL was managing as
> best it can under odd conditions (although Rick Browrigg's results  
> raise
> an eyebrow...).  Note that the _FillValue in ncdump is "-999." where  
> it
> *should* be "-999.f".  For what it's worth, I created this file in
> Matlab with snctools and, apparently, didn't quite get it right.   
> After
> an edit with NCO's ncatted, NCL does what I was expecting now.
>
> Dave
>
> David B. Reusch said the following on 11/12/09 3:49 PM:
>> I have run into a situation with NCL and _FillValue that completely
>> baffles me.  The short version is that the _FillValue should be -999.
>> but NCL is assigning -4.4755859375 instead.  I've included an ncdump,
>> the NCL script, and the script output below.  I've put the netCDF  
>> file
>> (sie_1973-2001.nc) in the incoming dir of ftp.cgd.ucar.edu (it's  
>> about
>> 500kb).  Is this a bug or am I just missing something obvious?   
>> This is
>> running on a PPC Mac at OS 10.5.8 with NCL 5.1.1.
>>
>> Thanks,
>> Dave
>>
> -- 
> 517 Deike Building
> Earth & Environmental Systems Institute
> Penn State University
> University Park, PA 16802
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Nov 17 13:22:06 2009
This archive was generated by hypermail 2.1.8 : Mon Nov 23 2009 - 12:24:02 MST