- 积分
- 337
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2014-10-31
- 最后登录
- 1970-1-1
|
发表于 2014-11-6 08:19:45
|
显示全部楼层
C THIS IS A PROGRAM FOR DETECTING ABRUPT CLIMATIC CHANGE
C BY USING MOVING t-TEST TECHNIQUE
PROGRAM MTT
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=53,IH=10,NYEAR=1961')
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:\mtt\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:\mtt\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:\mtt\4.txt ',STATUS='NEW')
执行结果出现如下调试结果如何解决
Configuration: MTT- Win32 Debug--------------------CompilingFortran...C:\ProgramFiles\MTT\MTT.FOR
32Loaded 'ntdll.dll', no matching symbolic information found.
Loaded 'C:\Windows\System32\kernel32.dll', no matching symbolic information found.
Loaded 'C:\Windows\System32\KernelBase.dll', no matching symbolic information found.
The program 'C:\Program Files\MTT\Debug\MTT.exe' has exited with code 0 (0x0).
DO 170 I=1,N2
WRITE(4,180)NNY1(I),T(I),A,B
180 FORMAT(1X,I4,3F8.2)
170 CONTINUE
STOP
END
我用VF编的程序,运行不错结果,请教是不是我的程序有问题呢? |
|