- 积分
- 9
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2020-4-19
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
老师让绘制台风生成频数的空间分布图,给了相关编码计算频数
program mian
c this code can be used to figure out the frequency of ts activity
parameter(m=33,n=17, nd=151061,ny=10)
real x(m,n),d(nd,ny)
ncount=0
open(90,file='C:\Users\susan\Desktop\sj\jtwc.ts.txt')
do i=1,nd
read(90,*,IOSTAT=VAR) (d(i,j),j=1,ny)
IF(VAR<0) EXIT
CON=CON+1
enddo
do i=1,m
do j=1,n
x(i,j)=0.0
enddo
enddo
c...............................................................
c finish to read the data
c................................................................
!write(*,*)'Input the month1 and month2=?'
! read(*,*) nm1,nm2
c.............................................................
do 10 k=1,CON
c if(d(k,10)==1) then
!nm=int(d(k,3))
!speed=d(k,8)
c.........................................................
c find the grid point
c.........................................................
do k1=1,n
ys=0.+2.5*(k1-1)
yn=0.+2.5*k1
if(d(k,6).ge.ys.and.d(k,6).lt.yn) j=k1
enddo
do k2=1,m
xw=100.+2.5*(k2-1)
xe=100.+2.5*k2
if(d(k,7).ge.xw.and.d(k,7).lt.xe) i=k2
enddo
c-------------------------------------------------------
! if(nm.ge.nm1.and.nm.le.nm2)then
!if(speed.gt.34) then
x(i,j)=x(i,j)+1.0
!endif
!endif
c endif
10 continue
c.................................................
open(94,file='C:\Users\susan\Desktop\sj\Fre.grd',form='unformatted',
$ access='direct',recl=m*n)
write(94,rec=1) ((x(i,j),i=1,m),j=1,n)
C print *,x
stop
end
试运行后出现的错误我不是很懂?
C:\Users\susan\Desktop\sj\Frequency.f(55) : Error: Unterminated character constant
$ access='direct',recl=m*n)
----------------------^
C:\Users\susan\Desktop\sj\Frequency.f(55) : Error: Invalid character_kind_parameter. No underscore
$ access='direct',recl=m*n)
---------------------------------^
C:\Users\susan\Desktop\sj\Frequency.f(55) : Error: Syntax error, found IDENTIFIER 'DIRECT' when expecting one of: ( * :: , <END-OF-STATEMENT> ; : ) + . - (/ [ ] /) ** / > // .LT. ...
$ access='direct',recl=m*n)
----------------^
Error executing df.exe.
Frequency.obj - 3 error(s), 0 warning(s)
求教
|
|