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.
Hi Eric, You can do thhis with GriddedSets, since they do not assume even spacing or even that grid boxes are parallel to the coordinate axes. The system does not include an implementation of Gridded4DSet, so I recommend expressing your data as a FieldImpl of FlatFields, with MathType: (t -> ((x, y, z) -> (list, of, dependent, variables))) The domain Set of the outer FieldImpl would be a Grided1DSet of your t values, and the domain Set of your inner FlatFields would be a Gridded3DSet of your (x, y, z) values (note the FlatFields can all share the same Gridded3DSet). The Gridded3DSet constructor takes a 'float[][] samples' argument dimensioned [3][number_of_samples] where number_of_samples number_of_x * number_of_y * number_of_z Note that Gridded3DSets are constructed in the Test37.java and Test67.java programs in the visad/examples directory. Good luck, Bill On Thu, 24 Mar 2005, Eric Davies wrote: > I'm trying to build a 4D grid (t,z,y,x) such that one or more of the grid > axes are irregularly spaced. > For example, I might want to build a grid with the following axis samplings: > t at 1, 2, 4, 29, 30, 50 > z at 1, 10, 20, 30, 100, 200, 300, 1000 > y at -10, 20, 40, 50, 70 // degrees north > x at -60, 70, 71, 80, 83 > > The grids are rectangular of course, they just happen to have some > irregular stretching along one or more dimensions. > I'd prefer not to use an Irregular3D set since it would involve a lot of > overhead if I had to provide individual coordinates for each grid point. I > should be able to set up a mapping for each axis and use a FlatField. > > Any examples or code fragments would be most appreciated. > > Eric.
visad
archives: