C Input file = 'd08XXXX.pad' ; Output file = 'd08XXXX.lis' c XXXX = CRRES Orbit Number (0015 - 1067) for this data set C PROTEL - One minute average sorted by pitch angle dependent L C (derived from *.min files) C C 05/02/2001: Modified for non-SGI UNIX by John F. Cooper c 09/11/2002: OPEN statement corrected to RECL=686 (4-byte words per c record) from RECL=2744 (bytes per record. Microsoft c Fortran uses the latter, but non-SGI UNIX uses former. c PROGRAM READ_PAD INTEGER*2 NOBF(24,19),KLEG,KSH INTEGER*4 IORBIT,ICH,JORBIT,IYEAR,IDAY,NREC,MAXBIN,KSEC REAL*4 ENERGY(24),FLUX(24,19) CHARACTER*11 INFILE,OUTFILE DATA INFILE/'d08XXXX.pad'/ PRINT*,' ENTER ORBIT NUMBER:' READ(*,*) IORBIT PRINT*,' ENTER CHANNEL NUMBER:(1-24)' READ(*,*) ICH WRITE(INFILE(4:7),'(I4.4)') IORBIT WRITE(6,*) INFILE OUTFILE = INFILE(1:8)//'lis' WRITE(6,*) OUTFILE C c Input data is SGI UNIX Binary - use following statement to read on c non-SGI UNIX system. OPEN(1,FILE=INFILE,ACCESS='DIRECT',RECL=686, * CONVERT='BIG_ENDIAN',ERR=100,STATUS='OLD') WRITE(6,*) ' OPENED INPUT FILE' OPEN(2,FILE=OUTFILE,STATUS='UNKNOWN') WRITE(6,*) ' OPENED OUTPUT FILE' C HEADER READ(1,REC=1,err=100)JORBIT,iyear,iday,nrec,maxbin,ENERGY WRITE(2,22)JORBIT,IYEAR,IDAY,ENERGY(ICH) 22 FORMAT(/,' ORBIT=',I4,' YEAR=',I2,' DAY=',I3,' MeV=',F6.2) DO 10 iREC=2,nrec+1 READ(1,REC=iREC,ERR=100)kleg,ksh,ksec,FLUX,NOBF SH=KSH*.05+.95 WRITE(2,23)KLEG,SH,KSEC 23 FORMAT(/,' LEG=',I2,' L-SHELL=',F5.2,' UT=',I7,/) WRITE(2,24) 24 FORMAT(' PITCH ANGLE FLUX OBS') DO 20 IPA=1,19 WRITE(2,25)IPA*5-5,FLUX(ICH,IPA),NOBF(ICH,IPA) 25 FORMAT(I8,E13.4,I6) 20 CONTINUE 10 CONTINUE 100 CONTINUE STOP END