主题:一小段FORTRAN 程序的问题
SUBROUTINE WAVE1(NAME,NIN,NOU,AT,TIM)
C EARTHQUAKE GROUND MOTION
C ACCELERATION UNIT:M/S*S
CHARACTER*12 NAME
DIMENSION XG(0:600),AT(NOU),TIM(NOU)
OPEN(1,FILE=NAME, STATUS='OLD')
READ(1,*)(XG(I),I=1,NIN)
CLOSE(1)
XG(0)=0
IF(NOU.EQ.NIN) THEN
DO 20 I=1,NIN
AT(I)=XG(I)/100
TIM(I)=0.02*I
20 CONTINUE
ELSE
LN=NINT(NOU/NIN)
DO 30 I=1,NIN
AT(4*I)=XG(I)/100
30 CONTINUE
DO 45 I=1,NIN
DO 40 J=1,LN-1
AT(4*I-LN+J)=0.25*J/LN*(XG(I)-XG(I-1))/100
40 CONTINUE
45 CONTINUE
DO 50 I=1,NOU
TIM(I)=0.02/FLOAT(LN)*I
50 CONTINUE
END IF
RETURN
END
其中的NIN和NOU都是integer,应该怎么定义呢,定义在那呢(其他的还用变吗)?求指导
C EARTHQUAKE GROUND MOTION
C ACCELERATION UNIT:M/S*S
CHARACTER*12 NAME
DIMENSION XG(0:600),AT(NOU),TIM(NOU)
OPEN(1,FILE=NAME, STATUS='OLD')
READ(1,*)(XG(I),I=1,NIN)
CLOSE(1)
XG(0)=0
IF(NOU.EQ.NIN) THEN
DO 20 I=1,NIN
AT(I)=XG(I)/100
TIM(I)=0.02*I
20 CONTINUE
ELSE
LN=NINT(NOU/NIN)
DO 30 I=1,NIN
AT(4*I)=XG(I)/100
30 CONTINUE
DO 45 I=1,NIN
DO 40 J=1,LN-1
AT(4*I-LN+J)=0.25*J/LN*(XG(I)-XG(I-1))/100
40 CONTINUE
45 CONTINUE
DO 50 I=1,NOU
TIM(I)=0.02/FLOAT(LN)*I
50 CONTINUE
END IF
RETURN
END
其中的NIN和NOU都是integer,应该怎么定义呢,定义在那呢(其他的还用变吗)?求指导