Due to the current gap in continued funding from the U.S. National Science Foundation (NSF), the NSF Unidata Program Center has temporarily paused most operations. See NSF Unidata Pause in Most Operations for details.

Re: extracting data from a field

Cameron,

>Date: Fri, 3 Dec 1999 15:17:53 +1100 (AEDT)
>From: Cameron Shepherdley AutoTAF Project <camshep@xxxxxxxxxx>
>To: visad-list@xxxxxxxxxxxxx
>Subject: extracting data from a field

In the above message, you wrote:

> I am trying to traverse through the structure of a field and extract the data
> for verification purposes.

In situations like this I find using the jdb (Java debugger) utility
more productive than writing code.

> Here is a snippet of code.
> 
> DataImpl mofStructure = plain.open(args[0]); //open and load netcdf file
> FieldImpl mofField = (FieldImpl)mofStructure; //convert to fieldimpl
> Data mofData = mofField.getSample(0);  //get first sample
> 
> The data object received from 'getSample()' is of type Real.
> It should be tuple however I cannot cast it to Tuple and therefore cannot
> access the data (through getData() from tuple).
> How do I access the data?

Would you please send me the output of executing "ncdump -h" on
your input file so that I can see what type of VisAD data object
visad.data.netcdf.Plain should return.  Thanks.

--------
Steve Emmerson   <http://www.unidata.ucar.edu>

  • 1999 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the visad archives: