- 积分
- 1246
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2012-5-25
- 最后登录
- 1970-1-1
|
楼主 |
发表于 2014-9-26 12:00:59
|
显示全部楼层
我的站点处理程序如下
implicit none
integer n
parameter(n=1532)
integer i,j,k,irec,nlev,nflag
real tim
real lon(n),lat(n),rain(n)
integer high(n)
character*8 stid(n)
open(1,file='F:/station/14082408.000')
do i=1,n
read(1,*) stid(i),lat(i),lon(i),high(i),rain(i)
enddo
close(1)
!pause
open(2,file='F:/station/140824r.grd',form='binary')
tim = 0.0
nlev = 1
nflag = 1
do i = 1,n
write(2) stid(i),lat(i),lon(i),tim,nlev,nflag,rain(i)
! write(2) stid(i),lat(i),lon(i),tim,nlev,nflag,high(i)
enddo
nlev = 0
write(2) stid(n-1),lat(n-1),lon(n-1),tim,nlev,nflag
close(2)
open(12,file='F:/station/140824r.ctl')
write(12,'(a)') 'dset F:\station\140824r.grd'
write(12,'(a)') 'dtype station'
write(12,'(a)') 'stnmap F:\station\rain.map'
write(12,'(a)') 'undef -999.0'
write(12,'(a)') 'title rain'
write(12,'(a)') 'tdef 1 linear Aug2014 1mo'
write(12,'(a)') 'vars 1'
write(12,'(a)') 'p 0 99 rainfall data'
write(12,'(a)') 'ENDVARS'
close(12)
end
|
|