unclassifiable statement at (1) Fortran Error -
at line 64 confirmed errors began
i asked modify legacy code. have found these errors when compiling error compiling picture . know how solve these errors? use gfortran compiler.
the source code:
* spectral analysis of measured data * parameter (nd=86400,nsp=43200,nnd=86400) common /wdata/ wd(nnd),wd2(nnd) common /spec/ wsp(nsp) common /tsdata/ ts(nd*2),ctts(nd*2) common /spdata/ p(nsp),df real mean data dt/1.0/ data cotl/14400.0/ data cots/600.0/ pi=3.141593 open(32,file="pw.txt",status="old") open(12,file="output1",status="unknown") open(13,file="output2",status="unknown") j=1,nnd read(32,*)wd(j) end total=0.0 mean=0.0 j=1,nnd total=total+wd(j) end mean=total/float(nnd) j=1,nnd wd(j)=wd(j)-mean end numerical filtering , spectral analysis m=nd/2 kf=1 td=dt*float(nd) df=1./td j=1,nd ts(j)=wd(j) ts(j+nd)=0. end cofl=1./cotl cofh=1./cots ncutl=ifix((cofl+df/2.)/df)+1 ncuth=ifix((cofh-df/2.)/df)+1 ========================= call cutoff(m,ncutl,ncuth) ========================= j=1,nd wd2(j)=ctts(j) end ================================= subroutine cutoff(m,ncutl,ncuth) ================================= parameter(nd=86400,nsp=43200) common /tsdata/ ts(nd*2),ctts(nd*2) common /fftdata/ w1(nd*2) mm=m+m m4=mm+mm j=1,mm w1(2*j-1)=ts(j) w1(2*j)=ts(j+mm) end =============== call four1(mm,1) =============== j=1,m if(j.eq.1.and.ncutl.gt.0)then w1(1)=0. w1(2)=0. else if(j.lt.ncutl)then w1(2*j-1)=0. w1(2*j)=0. w1(m4-2*j+3)=0. w1(m4-2*j+4)=0. end if if(j.gt.ncuth)then w1(2*j-1)=0. w1(2*j)=0. w1(m4-2*j+3)=0. w1(m4-2*j+4)=0. end if if(ncuth.gt.m) w1(mm+1)=0. w1(mm+2)=0. end if end ----------------- call four1(mm,-1) ----------------- i=1,mm ctts(i)=w1(2*i-1)/float(mm) ctts(i+mm)=w1(2*i)/float(mm) end return end ========================== subroutine four1(nn,isign) ========================== parameter(nd=86400) real*8 wr,wi,wpr,wpi,wtemp,theta common /fftdata/ data(nd*2)c n=2*nn j=1 11 i=1,n,2 if(j.gt.i) tempr=data(j) tempi=data(j+1) data(j)=data(i) data(j+1)=data(i+1) data(i)=tempr data(i+1)=tempi endif m=n/2 1 if ((m.ge.2).and.(j.gt.m)) j=j-m m=m/2 go 1 endif j=j+m 11 continue mmax=2 2 if (n.gt.mmax) istep=2*mmax theta=6.28318530717959d0/(isign*mmax) wpr=-2.d0*dsin(0.5d0*theta)**2 wpi=dsin(theta) wr=1.d0 wi=0.d0 13 m=1,mmax,2 12 i=m,n,istep j=i+mmax tempr=sngl(wr)*data(j)-sngl(wi)*data(j+1) tempi=sngl(wr)*data(j+1)+sngl(wi)*data(j) data(j)=data(i)-tempr data(j+1)=data(i+1)-tempi data(i)=data(i)+tempr data(i+1)=data(i+1)+tempi 12 continue wtemp=wr wr=wr*wpr-wi*wpi+wr wi=wi*wpr+wtemp*wpi+wi 13 continue mmax=istep go 2 endif return end
you haven't closed main program end
statement before subroutine cutoff
statement
j=1,nd wd2(j)=ctts(j) end ================================= subroutine cutoff(m,ncutl,ncuth) =================================
this should read like
j=1,nd wd2(j)=ctts(j) end end subroutine cutoff(m,ncutl,ncuth)
however doesn't make sense. i'm sure there more missing lines. there many illegal statements in code presented due bad formatting vladimir f has noted.
Comments
Post a Comment