Data manipulation

Hi guys,

I have a data manipulation question. I have a series of NetCDF files with the same internal structure. When loaded using InputNetcdf, they have the form

(Time) --> ( (X, Y) --> ([variable]*))
--------------------------
For example

(Time) --> ((x_ocean, y_ocean) --> (eta_t, hbl, sst, sss))
--------------------------

And I would like to break that up into

[(Time) --> (( X, Y) --> (var))]*
---------------------------
For example

(Time) --> ((x_ocean, y_ocean) --> (eta_t),
(Time) --> ((x_ocean, y_ocean) --> (hbl),
(Time) --> ((x_ocean, y_ocean) --> (sst),
(Time) --> ((x_ocean, y_ocean) --> (sss)
---------------------------

i.e. factor out the variables so they each has a unique data references.

The problem I'm running into is that FieldImpl has a getDomainSet() but no getRangeSet() - it seems like I have to get each indexed range sample individually getSample(n). This strikes me as being rather inefficient, as I will have to parse over every sample in the time array, then every sample in the x,y array in order to factor out the variables. The problem is that (a) this is computationally inefficient and (b) that I think it will also need to use some extra memory, which is already a problem for our data sets.

Maybe someone could enlighten me as to a better way?

The ultimate goal is that I want to toggle the visibility of each variable (i.e. temperature, salinity, U, V) independantly, which seems to require having separate data references for each and using dataReference.toggle(false).

I also have some three-dimensional data which includes a z_ocean index, and which I may have to factor out in order to allow people to toggle the levels independantly.

Cheers,
-Tennessee

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