C PROTEL - One minute average sorted by local pitch angle C Input file = 'd08XXXX.min' ; Output file = 'd08XXXX.lis'' C XXXX = CRRES Orbiter Number (0015 - 1067) for this data set C c 05/02/2001: Modified for non-SGI UNIX by John F. Cooper c 09/11/2002: Corrected OPEN statement to RECL=700 (words per record c from RECL=2800 (bytes per record). c PROGRAM READ_MIN REAL*4 EPHEMA(8),EPHEMB(8),FLUX(24,19),ENERGY(24) INTEGER*2 NOBF(24,19) INTEGER*4 IORBIT,IYEAR,IDAY,IBSEC,IESEC,IBR,IER CHARACTER*11 INFILE,OUTFILE DATA inFILE/'d08XXXX.min'/ PRINT*,'ENTER ORBIT NUMBER:' READ(*,*)JORBIT PRINT*,'ENTER CHANNEL NUMBER:(1-24)' READ(*,*)ICH WRITE(INFILE(4:7),'(I4.4)')JORBIT OUTFILE=INFILE(1:8)//'lis' c Input data is SGI UNIX Binary - use following statement to read on c non-SGI UNIX system. Delete CONVERT parameter for SGI UNIX system. OPEN(1,FILE=INFILE,ACCESS='DIRECT',RECL=700, * CONVERT='BIG_ENDIAN',ERR=100,STATUS='OLD') WRITE(6,*) ' OPENED INPUT FILE' OPEN(2,FILE=OUTFILE,STATUS='UNKNOWN') WRITE(6,*) ' OPENED OUTPUT FILE' C READ HEADER FILE READ(1,REC=1)IORBIT,IYEAR,IDAY,IBSEC,IESEC,IBR,IER,ENERGY WRITE(2,21) IYEAR,IDAY,ENERGY(ICH) 21 FORMAT(' YEAR=',I4,' DAY=',I4,' ENERGY=',F5.2,' MEV') WRITE(2,22)IORBIT,IBSEC,IESEC,IER 22 FORMAT(' ORBIT=',I4,' BSEC=',I6,' ESEC=',I6,' NO. RECORDS=', + I4) C READ DATA RECORDS DO 10 NREC=ibr,ier WRITE(2,*) READ(1,REC=NREC,ERR=100)EPHEMB,EPHEMA,FLUX,NOBF WRITE(2,23)EPHEMB 23 FORMAT(' BEG EPHEM. ',4F9.1,4F8.3) write(2,24)EPHEMA 24 FORMAT(' AVE EPHEM. ',4F9.1,4F8.3) WRITE(2,25) 25 FORMAT(/,' Pitch Angle Flux Obs') DO 20 IPA=1,19 WRITE(2,26)IPA*5-5,FLUX(ICH,IPA),NOBF(ICH,IPA) 20 CONTINUE 26 FORMAT(I8,4X,E10.4,i8) 10 CONTINUE 100 CONTINUE STOP END