主题:fortran编译中的错误,请求帮助
PROGRAM MT
c implicit none
DIMENSION RH(19),FA(80),WC(80),J1(80,80),JT(80,80)
DIMENSION RC(80),R(80),RA(80),H(19),RL(80)
DIMENSION ZNP(80,80),T(80),ZNH(80,80)
DIMENSION A(80,80),U(80,80),B(80,80),V(80,80),C(80,80),X(80)
DIMENSION S(80),E(80),WORK(80),CC(80,80)
DOUBLE PRECISION A,U,V,B,C,X,S,E,WORK,RH,FA,WC,J1,JT,RC,R,RA,
$ EE,H,ZNP,T,ZNH,CC,RL,PI,D,EP1,UU,UA
INTEGER NN
PARAMETER (PI=3.1415926)
UU=4*PI*0.0000001
C COMMON/V/T(80),RH(19),RO
DATA T/0.1,0.15,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,
$ 1.0,2.0,2.5,3.0,4.0,5.0,6.0,7.0,8.0,9.0,
$ 10,20,30,35,40,50,60,70,80,90,
$ 100,200,300,400,450,500,600,700,800,900,
$ 1000,2000,3000,4000,5000,5500,6000,7000,8000,9000,
$ 10000,20000,30000,40000,50000,60000,65000,70000,80000,90000,
$ 100000,200000,300000,400000,500000,600000,700000,750000,800000,
$ 900000,
$ 1000000,2000000,3000000,4000000,5000000,6000000,7000000,8000000,
$ 8500000,9000000/
PRINT*,'输入实测电阻率数据'
DO I=1,80
READ*,RA(I)
END DO
WRITE(*,*)RA
PRINT*,'输入层数NN'
READ*,NN
C RR=0.0
C DO I=2,F
C80 RR=RR+0.5*ABS(ALOG(RA(I)/RA(I-1)))/(F-1)
C END DO
EP1=0.000001
MM=2*NN-1
D=10
UA=10
PRINT*,'输入各层的电阻率p(n):'
DO J=1,NN
READ*,R(J)
RH(J)=R(J)
END DO
PRINT*,'输入各层厚度h(n):'
DO I=1,NN-1
READ*,H(I)
RH(NN+I)=H(I)
END DO
CALL ZHENYAN(NN,H,T,R,RC)
DO K=1,80
WRITE(*,*),RC(K)
END DO
END
C下面几行开始计算目标函数F(0)
KK=1
FC=0
DO I=1,80
FC=FC+(ALOG(RA(I)/RC(I)))**2
END DO
FA(1)=FC+D*(2*N-1)
DO JJ=2,KK
1 D=D/UA
c 以下计算波阻抗
C 下面一行计算各周期的圆频率
DO K=1,80
WC(K)=2*PI/T(K)
END DO
C DO I=1,N
C DO J=1,N
C END DO
CALL PD(NN,H,T,R,RC,WC,ZNH,ZNP)
DO I=1,80
DO J=1,NN
J1(I,J)=ZNP(I,J)
END DO
END DO
DO I=NN,80
DO J=NN+1,2*NN-1
J1(I,J)=ZNH(I,J-NN)
END DO
END DO
DO I=1,80
DO LL=1,2*NN-1
JT(LL,I)=J1(I,LL)
END DO
END DO
c一下是计算两矩阵相乘的函数
DO I=1,2*NN-1
DO J=1,2*NN-1
CC(I,J)=0.0
DO LL=1,80
CC(I,J)=CC(I,J)+JT(I,LL)*J1(LL,J)
END DO
END DO
END DO
DO I=1,2*NN-1
DO J=1,2*NN-1
A(I,J)=CC(I,J)
END DO
END DO
2 DO I=1,2*NN-1
A(I,I)=A(I,I)+D/RH(I)**2
END DO
DO K=1,80
D(K,1)=ALOG(RA(K)/RC(K))
END DO
DO LL=1,2*NN-1
DO I=1,80
B(LL,1)=B(LL,1)+JT(LL,I)*D(I,1)
END DO
END DO
C一下是解法方程组
M=2*NN-1
N=2*NN-1
KA=2*NN
EPS=0.000001
CALL AGMIV(M,N,A,B,C,X,L,EPS,U,V,KA,S,E,WORK)
IF (L .EQ. 0) THEN
WRITE(*,*)'THE SOLUTION TO THE LEAST SQUARES PROBLEM IS:'
WRITE(*,*) (I,X(I),I=1,N)
C101 FORMAT(1X,'X(',I2,')=',F15.6)
END IF
DO I=2,2*NN-1
RL(I)=RH(I-1)+X(I-1)
END DO
DO I=1,80
LOG=LOG+D(I,1)
END DO
DO J=1,2*NN-1
LAMD=LAMD+X(J)/RL(J)
END DO
FA(JJ)=LOG+LAMD
IF(FA(JJ) .LT. FA(JJ-1)) THEN
IF((FA(JJ-1)-FA(JJ)) .LT. EP1) THEN
WRITE(*,*) (I,RL(I),I=1,N)
WRITE(*,*) FA(JJ)
ELSE GOTO 1
END IF
ELSE D=D*UA
GOTO 2
END IF
END DO
END
Error: This name has not been declared as an array. [FA]
Error: This name has not been declared as an array. [WC]
全是这种错误一共有17 个 不知道怎么解决 我最前面是声明了啊,为什么还说我没有声明呢
c implicit none
DIMENSION RH(19),FA(80),WC(80),J1(80,80),JT(80,80)
DIMENSION RC(80),R(80),RA(80),H(19),RL(80)
DIMENSION ZNP(80,80),T(80),ZNH(80,80)
DIMENSION A(80,80),U(80,80),B(80,80),V(80,80),C(80,80),X(80)
DIMENSION S(80),E(80),WORK(80),CC(80,80)
DOUBLE PRECISION A,U,V,B,C,X,S,E,WORK,RH,FA,WC,J1,JT,RC,R,RA,
$ EE,H,ZNP,T,ZNH,CC,RL,PI,D,EP1,UU,UA
INTEGER NN
PARAMETER (PI=3.1415926)
UU=4*PI*0.0000001
C COMMON/V/T(80),RH(19),RO
DATA T/0.1,0.15,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,
$ 1.0,2.0,2.5,3.0,4.0,5.0,6.0,7.0,8.0,9.0,
$ 10,20,30,35,40,50,60,70,80,90,
$ 100,200,300,400,450,500,600,700,800,900,
$ 1000,2000,3000,4000,5000,5500,6000,7000,8000,9000,
$ 10000,20000,30000,40000,50000,60000,65000,70000,80000,90000,
$ 100000,200000,300000,400000,500000,600000,700000,750000,800000,
$ 900000,
$ 1000000,2000000,3000000,4000000,5000000,6000000,7000000,8000000,
$ 8500000,9000000/
PRINT*,'输入实测电阻率数据'
DO I=1,80
READ*,RA(I)
END DO
WRITE(*,*)RA
PRINT*,'输入层数NN'
READ*,NN
C RR=0.0
C DO I=2,F
C80 RR=RR+0.5*ABS(ALOG(RA(I)/RA(I-1)))/(F-1)
C END DO
EP1=0.000001
MM=2*NN-1
D=10
UA=10
PRINT*,'输入各层的电阻率p(n):'
DO J=1,NN
READ*,R(J)
RH(J)=R(J)
END DO
PRINT*,'输入各层厚度h(n):'
DO I=1,NN-1
READ*,H(I)
RH(NN+I)=H(I)
END DO
CALL ZHENYAN(NN,H,T,R,RC)
DO K=1,80
WRITE(*,*),RC(K)
END DO
END
C下面几行开始计算目标函数F(0)
KK=1
FC=0
DO I=1,80
FC=FC+(ALOG(RA(I)/RC(I)))**2
END DO
FA(1)=FC+D*(2*N-1)
DO JJ=2,KK
1 D=D/UA
c 以下计算波阻抗
C 下面一行计算各周期的圆频率
DO K=1,80
WC(K)=2*PI/T(K)
END DO
C DO I=1,N
C DO J=1,N
C END DO
CALL PD(NN,H,T,R,RC,WC,ZNH,ZNP)
DO I=1,80
DO J=1,NN
J1(I,J)=ZNP(I,J)
END DO
END DO
DO I=NN,80
DO J=NN+1,2*NN-1
J1(I,J)=ZNH(I,J-NN)
END DO
END DO
DO I=1,80
DO LL=1,2*NN-1
JT(LL,I)=J1(I,LL)
END DO
END DO
c一下是计算两矩阵相乘的函数
DO I=1,2*NN-1
DO J=1,2*NN-1
CC(I,J)=0.0
DO LL=1,80
CC(I,J)=CC(I,J)+JT(I,LL)*J1(LL,J)
END DO
END DO
END DO
DO I=1,2*NN-1
DO J=1,2*NN-1
A(I,J)=CC(I,J)
END DO
END DO
2 DO I=1,2*NN-1
A(I,I)=A(I,I)+D/RH(I)**2
END DO
DO K=1,80
D(K,1)=ALOG(RA(K)/RC(K))
END DO
DO LL=1,2*NN-1
DO I=1,80
B(LL,1)=B(LL,1)+JT(LL,I)*D(I,1)
END DO
END DO
C一下是解法方程组
M=2*NN-1
N=2*NN-1
KA=2*NN
EPS=0.000001
CALL AGMIV(M,N,A,B,C,X,L,EPS,U,V,KA,S,E,WORK)
IF (L .EQ. 0) THEN
WRITE(*,*)'THE SOLUTION TO THE LEAST SQUARES PROBLEM IS:'
WRITE(*,*) (I,X(I),I=1,N)
C101 FORMAT(1X,'X(',I2,')=',F15.6)
END IF
DO I=2,2*NN-1
RL(I)=RH(I-1)+X(I-1)
END DO
DO I=1,80
LOG=LOG+D(I,1)
END DO
DO J=1,2*NN-1
LAMD=LAMD+X(J)/RL(J)
END DO
FA(JJ)=LOG+LAMD
IF(FA(JJ) .LT. FA(JJ-1)) THEN
IF((FA(JJ-1)-FA(JJ)) .LT. EP1) THEN
WRITE(*,*) (I,RL(I),I=1,N)
WRITE(*,*) FA(JJ)
ELSE GOTO 1
END IF
ELSE D=D*UA
GOTO 2
END IF
END DO
END
Error: This name has not been declared as an array. [FA]
Error: This name has not been declared as an array. [WC]
全是这种错误一共有17 个 不知道怎么解决 我最前面是声明了啊,为什么还说我没有声明呢