- 积分
- 214
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2011-10-10
- 最后登录
- 1970-1-1
|

楼主 |
发表于 2012-10-17 16:48:51
|
显示全部楼层
做个霸气的木头 发表于 2012-10-17 16:25
gs贴上来吧,数据是咋样的,不然没法帮你~
这是求距平的fortran程序:
program apm
integer,parameter ::n=62,m=180*89
real ::x(n,m),s,p(m),t(n,m)
open(11,file='xjsst.grd',form='unformatted',access='direct',recl=m)
do i=1,n
read(11,rec=i) (x(i,j),j=1,m)
enddo
close(11)
do j=1,m
s=0
do i=1,n
s=s+x(i,j)
enddo
p(j)=s/62
do i=1,n
t(i,j)=x(i,j)-p(j)
enddo
enddo
open(12,file='jpxjsst.grd',form='unformatted',access='direct',recl=m)
do i=1,n
write(12,rec=i) (t(i,j),j=1,m)
enddo
close(12)
stop
end
这个事距平的ctl:
dset d:/ktbg/lx/jpxjsst.grd
title noaa sst
undef -9.99e+33
xdef 180 linear 0 2
ydef 89 linear -88 2
zdef 1 linear 0 1
tdef 62 linear dec1948 1yr
vars 1
sst 1 -999
endvars |
|