Re: missing values

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Fri, 23 Feb 2007 12:14:45 -0700 (MST)

For some reason, the *only* way to check for
missing values is via "ismissing". The function
requires a logical [ True/False] argument

Consider:

ncl 0> x = (/1,2,3,4,2,7,3,5,9/)
ncl 1> x@_FillValue = 3
ncl 2> print(num(ismissing(x)))
(0) 2
ncl 3> print(num(.not.ismissing(x)))
(0) 7

ncl 4> print(num(x.eq.x@_FillValue))
(0) 0

ncl 5> a = x.eq.x@_FillValue
ncl 6> print(a)

Variable: a
Type: logical
Total Size: 36 bytes
            9 values
Number of Dimensions: 1
Dimensions and sizes: [9]
Coordinates:
Number Of Attributes: 1
  _FillValue : -1
  ^^^^^^^^^^^^^^^^
  
(0) False
(1) False
(2) -1
(3) False
(4) False
(5) False
(6) -1
(7) False
(8) False

Why the above? I have no idea!!!

Perhaps a developer can respond.

>Only for curiosity: why the logical expressions below didn't returns the
>same value:
>
>seriePluv = ndtooned(select(:,5:ncols-1))
>seriePluv@_FillValue = -999.9
>
>nMissing = num( ismissing(seriePluv) )
>nMissing2 = num( seriePluv.eq.seriePluv@_FillValue )
>
>print(nMissing+" "+nMissing2)
>
>gives:
>
>(0) 2733 0
>_______________________________________________

_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Fri Feb 23 2007 - 12:14:45 MST

This archive was generated by hypermail 2.2.0 : Fri Mar 02 2007 - 17:25:16 MST