- 积分
- 181
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2015-10-19
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
program main
implicit none
real, allocatable, dimension(:,:,:) :: u,v,vor,w
real, allocatable, dimension(:) :: tcx,tcy
real, allocatable, dimension(:,:,:) :: ur,vt,rh
real, allocatable, dimension(:,:) :: vtb,slp
real, parameter :: default=1.e35
integer :: uvrec
integer :: vtbrec
integer :: file_recl
integer :: nx,ny,nz,nt,nr,i,j,k,t,z,rec,irec
real :: dx,dy,smn
nx=250
ny=250
nz=19
nt=145
nr=76
dx=27000.
dy=27000.
open(25,file='./f01_uv.grd',form='unformatted',convert='big_endian',access='direct',&
recl=nx*ny*4,status='unknown')
open (30,file='./f01_slp.grd',form='unformatted',convert='little_endian',access='direct',&
recl=nx*ny*4,status='unknown')
open (10, file='./f01_ur.grd',form='binary')
open (11, file='./f01_vt.grd',form='binary')
open (31, file='./f01_vtb.grd',form='binary')
irec=0
do t=1,nt
allocate (u(nx,ny,nz),v(nx,ny,nz))
allocate (tcx(nz), tcy(nz))
allocate (slp(nx,ny))
allocate (w(nx,ny,nz))
! do k=1,nz
! read(25)((rh(i,j,k),i=1,nx),j=1,ny)
! enddo
do k=1,nz
irec=irec+1
read (25,rec=irec) ((u(i,j,k),i=1,nx),j=1,ny)
! write(*,*)u(100,50,k)
end do
do k=1,nz
irec=irec+1
read (25,rec=irec) ((v(i,j,k),i=1,nx),j=1,ny)
end do
do k=1,nz
irec=irec+1
read (25,rec=irec) ((w(i,j,k),i=1,nx),j=1,ny)
end do
irec=irec+1
read(30,rec=irec) ((slp(i,j),i=1,nx),j=1,ny)
! allocate (vor(nx,ny,nz))
! call vordiv(u,v,nx,ny,nz,dx,dy,vor,1) !1是计算散度,0是计算涡度
! write(*,*) ((vor(i,j,2),i=40,60),j=140,160)
!利用最小海平面气压
smn=slp(125,125)
do j=1,250
do i=1,250
if(slp(i,j).le.smn) then
smn=slp(i,j)
tcy=j
tcx=i
endif
enddo
! write(*,*)tcx
enddo
! write(*,*)(tcx(k),k=1,nz)
!!!!!!!!!!!!!!!!!!!! 方位角平均 !!!!!!!!!!!!!!!!!!!!!!!!!!
allocate (ur(nx,ny,nz),vt(nx,ny,nz))
call coordinate(u,v,ur,vt,nx,ny,nz,tcx,tcy)
do k=1,nz
write(10) ((ur(i,j,k),i=1,nx),j=1,ny)
enddo
do k=1,nz
write(11) ((vt(i,j,k),i=1,nx),j=1,ny)
enddo
!write(*,*) vt(100,100,1)
allocate (vtb(nr,nz))
! call symmetric(ur,vtb,nx,ny,nz,tcx,tcy,nr)
call symmetric(vt,vtb,nx,ny,nz,tcx,tcy,nr)
write (31) ((vtb(i,k),i=1,nr),k=1,nz)
deallocate (u,v)
deallocate (slp)
deallocate (tcx,tcy)
deallocate (ur,vt)
deallocate (vtb)
! deallocate (vor)
end do
close(25)
close(31)
close(30)
end program main
include 'coordinate.f90'
include 'symmetric.f90'
! include 'vordiv.f90'
error:PGFIO-F-253/unformatted read/unit=30/attempt to read non-existent record (direct access).
File name = /home/dengly/a/f01_slp.grd unformatted, direct access record = 58
In source file main.f90, at line number 69
我不论怎么改Fortran程序都显示这个错误,或者是 attempt to read the end of file。。。。求大神帮助,是我rec没用好吗?我是在大型机上运行的main.f90
[img]file:///C:\Users\LynnDee\AppData\Roaming\Tencent\Users\573111441\QQ\WinTemp\RichOle\A{[%63N8FVD~9JTSFEGIQ1L.png[/img]
|
-
错误显示
|