[ncl-talk] FillValue problem?

From: David B. Reusch <dbr120_at_nyahnyahspammersnyahnyah>
Date: Thu Nov 12 2009 - 13:49:34 MST

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

An ncdump -h of the file I am reading:

netcdf sie_1973-2001 {
dimensions:
        time = 348 ;
        lon = 360 ;
        mon = 12 ;
variables:
        float time(time) ;
                time:desc = "time" ;
                time:long_name = "Decimal Year" ;
                time:units = "year" ;
                time:_FillValue = -999. ;
        float year(time) ;
                year:desc = "Year" ;
                year:long_name = "Year" ;
                year:units = "year" ;
                year:_FillValue = -999. ;
        float month(time) ;
                month:desc = "month" ;
                month:long_name = "Month" ;
                month:units = "month" ;
                month:_FillValue = -999. ;
        float lon(lon) ;
                lon:desc = "Longitude" ;
                lon:long_name = "Longitude" ;
                lon:units = "degrees" ;
                lon:_FillValue = -999. ;
        float mon(mon) ;
                mon:desc = "Month" ;
                mon:long_name = "Month Number for Means" ;
                mon:units = "month" ;
                mon:_FillValue = -999. ;
        float sie(time, lon) ;
                sie:desc = "Sea Ice Edge" ;
                sie:long_name = "Latitude of Sea Ice Edge" ;
                sie:units = "degrees" ;
                sie:_FillValue = -999. ;
        float sie_mon(mon, lon) ;
                sie_mon:desc = "Mean Sea Ice Edge" ;
                sie_mon:long_name = "Mean Latitude of Sea Ice Edge" ;
                sie_mon:units = "degrees" ;
                sie_mon:_FillValue = -999. ;

// global attributes:
                :origin = "HadISST1" ;
}

My stripped-down NCL script is as simple as can be:
begin
  nc = addfile( "sie_1973-2001.nc", "r" )
  SIE = nc->sie
  printVarSummary(SIE)
  SIE@_FillValue = -999.
  printVarSummary(SIE)
end

And yet my results are completely puzzling:
 Copyright (C) 1995-2009 - All Rights Reserved
 University Corporation for Atmospheric Research
 NCAR Command Language Version 5.1.1
 The use of this software is governed by a License Agreement.
 See http://www.ncl.ucar.edu/ for more details.

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
  desc : Sea Ice Edge
  long_name : Latitude of Sea Ice Edge
  units : degrees
  _FillValue : -4.4755859375

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
  desc : Sea Ice Edge
  long_name : Latitude of Sea Ice Edge
  units : degrees
  _FillValue : -999

-- 
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
Received on Thu Nov 12 13:49:40 2009

This archive was generated by hypermail 2.1.8 : Tue Nov 17 2009 - 17:30:50 MST