1HDR   CRBE82/M9SMS(SUMMARY)  CRBE.LIB.M9SMS                               82168
      SUBROUTINE SUMRY(LONG,LAT,OUT,PER)                                00000100
      COMMON/INFO/ANS(500,8),SPECT(500,4,10),NFLAG(500),NC(500),NSPEC   00000200
      COMMON/RATIO/I,RAT(500,3),ERR(500,3),HR(3,500)                    00000300
      COMMON/INPDAT/NFC,NCH,ACCTIM,IO                                   00000400
      REAL LONG(2),LAT(2),OUT(500)                                      00000500
      INTEGER HR,SPECT                                                  00000600
      IF(IO.LT.9) GO TO 10                                              00000800
      WRITE(IO,2001) LONG(1),LONG(2),LAT(1),LAT(2)                      00000900
 2001 FORMAT(' RATIOS OF AL/SI, LONG.  ',2F7.1,' LAT. ',2F7.1)          00001000
   10 LINE=0                                                            00001100
      WRITE(6,2002)                                                     00001200
 2002 FORMAT(1H1///40X,'SUMMARY SHEET')                                 00001300
      WRITE(6,2003)                                                     00001400
 2003 FORMAT('0 HR MIN SEC',4X,'AL/SI',5X,'ERROR',5X,'MG/SI',5X,'ERROR',00001500
     15X,'MG/AL',5X,'ERROR',5X,'LAT.',6X,'LONG.',3X,'NO.')              00001600
      DO 20 I=1,NSPEC                                                   00001700
      IF(RAT(I,1).LE.0.0) GO TO 20                                      00001800
      NQUAL=0                                                           00001900
      PCEN1=ERR(I,1)/RAT(I,1)                                           00002000
      PCEN2=ERR(I,2)/RAT(I,2)                                           00002100
      PCEN3=ERR(I,3)/RAT(I,3)                                           00002200
      IF(PCEN1.LT.0.0.OR.PCEN1.GT.PER) NQUAL=NQUAL+1                    00002300
      IF(PCEN2.LT.0.0.OR.PCEN2.GT.PER) NQUAL=NQUAL+2                    00002400
      IF(PCEN3.LT.0.0.OR.PCEN3.GT.PER) NQUAL=NQUAL+10                   00002500
      LINE=LINE+1                                                       00002600
      WRITE(6,2004)(HR(JJ,I),JJ=1,3),(RAT(I,J),ERR(I,J),J=1,3),         00002700
     1ANS(I,3),ANS(I,4),OUT(I),NQUAL,NC(I)                              00002800
 2004 FORMAT(1H ,I4,2I3,8F10.3,A1,I2,I3)                                00002900
      IF(LINE.EQ.50) LINE=0                                             00003000
      IF(LINE.EQ.0) WRITE(6,2005)                                       00003100
 2005 FORMAT(1H1//)                                                     00003200
      IF(IO.LT.9) GO TO 20                                              00003300
      WRITE(IO,2006)(HR(JJ,I),JJ=1,3),(RAT(I,J),ERR(I,J),J=1,3),        00003400
     1ANS(I,3),ANS(I,4),OUT(I),NQUAL,NC(I)                              00003500
 2006 FORMAT(I3,2I2,3X,8F10.3,A1,I2,I3)                                 00003600
   20 CONTINUE                                                          00003700
      RETURN                                                            00003800
      END                                                               00003900
