- 积分
- 5332
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2017-4-11
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
对hgt的日平均资料做了一个31点带通滤波的,但是运行后一直是
At line 21 of file F:\fengbao\fliter.f90 (unit = 11, file = 'F:\fengbao\hgt_day\hgt.day.grd')
Fortran runtime error: I/O past end of record on unformatted file
程序如下:
program filter
parameter(nx=144,ny=37,nt=20320)
real hgt(nx,ny,-15:15),hgtf(nx,ny)
real(8) f(0:15)
integer l,m,k,ka,kb
data f/0.44400781,-0.06091663,-0.28502351,0.06450856,0.04174331,&
&0.03262632,0.03327588,-0.03954566,-0.02086656,-0.00538411,&
&0.01032456,0.00944603,0.00638732,-0.00373075,-0.00722280,0.00328247/
m=0
l=0
open(11,file='F:\fengbao\hgt_day\hgt.day.grd',status='old',form='unformatted',access='direct',recl=144*37)
open(12,file='F:\fengbao\lb\500hgt(lb)day.1960-2014.grd')
do ka=0,nt
do kb=-15,15
read(11,rec=ka+1+15+kb) ((hgt(i,j,kb),i=1,nx),j=1,ny)
l=l+1
enddo
do j=1,ny
do i=1,nx
hgtf(i,j)=f(0)*hgt(i,j,0)
do k=1,15
hgtf(i,j)=hgtf(i,j)+f(k)*(hgt(i,j,k)+hgt(i,j,-k))
enddo
enddo
enddo
do j=1,ny
do i=1,nx
write(12) hgtf(i,j)
m=m+1
enddo
enddo
enddo
close(11)
close(12)
print*,l
print*,m
end
根据说的,问题是出现在这里了
read(11,rec=ka+1+15+kb) ((hgt(i,j,kb),i=1,nx),j=1,ny)
但是我想半天也没想出来这句哪里不对
求指点 |
|