missing values

From: rafael dido <raf.eldido_at_nyahnyahspammersnyahnyah>
Date: Fri Jan 04 2013 - 10:49:03 MST

Hi NCL,

I have nc file containing missing value indicated by "_"

dimensions:
lon = 360 ;
lat = 181 ;
time = UNLIMITED ; // (4383 currently)
variables:
double lon(lon) ;
lon:units = "degrees_east" ;
lon:modulo = 360. ;
lon:point_spacing = "even" ;
lon:axis = "X" ;
double lat(lat) ;
lat:units = "degrees_north" ;
lat:point_spacing = "even" ;
lat:axis = "Y" ;
double time(time) ;
time:units = "hours since 1997-01-01 00:00:00" ;
time:time_origin = "01-JAN-1997 00:00:00" ;
time:axis = "T" ;
float psea(time, lat, lon) ;
* **psea:missing_value = -1.e+34f ;*
* psea:_FillValue = -1.e+34f ;*
// global attributes:
:Conventions = "CF-1.0" ;
data:

 psea =
  _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _,
_,
    _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _,
0.02250607, 0.5173603, 0, 0, 0, 0, 0, 0, 0, 0.01500405, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _,
    _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, 0, 0, 0.4348826,
0.05248583,
    3.899931, 24.72732, 53.44849, 21.48183, 11.3707, 3.757559, 0.0299919,

[SNIP]

Once, I calculated the average for a specific domain i got the result is
-999 as
i set my command as follow:

  f = addfile("/projekt1/precip_ocean.nc","r") ; Read in first time
step and
  pocean = f->psea(:,{-10:10},:)
  pocean@_FillValue = pocean@missing_value
  pocean@_FillValue = -999
  printVarSummary(pocean)

rad = 4.0*atan(1.0)/180.0
clat = cos(lat*rad)
ocean = dim_avg_Wrap( pocean(lat|:, lon|:, time|:) )
Ave = wgt_areaave(ocean, clat, 1.0, 1)
print(ave)

=== [executed]
Variable: Ave
Type: float
Total Size: 4 bytes
            1 values
Number of Dimensions: 1
Dimensions and sizes: [1]
Coordinates:
Number Of Attributes: 1
  _FillValue : -999
*(0) -999*

Is there any hints how to handle this problem in NCL? When I used another
language program,
and I do not get any problem to calculate this average.

Thanks

RF.

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Fri Jan 4 10:49:14 2013

This archive was generated by hypermail 2.1.8 : Fri Jan 04 2013 - 15:34:10 MST