Due to the current gap in continued funding from the U.S. National Science Foundation (NSF), the NSF Unidata Program Center has temporarily paused most operations. See NSF Unidata Pause in Most Operations for details.
On Tue, 28 May 2002, yahya ay wrote: > How I can make more than 1 element? <?xml:namespace prefix = o ns > "urn:schemas-microsoft-com:office:office" /> > > ///////////////////////////////////////////////////////// > > RealType temperature, speed, time; > > Unit degC = visad.data.netcdf.units.Parser.parse("degC"); > > temperature = new RealType("temperature", degC, null); > > Unit kts = visad.data.netcdf.units.Parser.parse("kts"); > > speed = new RealType("speed", kts, null); > > Unit sec = visad.data.netcdf.units.Parser.parse("seconds"); > > time = new RealType("time", sec, null); > > RealTupleType mydata = new RealTupleType(time, speed, temperature); > > double obsTemp = 32.; > > double obsSpeed = 15.; > > double obsTime = 4096.; > > double[] values = {obsTime, obsSpeed, obsTemp}; > > RealTuple obs = new RealTuple(mydata, values); > > /////////////////////////////////////////////////////////////////////////////// > //// > > à(4096.0, 15.0, 32.0) > > > > What I need is: > > {(0.0,0.0,0.0), > > (1.0,1.0,1.0), > > (2.0,2.0,2.0), > > (3.0,3.0,3.0), > > (3.0,4.0,3.0)} > > How I can do that? It depends on what exactly you mean. Literally you are describing a Tuple of RealTuples. But I suspect you really mean a number of values of the same RealTupleType, which would be a FlatField with FunctionType something like: (index -> mydata) Where the domain Set of the Index defines a Set of 'index' values. See Ugo's tutorial, and Tom's data model tutorial. Good luck, Bill
visad
archives: