21 气象统计方法课程实践内容2013
实习五 对给定的海温数据进行EOF分析
1、资料介绍
给出海表温度距平数据资料sstpx.grd,以及相应的数据描述文件sstpx.ctl,对其进行EOF分析,资料的时空范围可以根据sstpx.ctl获知。
数据在文件夹中单独给出,距平或者标准化距平处理后再进行EOF。
Zhunsst.for给出了如何读取资料,
Ssteof.for为对距平或者标准化距平处理后的资料进行EOF分析。
2、要求
实习报告中给出第一特征向量及其时间系数,并分析其时空特征。
3、实习结果:
(1)、FORTRAN源程序
! prepare data for eof analysis
! the program is to normalize sea surface temperature(SST) ! mt: the length of time series;
! mo: the month numbers; my: the year numbers; ! sst: sea surface temperature data;
!sst3: the work array; avf: the average of SST; ! df: the variance of SST; program main
parameter(mo=12,my=43,nx=18,ny=12,mt=516) dimension avf(mo,nx,ny),df(mo,nx,ny) dimension sst(nx,ny,mt),sst3(nx,ny,mt)
open(1,file='g:\\sstpx\\sstpx.grd',form='unformatted',access='direct',recl=nx*ny)
第 21 页 共 36 页
22 气象统计方法课程实践内容2013
irec=1
do it=1,mt
read(1,rec=irec)((sst(i,j,it),i=1,nx),j=1,ny) irec=irec+1 end do ! average
do j=1,ny do i=1,nx do k=1,mo
do it=k,mt,12
avf(k,i,j)=avf(k,i,j)+sst(i,j,it) end do avf(k,i,j)=avf(k,i,j)/my end do end do end do
! variance do j=1,ny do i=1,nx do k=1,mo do it=k,mt,12
df(k,i,j)=df(k,i,j)+(sst(i,j,it)-avf(k,i,j))**2 end do df(k,i,j)=sqrt(df(k,i,j)/my) end do end do
end do ! standardizing do j=1,ny do i=1,nx do k=1,mo do it=k,mt,12 if(sst(i,j,it)==-999.0)then sst3(i,j,it)=-999.0 else
sst3(i,j,it)=(sst(i,j,it)-avf(k,i,j))/df(k,i,j) end if end do end do end do
end do ! output file
open(2,file='g:\\sstpx\\standard.grd',form='unformatted',access='direct',recl=nx*ny) irec=1
第 22 页 共 36 页
23 气象统计方法课程实践内容2013
do it=1,mt
write(2,rec=irec)((sst3(i,j,it),i=1,nx),j=1,ny) irec=irec+1 end do close(2) close(1)
end
分解后的时间系数写入tcf.grd文件中,空间场写入evf.grd文件中,特征值和分析误差写入sstpx文件夹下的eigenvalue.dat文件,特征向量写入eigenvactors.dat文件。 由eigenvalues.dat 中的标准特征向量可得出一般特征值的前两个模态有效。
用grads打开evf.ctl和tcf.ctl,分别画出海平面气温EOF分解后的空间场和时间序列。
(2)空间场和时间序列的ctl文件
evf.ctl
dset g:\\sstpx\\evf.grd title Coads SSTA E undef -999.0
xdef 18 linear 120 10 ydef 12 linear -27.5 5 zdef 1 linear 1000 1
tdef 2 linear 1jan1948 1month vars 1
S 0 99 Coads SST anomaly interperated using endvars tcf.ctl
dset g:\\sstpx\\tcf.grd title Coads SSTA T undef -999.0
xdef 1 linear 120 10 ydef 1 linear -27.5 5 zdef 1 linear 1000 1
tdef 516 linear 1jan1948 1month vars 2
a 0 99 time coefficient 1 b 0 99 time coefficient 2 endvars
第 23 页 共 36 页
24 气象统计方法课程实践内容2013
(3)运行结果
第一模态
空间场
时间系数
第 24 页 共 36 页
25 气象统计方法课程实践内容2013
第二模态
空间场
时间系数
第一特征向量
Eigenvalues.dat文件给出了EOF分析的第一特征向量值的216个值
0 0 0 -0.0220 0.0180 0.0430 0.0340 0.0640
0.0540 0.0600 0.0690 0.0550 0.0370 0.0100 -0.0190 -0.0210 -0.0460 0 0 0 0 -0.0230 0.0210 0.0500 0.0610 0.0540 0.0500 0.0260 0.0130 0.0070 -0.0600 -0.0580 -0.0690 -0.0530 -0.0550 0 -0.0130 0 -0.0010 0.0230 0.0280 0.0350 0.0510 0.0320 0.0080 -0.0550 -0.0730 -0.1070 -0.1180 -0.0990 -0.0760 -0.0680 -0.0780 0 -0.0140 -0.0140 0.0010 0.0360 0.0270 0.0180 -0.0010 -0.0560 -0.0610 -0.1050 -0.1230 -0.1230 -0.1220 -0.1140 -0.0970 -0.0870 -0.1110 0
第 25 页 共 36 页