主题:读几个数都搞不定。。。
IMPLICIT NONE
REAL CHALEN,CL,CR,DCRIT,DL,DR,GATE,GRAVIT,TIMOUT,
& TOL,UL,UR
INTEGER MCELLS, NITER
*
COMMON /STATES/ CL, DL, UL, CR, DR, UR
COMMON /ACCELE/ GRAVIT
COMMON /TOLERA/ NITER, TOL
COMMON /DOMAIN/ CHALEN, GATE, MCELLS, TIMOUT
OPEN(1,FILE='1.txt',STATUS='old')
*
READ(1,*)CHALEN ! length of channel
READ(1,*)GATE ! position of gate
READ(1,*)GRAVIT ! acceleration due to gravity
READ(1,*)MCELLS ! number of cells in profile
READ(1,*)TOL ! tolerance for convergence test
READ(1,*)NITER ! iterations in exact solver
READ(1,*)TIMOUT ! output time
READ(1,*)DL ! depth on left reservoir
READ(1,*)UL ! velocity in left reservoir
READ(1,*)DR ! depth in right reservoir
READ(1,*)UR ! velocity in right reservoir
*
CLOSE(1)
======================
1.txt
50
25
9.8
500
1.00E-06
50
2.5
1
-5
1
5
===================
REAL CHALEN,CL,CR,DCRIT,DL,DR,GATE,GRAVIT,TIMOUT,
& TOL,UL,UR
INTEGER MCELLS, NITER
*
COMMON /STATES/ CL, DL, UL, CR, DR, UR
COMMON /ACCELE/ GRAVIT
COMMON /TOLERA/ NITER, TOL
COMMON /DOMAIN/ CHALEN, GATE, MCELLS, TIMOUT
OPEN(1,FILE='1.txt',STATUS='old')
*
READ(1,*)CHALEN ! length of channel
READ(1,*)GATE ! position of gate
READ(1,*)GRAVIT ! acceleration due to gravity
READ(1,*)MCELLS ! number of cells in profile
READ(1,*)TOL ! tolerance for convergence test
READ(1,*)NITER ! iterations in exact solver
READ(1,*)TIMOUT ! output time
READ(1,*)DL ! depth on left reservoir
READ(1,*)UL ! velocity in left reservoir
READ(1,*)DR ! depth in right reservoir
READ(1,*)UR ! velocity in right reservoir
*
CLOSE(1)
======================
1.txt
50
25
9.8
500
1.00E-06
50
2.5
1
-5
1
5
===================