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.
<html><div style='background-color:'><P>Hello,</P> <P><SPAN lang=EN-CA style="mso-ansi-language: EN-CA">How I can make more than 1 element? <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></SPAN></P> <P class=MsoNormal><SPAN lang=EN-CA style="mso-ansi-language: EN-CA">/////////////////////////////////////////////////////////<o:p></o:p></SPAN></P> <P class=MsoNormal><SPAN lang=EN-CA style="mso-ansi-language: EN-CA">RealType temperature, speed, time;<o:p></o:p></SPAN></P> <P class=MsoNormal><SPAN lang=EN-CA style="mso-ansi-language: EN-CA"><o:p></o:p></SPAN></P> <P class=MsoNormal><SPAN lang=EN-CA style="mso-ansi-language: EN-CA"><SPAN style="mso-spacerun: yes"> </SPAN>Unit degC = visad.data.netcdf.units.Parser.parse("degC");<o:p></o:p></SPAN></P> <P class=MsoNormal><SPAN lang=EN-CA style="mso-ansi-language: EN-CA"><SPAN style="mso-spacerun: yes"> </SPAN>temperature = new RealType("temperature", degC, null);<o:p></o:p></SPAN></P> <P class=MsoNormal><SPAN lang=EN-CA style="mso-ansi-language: EN-CA"><o:p></o:p></SPAN></P> <P class=MsoNormal><SPAN lang=EN-CA style="mso-ansi-language: EN-CA"><SPAN style="mso-spacerun: yes"> </SPAN>Unit kts = visad.data.netcdf.units.Parser.parse("kts");<o:p></o:p></SPAN></P> <P class=MsoNormal><SPAN lang=EN-CA style="mso-ansi-language: EN-CA"><SPAN style="mso-spacerun: yes"> </SPAN>speed = new RealType("speed", kts, null);<o:p></o:p></SPAN></P> <P class=MsoNormal><SPAN lang=EN-CA style="mso-ansi-language: EN-CA"><o:p></o:p></SPAN></P> <P class=MsoNormal><SPAN lang=EN-CA style="mso-ansi-language: EN-CA"><SPAN style="mso-spacerun: yes"> </SPAN>Unit sec = visad.data.netcdf.units.Parser.parse("seconds");<o:p></o:p></SPAN></P> <P class=MsoNormal><SPAN lang=EN-CA style="mso-ansi-language: EN-CA"><SPAN style="mso-spacerun: yes"> </SPAN>time = new RealType("time", sec, null);<o:p></o:p></SPAN></P> <P class=MsoNormal><SPAN lang=EN-CA style="mso-ansi-language: EN-CA"><o:p></o:p></SPAN></P> <P class=MsoNormal><SPAN lang=EN-CA style="mso-ansi-language: EN-CA"><SPAN style="mso-spacerun: yes"> </SPAN>RealTupleType mydata = new RealTupleType(time, speed, temperature);<o:p></o:p></SPAN></P> <P class=MsoNormal><SPAN lang=EN-CA style="mso-ansi-language: EN-CA"><o:p></o:p></SPAN></P> <P class=MsoNormal><SPAN lang=EN-CA style="mso-ansi-language: EN-CA"><SPAN style="mso-spacerun: yes"> </SPAN>double obsTemp = 32.;<o:p></o:p></SPAN></P> <P class=MsoNormal><SPAN lang=EN-CA style="mso-ansi-language: EN-CA"><SPAN style="mso-spacerun: yes"> </SPAN>double obsSpeed = 15.;<o:p></o:p></SPAN></P> <P class=MsoNormal><SPAN lang=EN-CA style="mso-ansi-language: EN-CA"><SPAN style="mso-spacerun: yes"> </SPAN>double obsTime = 4096.;<o:p></o:p></SPAN></P> <P class=MsoNormal><SPAN lang=EN-CA style="mso-ansi-language: EN-CA"><o:p></o:p></SPAN></P> <P class=MsoNormal><SPAN lang=EN-CA style="mso-ansi-language: EN-CA"><SPAN style="mso-spacerun: yes"> </SPAN>double[] values = {obsTime, obsSpeed, obsTemp};<o:p></o:p></SPAN></P> <P class=MsoNormal><SPAN lang=EN-CA style="mso-ansi-language: EN-CA"><SPAN style="mso-spacerun: yes"> </SPAN>RealTuple obs = new RealTuple(mydata, values);<o:p></o:p></SPAN></P> <P class=MsoNormal><SPAN lang=EN-CA style="mso-ansi-language: EN-CA">////////////////////////////////////////////////////////////////////////////////////<o:p></o:p></SPAN></P> <P class=MsoNormal><SPAN lang=EN-CA style="FONT-FAMILY: Wingdings; mso-ansi-language: EN-CA; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-char-type: symbol; mso-symbol-font-family: Wingdings"><SPAN style="mso-char-type: symbol; mso-symbol-font-family: Wingdings">à</SPAN></SPAN><SPAN lang=EN-CA style="mso-ansi-language: EN-CA">(4096.0, 15.0, 32.0)<o:p></o:p></SPAN></P> <P class=MsoNormal><SPAN lang=EN-CA style="mso-ansi-language: EN-CA"> <o:p></o:p></SPAN></P> <P class=MsoNormal><SPAN lang=EN-CA style="mso-ansi-language: EN-CA">What I need is:<o:p></o:p></SPAN></P> <P class=MsoNormal><SPAN lang=EN-CA style="mso-ansi-language: EN-CA">{(0.0,0.0,0.0), <o:p></o:p></SPAN></P> <P class=MsoNormal><SPAN lang=EN-CA style="mso-ansi-language: EN-CA"><SPAN style="mso-spacerun: yes"> </SPAN>(1.0,1.0,1.0),<o:p></o:p></SPAN></P> <P class=MsoNormal><SPAN lang=EN-CA style="mso-ansi-language: EN-CA"><SPAN style="mso-spacerun: yes"> </SPAN>(2.0,2.0,2.0),<o:p></o:p></SPAN></P> <P class=MsoNormal><SPAN lang=EN-CA style="mso-ansi-language: EN-CA"><SPAN style="mso-spacerun: yes"> </SPAN>(3.0,3.0,3.0),<o:p></o:p></SPAN></P> <P class=MsoNormal><SPAN lang=EN-CA style="mso-ansi-language: EN-CA"><SPAN style="mso-spacerun: yes"> </SPAN>(3.0,4.0,3.0)}<o:p></o:p></SPAN></P> <P class=MsoNormal><SPAN lang=EN-CA style="mso-ansi-language: EN-CA">How I can do that?<o:p></o:p></SPAN></P> <P class=MsoNormal><SPAN lang=EN-CA style="mso-ansi-language: EN-CA">Thanks .<o:p></o:p></SPAN></P> <P class=MsoNormal><SPAN lang=EN-CA style="mso-ansi-language: EN-CA"> <o:p></o:p></SPAN></P> <P><BR><BR><BR> </P><WAIT...> <DIV></DIV> <DIV></DIV> <DIV></DIV> <DIV></DIV> <DIV></DIV> <DIV></DIV> <DIV></DIV> <DIV></DIV> <DIV></DIV> <DIV></DIV> <DIV></DIV> <DIV></DIV> <DIV></DIV> <DIV></DIV> <DIV></DIV> <DIV></DIV> <DIV></DIV> <DIV></DIV> <DIV></DIV> <DIV></DIV> <DIV></DIV> <DIV></DIV> <DIV></DIV> <CENTER><A href="http://www.visualrevolutions.com/vr.htm"><IMG src="http://ad.vconnexions.com/cgi-bin/ad.cgi" border=0><IMG height=1 src="http://ad.vconnexions.com/cgi-bin/advr.cgi" width=1 border=0 1></A> <DIV></DIV></CENTER></div><br clear=all><hr>Join the world?s largest e-mail service with MSN Hotmail. <a href='http://g.msn.com/1HM305401/47'>Click Here</a><br></html>
visad
archives: