- 积分
- 801
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2013-3-11
- 最后登录
- 1970-1-1
|
发表于 2013-12-26 20:38:53
|
显示全部楼层
program ok3
implicit none
integer i,j,k,n,l,x,p,t,y,a,b,c,d
parameter(n=39,l=65,k=50)
integer pps(k,n),vpps(n,k),yu(61),stpps,s(161),nflag,nlev
character(8) sta(n),aaa(n)
real lon(n),lat(n),tim
open(13,file='f:\yuzhifenbu\gzpc\filename.txt')
open(14,file='F:\xin\svd\39zhanjingwei.txt')
open(15,file='f:\xin\svd\vji.grd',form='binary')
do a=1,n
read(13,*) AAA(a)
enddo
close(13)
do i=1,n
open(100+i,file='F:\yuzhifenbu\gzpc\'//trim(aaa(i)),form='formatted')
do j=1,50
read(100+i,*) pps(j,i)
enddo
enddo
print*,'ok'
do b=1,n
read(14,*) sta(b),lon(b),lat(b)
enddo
do y=1,50
do x=1,39
vpps(x,y)=pps(y,x)
enddo
enddo
print*,'ok'
!print*,sta,lon,lat
do y=1,50
do x=1,39
tim=0.0
nflag=1
nlev=1
write(15) sta(x),lat(x),lon(x),tim,nlev,nflag,vpps(x,y)
print*,sta(x),lat(x),lon(x),tim,nlev,nflag,vpps(x,y)
enddo
tim=0.0
nflag=1
nlev=0
write(15) sta(x-1),lat(x-1),lon(x-1),tim,nlev,nflag
enddo
end
dset f:\xin\svd\vji.grd
dtype station
stnmap f:\xin\svd\rain.map
undef -999.0
title rain
tdef 50 linear jul1951 1yr
vars 1
p 0 99 rainfall data
endvars
program grid
parameter(nx=41,ny=31,nt=50)
real lat(ny),lon(nx)
real s(nx,ny,nt)
open(1,file='F:\xin\svd\kongbai\grid.grd',form='binary')
lat(1)=20.0
lon(1)=80.0
do j=1,ny-1
lat(j+1)=lat(j)+1.0
enddo
do i=1,nx-1
lon(i+1)=lon(i)+1.0
enddo
do k=1,50
do i=1,nx
do j=1,ny
s(i,j,k)=1
enddo
enddo
enddo
write(1) s
end
dset F:\xin\svd\kongbai\grid.grd
undef -9.99e33
title Sample Grid Data
xdef 41 linear 80 1
ydef 31 linear 20 1
zdef 1 linear 1000 1
tdef 50 linear jul1951 1yr
vars 1
g 0 99 grid data
endvars
'REINIT'
'open F:\xin\svd\kongbai\grid.ctl'
'open F:\xin\svd\vji.ctl'
'enable print F:\xin\svd\jiangshuifenbu.gmf'
i=1
while(i<=50)
'set t 'i''
'set xlopts 1 5 0.2'
'set ylopts 1 5 0.2'
'set grads off'
'SET YLINT 2'
'set lon 90 112'
'set lat 25 40'
'set mpdset hires cnworld'
'define aa=oacres(g,p.2,1.5)'
'define aa1=maskout(aa,g-0.5)'
'set grid off'
'set gxout contour'
'set clab forced'
*'set cint 3.0'
*'set cmin 28'
'd aa1'
为什么报错呢?
|
-
|