help with Replacing missing value in an array with zeros

From: Erik Noble <enoble_at_nyahnyahspammersnyahnyah>
Date: Fri, 18 Jul 2008 13:46:29 -0400

Dear NCL,
I was testing the ind and ismissing functions out in command line
mode on my data to exclude the fill value when I do an average of the
data (using dim_avg) . I followed examples #1 and #2 at
http://www.ncl.ucar.edu/Document/Functions/Built-in/ind.shtml
The ncl ind function page does not explain why i might be getting the
error that i am getting. Could I have some help resolving this?

Thank you for your time.
-Erik

ncl 15> printVarSummary(r)

Variable: r
Type: float
Total Size: 60099840 bytes
            15024960 values
Number of Dimensions: 3
Dimensions and sizes: [time | 240] x [lat | 222] x [lon | 282]
Coordinates:
            time: [2006090100..2006093021]
            lat: [-20.125..35.125]
            lon: [-35.125..35.125]
Number Of Attributes: 4
  lonFlip : longitude coordinate variable has been reordered via lonFlip
  long_name : merged microwave precipitation
  units : mm/hr
  _FillValue : -9999
ncl 16> r@_FillValue = -9999
ncl 17> r(ind(ismissing(r))) = 0
fatal:Number of dimensions in parameter (0) of (ind) is (3), (1)
dimensions were expected
fatal:Execute: Error occurred at or near line 12

ncl 18> ir =ind(.not.ismissing(r))
fatal:Number of dimensions in parameter (0) of (ind) is (3), (1)
dimensions were expected
fatal:Execute: Error occurred at or near line 14
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Fri Jul 18 2008 - 11:46:29 MDT

This archive was generated by hypermail 2.2.0 : Mon Jul 21 2008 - 14:41:34 MDT