Unidata - To provide the data services, tools, and cyberinfrastructure leadership that advance Earth system science, enhance educational opportunities, and broaden participation. Unidata
         
  advanced  
 

null allowed in range of Fields

We are storing radar data with a function of:
Time-> ((range, azimuth)->reflection)

Sometimes there is no reflection from a radar - when it's not raining.
It is important that the display shows no rain when there is no
rain, including when visad is animating and there is rain on the
preceding and next sample.

I have been experimenting with storing:
Time -> null
in the field.

This works when I use setSamples() but fails when I use setSample(int,data).

Looking at the code for FieldImpl, it seems that null is allowed
when using setSamples() as it is tested for on line 209 and assigned as
a literal on line 218.

Looking at setSample(int, data) line 677 does not do this test for
null, but throws an exception when evaluating range.getType().

This seems to be inconsistent.

It looks like Bill purposely allowed null with his code change
on 9 Dec 1999 line 208, so I think null is intended to be supported.
I hope it is.  If so, then a small change to setSample(int, data) is
needed.

If not, then how should I store the data for my case above?

thanks,

Andrew.

--
 Andrew Donaldson
 Email:   A.Donaldson@xxxxxxxxxx                Bureau of Meteorology
 Phone:   +61 3 9669 4537            P.O. Box. 1289K/150 Lonsdale St,
 Fax:     +61 3 9669 4128                       Melbourne, Australia.



 
 
  Contact Us     Site Map     Search     Terms and Conditions     Privacy Policy     Participation Policy
 
National Science Foundation (NSF) UCAR Community Programs   Unidata is a member of the UCAR Community Programs, is managed by the University Corporation for Atmospheric Research, and is sponsored by the National Science Foundation.
P.O. Box 3000     Boulder, CO 80307-3000 USA     Tel: 303-497-8643     Fax: 303-497-8690