NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.

To learn about what's going on, see About the Archive Site.

[Re: NetCDF Question]



I wish I had a nickel for every time I asked for help only to answer my own question right after I send the email... ;-)

I serendipitously found (from a ClassCastException) that I can cast the domain set of my FlatField as a LinearLatLonSet and then use the getX() and getY() methods to obtain the values from my netCDF file.

LinearLatLonSet dSet = (LinearLatLonSet)terrainData_ff.getDomainSet();
float[][] lonSamples = dSet.getX().getSamples();
float[][] latSamples = dSet.getY().getSamples();



Tom, I just received your email and I think we're pretty much on the same page.

Thanks and sorry for the wasted bandwidth!!

-kevin.


-------- Original Message --------
Subject: NetCDF Question
Date: Tue, 16 Aug 2005 10:15:35 -0500
From: Kevin Manross <kevin.manross@xxxxxxxx>
To: visad@xxxxxxxxxxxxxxxx


Greetings,

I've been searching the email archives for a couple of days now and
cannot seem to find (or perhaps understand) a solution to the following:

I have a netCDF file that I can open up in a visad Plain and it gives me
the FlatField ((Longitude, Latitude) -> Altitude).  I would like to get
the X and Y dimension *values* from my netCDF file.

(Performing a getDoubles() or getSamples() on the domain set results in
an index-order array of lat/lon points, i.e. XxY points, and I'm
interested in creating a rectangle of points that outlines my lat/lon
domain.  I've noticed, the ucar.unidata.geoloc.LatLonRect class, but was
hoping to use the "raw" data from my files.)

Can someone get me pointed in the right direction on this?

Thanks!!

-kevin.


--
+------------------------------------------------------------+
Kevin L. Manross        [KD5MYD] <><          (405)-366-0557
CIMMS Research Associate               kevin.manross@xxxxxxxx
[NSSL-WRDD/SWATN]           http://www.cimms.ou.edu/~kmanross

"My opinions are my own and not representative of CIMMS, NSSL,
 NOAA or any affiliates"
+------------------------------------------------------------+


--
+------------------------------------------------------------+
Kevin L. Manross        [KD5MYD] <><          (405)-366-0557
CIMMS Research Associate               kevin.manross@xxxxxxxx
[NSSL-WRDD/SWATN]           http://www.cimms.ou.edu/~kmanross

"My opinions are my own and not representative of CIMMS, NSSL,
 NOAA or any affiliates"
+------------------------------------------------------------+


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