- 积分
- 14046
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2013-4-14
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
我手头的MTT程序如下:
C THIS IS A PROGRAM FOR DETECTING ABRUPT CLIMATIC CHANGE
C BY USING MOVING t-TEST TECHNIQUE
PROGRAM MTT
parameter(id=1000)
DIMENSION Y(1000),YN1(1000),YN2(1000),YC1(1000),YC2(1000),
& S(1000),T(1000),NY1(1000),NY2(1000),NNY1(1000),NNY2(1000)
WRITE(*,10)
10 FORMAT(5X,'N=?,IH=?,NYEAR=?')
READ(*,*)N,IH,NYEAR
C **************************************************
C * N: SAMPLE SIZE *
C * IH: LENGTH OF SUB-SERIES *
C * NYEAR: FIRST YEAR OF THE TIME SERIES *
C * Y(N): ORIGINAL TIME SERIES *
C * ************************************************
OPEN(2,FILE='d:\2.txt')
READ(2,*)(Y(I),I=1,N)
N1=N-IH+1
N2=N-2*IH+1
C1=0.0
C2=0.0
DO 20 I=1,IH
20 C1=C1+Y(I)
DO 30 I=IH+1,2*IH
30 C2=C2+Y(I)
DO 40 I=1,N-IH
D1=C1-Y(I)+Y(I+IH)
YN1(I)=C1/IH
40 C1=D1
DO 50 I=IH+1,N-IH
D2=C2-Y(I)+Y(I+IH)
YN2(I-IH)=C2/IH
50 C2=D2
YN1(N1)=C1/IH
YN2(N2)=C2/IH
DO 60 I=1,N1
YC1(I)=0.0
DO 70 J=I,IH+I-1
70 YC1(I)=YC1(I)+(Y(J)-YN1(I))*(Y(J)-YN1(I))
60 CONTINUE
DO 80 I=1,N2
YC2(I)=0.0
DO 90 J=IH+I,2*IH+I-1
90 YC2(I)=YC2(I)+(Y(J)-YN2(I))*(Y(J)-YN2(I))
80 CONTINUE
DO 100 I=1,N2
100 S(I)=SQRT((YC1(I)+YC2(I))/(IH+IH-2))
DO 110 I=1,N2
110 T(I)=(YN1(I)-YN2(I))/(S(I)*SQRT(2.0/IH))
DO 120 I=1,N2
NY1(I)=NYEAR+I-1
NNY1(I)=NY1(I)+IH-1
NY2(I)=NYEAR+I+IH-1
120 NNY2(I)=NY2(I)+IH-1
IF(IH.EQ.5)THEN
A=4.0
B=-4.0
ELSE IF(IH.EQ.10)THEN
A=3.2
B=-3.2
ELSE
A=3.0
B=-3.0
END IF
OPEN(3,FILE='d:\3.txt',STATUS='NEW')
WRITE(3,130)
130 FORMAT(30X,'ABRUPT CLIMATIC CHANGE ANALYSIS'/)
WRITE(3,140)
140 FORMAT(25X,'TM',4X,'t-TEST(0.01)'/)
DO 150 I=1,N2
WRITE(3,160)NY1(I),NNY1(I),NY2(I),NNY2(I),T(I),A,B
160 FORMAT(1X,I4,'-',I4,'--',I4,'-',I4,1X,3F8.2)
150 CONTINUE
OPEN(4,FILE='d:\4.txt',STATUS='NEW')
DO 170 I=1,N2
WRITE(4,180)NNY1(I),T(I),A,B
180 FORMAT(1X,I4,3F8.2)
170 CONTINUE
STOP
END
我知道其中N为样本量大小,NY为起始年,那么其中的IH表示的是什么?
下面的除了一个输入文件地址和两个输出文件的地址之外还需要改什么吗?
|
|