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

NetCDF attributes

I can display my netCDF file using code from DisplayTest, case 10.
However, I cannot figure out how to query the attributes of the file.
In my test netCDF file I use variables (x, y) -> documents.  Where x goes
from 1-30 and y goes from 1-40.  I will not always know this apriori.  If
I read this file as

  java DisplayTest 10 equinox.nc

it displays as expected.  My question is how can I query the range of
the x and y variables.  When I try

  double[] range1lat = map1lat.getRange();

where map1lat is

  new ScalarMap((RealType) dtype.getComponent(0),Display.XAxis));

NaN is returned.  I tried various other combinations of methods and
could not produce the simple result of 1,30 and 1,40 for (x,y).  Any
suggestions?

Another question.  I have a JTable.  I would like the cursor on the
surface to reflect the proper entry in the JTable.  Which method
returns the (x,y) position of the cursor on the 3-D surface?  From
this I can compute the appropriate entry in the JTable.

Thanks in advance for any advice.

 
 
  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