I am having a problem I define a 8x11 arrays FX(j,nrpm) etc I assign values in a double loop. But when I try to write the same array out to file, slightly further down the code, using another double loop reversing the order, using j and n as the loop variables it complains that they are undefined variables etc?? I am of course now using 11x8 in the reversal.
here is a subset of the code in question its part of a bigger subroutine loop where NRPM is incremented - note I am reversing the order its written out ie I want J tabled with NRPM (N) incremented, then stepping J+1 increment then NRPM incremented again.
DO J=1,8
DO M=2,512
IF(ABS(THETA(2,M)-(RPM*J/120)).LT.0.01)THEN
FX(J,NRPM)=ABS(GENG(31,M))
FY(J,NRPM)=ABS(GENG(32,M))
FZ(J,NRPM)=ABS(GENG(33,M))
MX(J,NRPM)=ABS(GENG(34,M))
MY(J,NRPM)=ABS(GENG(35,M))
MZ(J,NRPM)=ABS(GENG(36,M))
ENDIF
ENDDO
ENDDO
IF(NRPM.EQ.11)THEN
DO J=1,8
DO N=1,NRPM
ESP=RPMIN+(N-1)*RPMI
EO=J*0.5
WRITE(*,*)ESP,EO,ESP*j/120,FX(J,N),FY(J,N),FZ(J,N),MX(J,N),MY(J,N),MZ(J,N)
ENDDO
ENDDO
ENDIF
Basically it does not recognise the FX(J,N) etc variables? error 112 reference to undefined variable etc...