|
最近看一篇文献,里面有很老的一个程序,想着实现一下,但有个地方卡住了,想请教大佬,是他写错了,还是我没看懂
subroutine SCATTER(RESPONSE,DIAMETER,STEPNUM)
PARAMETER ( ndim = 15 )
PARAMETER ( MSTEP = 200 )
INTEGER STEPNUM
DOUBLE PRECISION AUX(ndim),THETALO, THETAHI, REFMED
DOUBLE PRECISION REFREAL, REFIMAG
DOUBLE PRECISION PI,WAVELEN,DIALOW,DIASTEP,TOL,X
DOUBLE PRECISION RADIUS,R,ETA,BETA,CHI,SUM
DOUBLE PRECISION F,DIAMETER(MSTEP),FACT
DOUBLE PRECISION BETADEG, RESPONSE(MSTEP),RES(2,MSTEP)
INTEGER OPTION
COMPLEX REFREL
CHARACTER *80 FILENAME
LOGICAL THERE
COMMON /SCATPI/ PI
COMMON/MIE/X,REFREL,BETA,ETA,CHI,OPTION
DOUBLE PRECISION MIEFUN
EXTERNAL MIEFUN
PI=ACOS(-1.0)
C Inputs
REFMED=1.00028
WAVELEN=0.633
TOL=1E-4
WRITE (6,*) 'Refractive index of the particle, real part? '
READ (5,*) REFREAL
WRITE (6,*) 'Imaginary part? '
READ (5,*) REFIMAG
REFIMAG=0
OPTION=1
ETADEG=90
CHIDEG=90
ETA=ETADEG*PI/180.
CHI=CHIDEG*PI/180.
BETADEG=53.0
I=1
3333 BETA=BETADEG*PI/180.0
THETALO=ETA-BETA
THETAHI=ETA+BETA
REFREL=CMPLX(REFREAL,REFIMAG)/REFMED
F=(DIAHIGH-DIALOW)/(STEPNUM-1.D0)
FACT = WAVELEN * WAVELEN * 1.E-8 / ( 2. * PI * PI )
DO 6000 J=1,STEPNUM
c DIAMETER(J)=DIALOW+(J-1)*F
X=PI*DIAMETER(J)*REFMED/WAVELEN
这个子程序还没完,但我到这里就觉得不对了,这个STEPNUM完全没有给出任何值啊,如果是默认值0的话,怎么可以带入循环呢
|
|