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 John, > I have data with a MathType like: > > (Time -> ((lat, lon) -> value)) > > I would like to be able to do a combine on multiple cells like this in > order to produce animations. When I do so I get the error: > > could not evaluate function "combine" > > Is there any way to make this work? > > MORE DETAIL: > I am working on an educational application that uses the VisAD > spreadsheet. What I would like to be able to do is have many cells of > data at different time periods and allow students to assemble their own > animations. The data files I import to VisAD are serialized VisAD > objects. Each one has a Linear1DSet consisting of 1 element associated > with time. The spatial data are mapped using a Linear2DSet. It may be difficult to do this in the SpreadSheet, but the API gives you a number of ways to program it in a "custom" spread sheet. Basically, create a new FieldImpl with the same MathType as your files, but whose domain Set is a Gridded1DSet with as many time steps as you have altoghether (it can be a Linear1DSet if the times are evenly spaced). Then do something like: for (int i=0; i<ntimes; i++) { FlatField time_step = field[i].getSample(0); new_field.setSample(i, time_step); } That is, take the single time step Filed from each file and merge them into the new FieldImpl. Cheers, Bill ---------------------------------------------------------- Bill Hibbard, SSEC, 1225 W. Dayton St., Madison, WI 53706 hibbard@xxxxxxxxxxxxxxxxx 608-263-4427 fax: 608-263-6738 http://www.ssec.wisc.edu/~billh/vis.html
visad
archives: