- 积分
- 8
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2013-5-4
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
我要求西南降水和中国秋季降水的相关性
先用grads截取中国秋季降水平均
可是出来的grd应该是无格式文件
然后运行fortran的时候出现了
forrtl: severe (257): formatted I/O to unit open for unformatted transfers, unit
2, file E:\lunwen\rain\qiuji.grd
Press any key to continue
就是说无格式文件什么的吧,请问我应该怎么改
ctl
dset e:\lunwen\rain\rain.grd
title MM5 data
undef -9999.
xdef 136 linear 70 0.5
ydef 112 linear 1 0.5
zdef 1 levels 1000.00
tdef 720 linear 00:00Z01JAN1951 1mo
vars 1
pr 0 99 accum conv pcn (cm/d)
endvars
gs
'reinit'
'open e:\lunwen\rain\rain.ctl'
'set gxout fwrite'
'set fwrite e:\lunwen\rain\js.grd'
'set x 1 136'
'set y 1 112'
'set z 1'
year=1
while(year<=60)
mon=9
while(mon<=11)
ij=(year-1)*12+mon
'set t 'ij''
mon=mon+1
endwhile
sj=(year-1)*12+9
'define jp=ave(pr,t='sj',t='sj+2')'
'd jp'
year=year+1
endwhile
'disable fwrite'
;
fortran
program main
implicit none
integer,parameter::yy=60,ii=136,jj=112
dimension iod(yy),summerrain(ii,jj,yy),correlation(ii,jj),averain(ii,jj),suma(ii,jj),sumb(ii,jj)
real iod,summerrain,correlation,averain,aveiod,suma,sumb,sumc
integer i,j,y
open(1,file='E:\lunwen\rain\js.grd',form='binary')
open(2,file='E:\lunwen\rain\qiuji.grd',form='unformatted')
!
do y=1,yy
do i=1,ii
do j=1,jj
read(1) summerrain(i,j,y)
end do
end do
read(2,*) iod(y)
end do
!
do i=1,ii
do j=1,jj
suma(i,j)=0
sumb(i,j)=0
sumc=0
do y=2,yy
averain(i,j)=(summerrain(i,j,1)+summerrain(i,j,y))/yy
aveiod=(iod(1)+iod(y))/yy
end do
do y=1,yy
suma(i,j)=suma(i,j)+(summerrain(i,j,y)-averain(i,j))*(iod(y)-aveiod)
sumb(i,j)=sumb(i,j)+(summerrain(i,j,y)-averain(i,j))**2
sumc=sumc+(iod(y)-aveiod)**2
end do
correlation(i,j)=(suma(i,j)/yy)/sqrt((sumb(i,j)/yy)*(sumc/yy))
end do
end do
!
open(3,file='E:\lunwen\program\jscor.grd',form='binary')
do i=1,ii
do j=1,jj
write(3) correlation(i,j)
end do
end do
close(1)
close(2)
close(3)
end
请各位大神帮忙
我看了http://bbs.06climate.com/forum.php?mod=viewthread&tid=9469
这篇帖子还是有有问题
|
|