[netcdf-java] Simple subsetting/copying question

Hello,

I am trying to use the NetCDF Java API to do simple gridded subsetting
along axes (longitude, latitude, altitude, time bounds).  This is
similar to THREDDS use cases, in that I am doing on-the-fly work to
return a subset of the data to a client.

There are a number of ways in the API to do this sort of thing, but I
have yet to find a straightforward way to copy the "other" (non-data
value) information.  I am currently copying the data contents based on
Ranges and Arrays, and manually reconstructing all the other information
(such as dimensions, the fill values, units, etc. etc. etc.) and I'm
wondering if there is a simpler way.

One method that seems similar is GridDatatype.makeSubset(), but I can't
find anything similar at the GridDataset level and have not found an
easy way to re-assemble the dataset from the individual grids.


If there is existing code to do this, that would also be handy.  The
THREDDS source does not appear to be publicly available, but a pointer
to the appropriate sections would probably work quite well.

Thanks,
Aaron



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