[netcdf-java] sample code for reading multidim vlen variable

Is there sample code somewhere for reading a multidimensional variable
where some of the dimensions are vlen, e.g., myVar[dimA][*][*] ?

I found
http://www.unidata.ucar.edu/software/thredds/v4.5/netcdf-java/reference/StructureData.html#vlen
but the temp variable just has the one dimension.

Just calling myVar.read() doesn't work(java.io.IOException) -- I suspect
because it would be useless without knowing all the subdimension sizes.

Is there a way to get a flattened version of the data and dimensions?
e.g., have myVar[dimA][*][*] flattened into
a  b  c myVar
0  0  0  1.2
0  0  1  1.4
0  1  0  1.6
1  0  0  1.1
1  0  1  1.3
1  0  2  1.4
1  1  0  1.7
1  1  1  1.1
1  2  0  1.2

Or, can you give me general advice on how to get the data out of a variable
like this?
Do I need to iterate through the dimA values, and do separate read()s for
each value of a, then separate reads for each value of that dimension?

Thank you.

-- 
Sincerely,

Bob Simons
IT Specialist
Environmental Research Division
NOAA Southwest Fisheries Science Center
99 Pacific St., Suite 255A      (New!)
Monterey, CA 93940               (New!)
Phone: (831)333-9878            (New!)
Fax:   (831)648-8440
Email: bob.simons@xxxxxxxx

The contents of this message are mine personally and
do not necessarily reflect any position of the
Government or the National Oceanic and Atmospheric Administration.
<>< <>< <>< <>< <>< <>< <>< <>< <><
  • 2016 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdf-java archives: