scdt 发表于 2007-5-29 10:30:01

各位好心人,帮忙看看是哪个地方出错了,怎么改正。

DIMENSION T(0:6),X(0:6),EQK(0:5),rc(0:5),F(0:5),G(0:5), &   
          C1(5),C2(5),XBAR(50),XX(0:5,50)
      DATA XAC/1E-4/,TAC/0.1/,DELZ/0.0585/,DELR/0.01/
      OPEN(1,FILE='CRANK.OUT',STATUS='NEW')
      VM=0.174
      VMP=0.25
      DI=2.*VM/(1.+2.*VM)
      D2=(1.-2*VM)/(1.+2*VM)
      D3=-18500.*DELZ/(1.+2.*VM)
      E1=2.*VMP/(1.+2*VMP)
      E2=(1.-2*VMP)/(1.+2*VMP)
      E3=82.*DELZ/(1.+2*VMP)
      F1=VM/2./(1.+VM)
      F2=(1.-VM)/(1.+VM)
      F3=-18500.*DELZ/(1.+VM)
      G1=VMP/2./(1.+VMP)
      G2=(1.-VMP)/(1.+VMP)
      G3=82.*DELZ/(1.+VMP)
      H1=4.*DELR/DELZ/0.0039*.5*1.1-1
      H2=H1+2.
      O1=(H2*VM-1.)/(H1*VM-1.)
      O2=-VM/(H1*VM-1.)
      O3=18500.*DELZ/(H1*VM-1.)
      WRITE(*,*)D1,D2,D3,E1,E2,E3,F1,F2,F3,G1,G2,G3,O1,O2,O3
      Z=0
      n=0
      DO 10 m=1,5
      C1(m)=1.+.5/m
      C2(m)=1.-.5/m
10T(m)=873.
      T(5)=893.
      T(0)=873.
      DO 20 m=0,6,1
20X(m)=0.0
      WRITE(1,198)
21Z=Z+DELZ
      n=n+1
      DO 30 M=0,5,1
      EQK(m)=0.027*EXP(0.021*(T(m)-773.))
30rc(m)=15120.*EXP(-11000./T(m))*((1.-X(m))/(11.+X(m))-(1.2*X(m)*X(m))&   
      /(EQK(m)*(11.+X(m))*(11.+X(m))))
      F(0)=D1*T(1)+D2*T(0)+D3*rc(0)
      G(0)=E1*X(1)+E2*X(0)+E3*rc(0)
      DO 40 m=1,4
40F(m)=F1*(C1(m)*T(m+1)+C2(m)*T(m-1))+F2*T(m)+F3*rc(m)
      F(5)=O1*T(5)+O2*T(4)+O3*rc(5)
      DO 50 m=1,5
50G(m)=G1*(C1(m)*X(m+1)+C2(m)*X(m-1))+G2*X(m)+G3*rc(m)
      GOTO 52
51DO 31 m=0,5,1
      EQK(m)=0.027*EXP(0.021*(T(m)-773.))
31rc(m)=15120.*EXP(-11000./T(m))*((1.-X(m))/(11.+X(m))-(1.2*X(m)*X(m))&
      /(EQK(m)*(11.+X(m))*(11.+X(m)))
52TNEW=F(0)+D1*T(1)+D3*rc(0)
      XNEW=G(0)+E1*X(1)+E3*rc*(0)
      TER=ABS(TNEW-T(0))
      XER=ABS(XNEW-X(0))
      T(0)=TNEW
      X(0)=XNEW
      m=1
75TNEW=F(m)+F1*(C1(M)*T(m+1)+C2(m)*T(m-1))+F3*rc(m)
      XNEW=G(m)+G1*(C1(m)*X(m+1)+C2(m)*X(m-1))+G3*rc(m)
      TERR=ABS(TNEW-T(m))
      IF(TERR.GT.TER)TER=TERR
      XERR=ABS(XNEW-X(m))
      IF(XERR.GT.XER)TER=XERR
      T(m)=TNEW
      X(m)=XNEW
      m=m+1
      IF(m.LE.4)GOTO 75
      X(6)=X(4)
      TNEW=F(5)+O2*T(4)+O3*rc(5)
      XNEE=G(5)+G1*(C1(5)*X(6)+C2(5)*X(4))+G3*rc(5)
      TERR=ABS(TNEW-T(5))
      XERR=ABS(XNEW-X(5))
      IF(TERR.GT.TER)TER=TERR
      IF(XERR.GT.XER)XER=XERR
      T(5)=TNEW
      X(5)=XNEW
      WRITE(*,*)'ITERATION PROCESS n=',n
      WRITE(*,*)'T(m)=',(T(m),m=0,5),'TER=',TER
      WRITE(*,*)'X(m)=',(X(m),m=0,5),'XER=',XER
      IF((XER.LE.XAC).AND.(TER.LE.TAC))GOTO 100
      GOTO 51
100 XBAR(n)=0.04*(2.*X(1)+4.*X(2)+6.*X(3)+8.*X(4)+5.*X(5))
      DO 105 m=0,5
105 XX(m,n)=X(m)
      WRITE(1,199)n,Z,(T(m),m=0,5)
198 FORMAT(3X,'n',6X,'Z',8X,'0',8X,'1',8X,'2',8X,'3',8X,'4',8X,'5')
199 FORMAT(2X,I2,F8.4,6F9.1)
      IF(XBAR(n).LT.0.45)GOTO 21
      WRITE(1,298)
      DO 200 J=1,n
200 WRITE(1,299)J,XBAR(J),(XX(I,J),I=0,5)
298 FORMAT(3X,'n',6X,'XBAR',6X,'0',8X,'1',8X,'2',8X,'3',8X,'4',8X,'5')
299 FORMAT(2X,I2,7F9.4)
      STOP
      END

出错信息:

--------------------Configuration: LITI - Win32 Debug--------------------
Begining build with project "D:\FORTRAN 5.0\MyProjects\LITI\LITI.DSP", at root.
Active configuration is Win32 (x86) Console Application (based on Win32 (x86) Console Application)

Project's tools are:
                        "Fortran 90 Compiler for 80x86" with flags "/include:"Debug/" /compile_only /nologo /debug:full /optimize:0 /warn:nofileopt /module:"Debug/" /object:"Debug/" /pdbfile:"Debug/DF50.PDB" "
                        "Win32 Resource Compiler" with flags "/l 0x804 /d "_DEBUG" "
                        "Browser Database Maker" with flags "/nologo /o"Debug/LITI.bsc" "
                        "COFF Linker for 80x86" with flags "kernel32.lib /nologo /subsystem:console /incremental:yes /pdb:"Debug/LITI.pdb" /debug /machine:I386 /out:"Debug/LITI.exe" /pdbtype:sept "
                        "Custom Build" with flags ""
                        "<Component 0xa>" with flags ""

Creating temp file "C:\DOCUME~1\SCdT\LOCALS~1\Temp\RSP31.tmp" with contents </include:"Debug/" /compile_only /nologo /debug:full /optimize:0 /warn:nofileopt /module:"Debug/" /object:"Debug/" /pdbfile:"Debug/DF50.PDB"
"D:\FORTRAN 5.0\MyProjects\LITI\LITI.F90"
>
Creating command line "link.exe kernel32.lib /nologo /subsystem:console /incremental:yes /pdb:"Debug/LITI.pdb" /debug /machine:I386 /out:"Debug/LITI.exe" /pdbtype:sept".\Debug\LITI.OBJ""
Compiling Fortran...
D:\FORTRAN 5.0\MyProjects\LITI\LITI.F90
D:\FORTRAN 5.0\MyProjects\LITI\LITI.F90(53) : Error: Syntax error, found END-OF-STATEMENT when expecting one of: , )
      /(EQK(m)*(11.+X(m))*(11.+X(m)))
-------------------------------------^
D:\FORTRAN 5.0\MyProjects\LITI\LITI.F90(55) : Error: The shapes of the array expressions do not conform.   
      XNEW=G(0)+E1*X(1)+E3*rc*(0)
------^
Error executing df.exe.



LITI.exe - 2 error(s), 0 warning(s)

scdt 发表于 2007-5-29 14:03:05

已经解决!

谢谢各位的浏览。
页: [1]
查看完整版本: 各位好心人,帮忙看看是哪个地方出错了,怎么改正。