<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Approximatrix Forums — Unexpected array reference at (1)]]></title>
	<link rel="self" href="https://forums.approximatrix.com/extern.php?action=feed&amp;tid=324&amp;type=atom" />
	<updated>2014-03-06T00:42:46Z</updated>
	<generator>PunBB</generator>
	<id>https://forums.approximatrix.com/viewtopic.php?id=324</id>
		<entry>
			<title type="html"><![CDATA[Re: Unexpected array reference at (1)]]></title>
			<link rel="alternate" href="https://forums.approximatrix.com/viewtopic.php?pid=1321#p1321" />
			<content type="html"><![CDATA[<p>The previous reply is correct, you&#039;ll need to explicitly use multiplication signs in Fortran.&nbsp; Also, I would suggest (although plenty may disagree) that you use decimal points wherever they&#039;d be applicable.&nbsp; So your equation line should probably be:</p><div class="codebox"><pre><code>ptmp=(tmp(i)*((1000.0/prs(i))**k))</code></pre></div><p>Let us know if you need more help!</p>]]></content>
			<author>
				<name><![CDATA[jeff]]></name>
				<uri>https://forums.approximatrix.com/profile.php?id=2</uri>
			</author>
			<updated>2014-03-06T00:42:46Z</updated>
			<id>https://forums.approximatrix.com/viewtopic.php?pid=1321#p1321</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Unexpected array reference at (1)]]></title>
			<link rel="alternate" href="https://forums.approximatrix.com/viewtopic.php?pid=1320#p1320" />
			<content type="html"><![CDATA[<p>dunno - consider using an operator &#039;*&#039; between the variables?</p><p>= tmp(i) * ((1000/prs(i))**k)</p>]]></content>
			<author>
				<name><![CDATA[jomyer]]></name>
				<uri>https://forums.approximatrix.com/profile.php?id=3525</uri>
			</author>
			<updated>2014-03-05T23:41:29Z</updated>
			<id>https://forums.approximatrix.com/viewtopic.php?pid=1320#p1320</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Unexpected array reference at (1)]]></title>
			<link rel="alternate" href="https://forums.approximatrix.com/viewtopic.php?pid=1319#p1319" />
			<content type="html"><![CDATA[<p>I need help with this error.&nbsp; I have just started using fortran, I&#039;m a student and they asked us to use fortran 2.0.&nbsp; The program has to be able to give us the potentcial tempreture using this formula:</p><p>ptmp=(tmp(i)((1000/prs(i))**k))</p><br /><p>here is the program</p><p>&nbsp; &nbsp; &nbsp; program upperairdata<br />&nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; implicit none<br />&nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; real, dimension(51) :: prs,hgt,tmp,dw,rh,mx,wd,ws<br />&nbsp; &nbsp; &nbsp; real :: sum,average,var,var1,var2,variance,stdev,ptmp,ptmp1,k<br />&nbsp; &nbsp; &nbsp; real :: AAA,maxim,minim<br />&nbsp; &nbsp; &nbsp; integer :: i,count<br />&nbsp; &nbsp; &nbsp; integer, parameter :: num=52<br />&nbsp; &nbsp; &nbsp; character :: header*1000,space3*3=&#039; &#039;</p><p>&nbsp; &nbsp; &nbsp; open(1,file=&#039;G:\WKD\Upperairdata\upperairdata.txt&#039;)<br />c&nbsp; &nbsp; &nbsp;read data<br />&nbsp; &nbsp; &nbsp; read(1,*)header<br />&nbsp; &nbsp; &nbsp; do i=2,num<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;read(1,*)prs(i),hgt(i),tmp(i),dw(i),rh(i),mx(i),wd(i),ws(i)<br />&nbsp; &nbsp; &nbsp; enddo<br />&nbsp; &nbsp; &nbsp; <br />c&nbsp; &nbsp; &nbsp;print*,header<br />&nbsp; &nbsp; &nbsp; print*,prs(2),hgt(2),tmp(2),dw(2)<br />&nbsp; &nbsp; &nbsp; print *,prs(num),hgt(num),tmp(num),dw(num)</p><p>&nbsp; &nbsp; &nbsp; sum=0<br />&nbsp; &nbsp; &nbsp; do i=2,num<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if(tmp(i).ne.(-99.99)) then<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;endif<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;sum=sum+tmp(i)<br />&nbsp; &nbsp; &nbsp; enddo<br />&nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; average=sum/(num-1)<br />&nbsp; &nbsp; &nbsp; print*,&#039;count is=&#039;,num,&#039;and the average is&#039;,average<br />&nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; maxim=tmp(2)<br />&nbsp; &nbsp; &nbsp; minim=tmp(52)<br />&nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; do i=2,num<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if(maxim.lt.tmp(i))maxim=tmp(i)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(tmp(i).ne.(-99.99)) then<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(minim.gt.tmp(i))minim=tmp(i)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; endif<br />&nbsp; &nbsp; &nbsp; &nbsp;enddo<br />&nbsp; &nbsp; &nbsp; print*,&#039;the maxim is&#039;,maxim,&#039;and the minim is&#039;, minim<br />&nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; var=0<br />&nbsp; &nbsp; &nbsp; do i=2,num<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if(tmp(i).ne.(-99.99)) then<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;endif<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;var1=(tmp(i)-average)**2<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;var2=var+var1<br />&nbsp; &nbsp; &nbsp; enddo<br />&nbsp; &nbsp; &nbsp; variance=var2/(num-1)<br />&nbsp; &nbsp; &nbsp; stdev=(sqrt(variance))<br />&nbsp; &nbsp; &nbsp; print*,&#039;the variance is&#039;, variance<br />&nbsp; &nbsp; &nbsp; print*,&#039;and the standard deviation is&#039;,stdev<br />&nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; ptmp1=0<br />&nbsp; &nbsp; &nbsp; k=0.286<br />&nbsp; &nbsp; &nbsp; do i=2,num<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if(tmp(i).ne.(-99.99)) then<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;endif<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ptmp=(tmp(i)((1000/prs(i))**k))<br />&nbsp; &nbsp; &nbsp; enddo<br />&nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; print*,&quot;press enter to end&quot;<br />&nbsp; &nbsp; &nbsp; read*,AAA<br />&nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; end program upperairdata</p>]]></content>
			<author>
				<name><![CDATA[Stephanie252]]></name>
				<uri>https://forums.approximatrix.com/profile.php?id=3524</uri>
			</author>
			<updated>2014-03-05T21:15:21Z</updated>
			<id>https://forums.approximatrix.com/viewtopic.php?pid=1319#p1319</id>
		</entry>
</feed>
