Can _FillValue as NaN work as i/p to functions?

From: Paul Scorer <paul.scorer01_at_nyahnyahspammersnyahnyah>
Date: Mon Jun 18 2012 - 11:10:48 MDT

Greetings,

Another _FillValue question:

Can I set _FillValue to be NaN?

Certainly, this script does what you would expect:

x = new ((/3,3/), float)
x@_FillValue = sqrt(-1.0)
x(0,0) = 42.0
x(1,2) = 24.0
print(x)

Variable: x
Type: float
Total Size: 36 bytes
            9 values
Number of Dimensions: 2
Dimensions and sizes: [3] x [3]
Coordinates:
Number Of Attributes: 1
  _FillValue : -nan
(0,0) 42
(0,1) -nan
(0,2) -nan
(1,0) -nan
(1,1) -nan
(1,2) 24
(2,0) -nan
(2,1) -nan
(2,2) -nan

[Not sure how it knows NaN is negative!!]

The question is whether this will propagate meaningfully through
functions such as wrf_user_interp(), gsn_contour_map() and
gsn_csn_vector() ?

For the record, the plot is intended to display wind vectors at a
pressure level that happens to be below the surface. A seemingly ideal
use for NaN :-)

Thanks and Best Regards

PaulS

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Jun 18 12:12:39 2012

This archive was generated by hypermail 2.1.8 : Mon Jun 25 2012 - 09:57:23 MDT