主题:求助
初学者,不知为何数据越界
program shuishen
parameter(im=10968)
real(kind=8) fx(im),fy(im),h(im),hh(im)
open(25,file='wh_dep.dat',status='old')
open(26,file='wh_dep-gaibian.dat',status='old')
do i=1,im
read(25,*)fx(i),fy(i),h(i)
end do
do i=1,im
if (fx(i).gt.403965.15 .and. fx(i).lt.410882.15 .and. fy(i).gt.4158487.15 .and. fy(i).lt.4164825.15 )then
hh(i)=h(i)*(1-2.5*3.1415926/4*(1.5/10)**2)
end if
end do
do i=1,im
write(26,*)fx(i),fy(i),hh(i)
end do
end
麻烦看一下,谢谢了
program shuishen
parameter(im=10968)
real(kind=8) fx(im),fy(im),h(im),hh(im)
open(25,file='wh_dep.dat',status='old')
open(26,file='wh_dep-gaibian.dat',status='old')
do i=1,im
read(25,*)fx(i),fy(i),h(i)
end do
do i=1,im
if (fx(i).gt.403965.15 .and. fx(i).lt.410882.15 .and. fy(i).gt.4158487.15 .and. fy(i).lt.4164825.15 )then
hh(i)=h(i)*(1-2.5*3.1415926/4*(1.5/10)**2)
end if
end do
do i=1,im
write(26,*)fx(i),fy(i),hh(i)
end do
end
麻烦看一下,谢谢了