radbelt
radbelt copied to clipboard
SHELLG loop index
In SHELLG
we have a do loop that goes from 3 to 3333:
DO 3 N=3,3333
C*****CORRECTOR (FIELD LINE TRACING)
P(1,N)=P(1,N-1)+STEP12*(5.*P(4,N)+8.*P(4,N-1)-P(4,N-2))
P(2,N)=P(2,N-1)+STEP12*(5.*P(5,N)+8.*P(5,N-1)-P(5,N-2))
...
Note that P(1,N)
, but P is dimensioned as P(8,100)
. So, if N ever gets to be > 100, it will go off the end of this array. Maybe the code logic some prevents this from happening (i.e., it always exits the loop before this happens), but it seems suspicious.