c###outall.for
      SUBROUTINE OUTALL(IF)
C--------------------------------
C
C     THIS ROUTINE OUTPUTS ALL MODES TABLES
C
      COMMON / ALPHA / IMON(12), ITRAN(2), IRCVR(2), LBMAP(2), MODE(13),
     A MODER(13), ITLAT, ITLONG, IRLAT, IRLONG, IRLATU, IRLONGU, NYEAR
      CHARACTER IMON*3, NYEAR*5, ITRAN*10, IRCVR*10, LBMAP*10, ITLAT*1,
     A ITLONG*1, IRLAT*1, IRLONG*1, IRLATU*1, IRLONGU*1, MODE*2, MODER*2
      COMMON / FILES / LUI, LUO, LU2, LU5, LU6, LU15, LU16, LU20, LU25,
     A LU26, LU35
      COMMON/ANOIS/ATNU,ATNY,CC,TM,RCNSE,DU,DL,SIGM,SYGU,SYGL,KJ,JK
      COMMON /DON /ALATD, AMIN, AMIND, BTR, BTRD, DLONG, DMP, ERTR, GCD,
     1 GCDKM, PMP, PWR, TLAT, TLATD, TLONG, TLONGD, RSN, SIGTR, RLAT,
     2 RLATD,RLONG,RLONGD,BRTD,FLUX,ULAT,ULATD,ULONG,ULONGD,SSN,D90R,
     3 D50R,D10R,D90S,D50S,D10S
      COMMON/FRQ/FREA(13),FREL(29),FREQ,JMODE,ITXRCP(2)
      COMMON / ION / IHRE, IHRO, IHRS, LUFP, METHOD, NOISE, NPSL
      COMMON / OUTLAB / LABEL(11), LAYTYP(5), IEAST, INORTH, ISOUTH,
     A IWEST, LABLI, LABLJ, LABLK
      CHARACTER IEAST*1, ISOUTH*1, INORTH*1, IWEST*1, LABEL*5, LAYTYP*2,
     A LABLI*5, LABLJ*5, LABLK*5
      COMMON / OUTPRT / LINBOT(26), LINBD(14), LINTOP(15), LINTP(14),
     A GRPTYP, JOUT, LINBYP, LINES, LINMAX, LINTYP, LPAGES, NLINE
      COMMON / SON / ANGLE(13), ANGLER(13), CPROB(13), DBLOS(13),
     A DBLOSL(13), DBLOSU(13), DBU(13), DELAY(13), DBW(13), NHP(13),
     B XNYNOIS(13), PROBMP(13), RELIAB(13), SNDB(13), SNPR(13),
     C SNRLW(13), SNRUP(13), SPROB(13), VHIGH(13), RNEFF(13),MDL(13)
       CHARACTER MDL*1
      COMMON / TIME / IT, GMT, UTIME(24), GMTR, XLMT(24), ITIM, JTX
      COMMON / TON / ADJ, ADS, GNOS, GOT, REL, SL,
     2 SLS, SPR, SU, SUS, XNOISE, ZNOISE, NF
      COMMON / allMODE /ABPS(20),CREL(20),FLDST(20),HN(20),HP(20),
     1PROB(20),RELY(20),RGAIN(20),SIGPOW(20),SN(20),
     2SPRO(20),TGAIN(20),TIMED(20),TLOSS(20),B(20),FSLOS(20),
     3grlos(20),adv(20),obf(20),
     CNMODE(20),TLLOW(20),TLHGH(20),EFF(20),NREL,NMMOD
      COMMON/SIGD/DSL,ASM,DSU,AGLAT,DSLF,ASMF,DSUF,ACAV,FEAV,AFE,BFE,HNU
     A,HTLOSS,XNUZ,XVE
      CHARACTER NNAME(22)*10, ITEMP(20)*2
      CHARACTER f505*18,f512*34,f513*28
      DATA NNAME/' TIME DEL.', ' ANGLE    ', ' ABSORB   ',
     A ' FS. LOSS ', ' T. GAIN  ', ' ES OBSCUR', ' ADD. LOSS',
     B ' GROUND L.', ' TRAN.LOSS', ' FIELD ST.', ' SIG. POW.',
     C ' SNR      ', ' MODE PROB', ' R. PWRG  ', ' RELIABIL ',
     D ' SERV PROB', ' ANT. EFF ', ' VIR. HITE', ' R. GAIN  ',
     E ' 252-FLDST', ' SIG LOW  ', ' SIG  UP  '/
      DATA NADD/30/
      data f505,f512,f513/'(   x,9h Most REL)','(12x,  (3x,f4.0,a2,1x),4
     +x,f4.0,a2)','(1x,a10,  (1x,f9.2),2x,f9.2)'/
      IF(METHOD.ne.25) return
      JOUT = LUO
      IF(IF.eq.1) then
         LINES = LINMAX
         CALL OUTPAR
      end if
      LINES = LINES + NADD
      IF(LINES.gt.LINMAX) then
         CALL OUTTOP                !  output header lines
         LINES = LINTOP(10) + NADD
      end if
      WRITE(JOUT,505)
      WRITE(JOUT,505)
      XNHP = NHP(IF)
      SIGPW = DBW(IF)
      WRITE(JOUT,501) NMMOD,FREQ, GMT
      IST=NMMOD
      DO 250 IM = 1,IST
      IS = NMODE(IM)
      ITEMP(IM) = LAYTYP(IS)
  250 CONTINUE
ccc      if(NMMOD.lt.12)then
      if(NMMOD.lt.20)then       !  change 12/27/2008 to put output on 1 page
        IST1=10*IST+13
        WRITE(f505(2:4),'(i3)')IST1
        WRITE(f512(6:7),'(i2)')IST
        WRITE(f513(9:10),'(i2)')IST
        WRITE(JOUT,f505)
        WRITE(JOUT,f512) (HN(IM),ITEMP(IM),IM=1,IST), XNHP, MODE(IF)
        WRITE(JOUT,f513) NNAME(1), (timed(IM),IM=1,ist), DELAY(IF)
        WRITE(JOUT,f513) NNAME(2), (B(IM),IM=1,IST), ANGLE(IF)
        WRITE(JOUT,f513) NNAME(18), (hp(IM),IM=1,ist), VHIGH(IF)
        WRITE(JOUT,f513) NNAME(9), (TLOSS(IM),IM=1,IST), DBLOS(IF)
        WRITE(JOUT,f513) NNAME(5),(TGAIN(IM),IM=1,IST),TGAIN(NREL)
        WRITE(JOUT,f513) NNAME(19), (RGAIN(IM),IM=1,IST), RGAIN(NREL)
        WRITE(JOUT,f513) NNAME(3),(abps(IM),IM=1,ist)
        WRITE(JOUT,f513) NNAME(4),(fslos(IM),IM=1,ist)
        WRITE(JOUT,f513) NNAME(10), (FLDST(IM),IM=1,IST), DBU(IF)
        WRITE(JOUT,f513) NNAME(11), (SIGPOW(IM),IM=1,IST), SIGPW
        WRITE(JOUT,f513) NNAME(12), (SN(IM),IM=1,IST), SNDB(IF)
        WRITE(JOUT,f513) NNAME(13), (prob(IM),IM=1,ist), CPROB(IF)
        WRITE(jout,f513) NNAME(14), (crel(IM),IM=1,ist), SNPR(IF)
        WRITE(JOUT,f513) NNAME(15), (RELY(IM),IM=1,IST), RELIAB(IF)
        WRITE(JOUT,f513) NNAME(16), (spro(IM),IM=1,ist), SPROB(IF)
        WRITE(JOUT,f513) NNAME(21), (TLLOW(IM),IM =1,IST),DBLOSL(IF)
        WRITE(JOUT,f513) NNAME(22), (TLHGH(IM),IM=1,IST) ,DBLOSU(IF)
      else
        WRITE(f512(6:7),'(2h10)')
        WRITE(f513(9:10),'(2h10)')
        WRITE(JOUT,f512) (HN(IM),ITEMP(IM),IM=1,10)
        WRITE(JOUT,f513) NNAME(1), (timed(IM),IM=1,10)
        WRITE(JOUT,f513) NNAME(2), (B(IM),IM=1,10)
        WRITE(JOUT,f513) NNAME(18), (hp(IM),IM=1,10)
        WRITE(JOUT,f513) NNAME(9), (TLOSS(IM),IM=1,10)
        WRITE(JOUT,f513) NNAME(5),(TGAIN(IM),IM=1,10)
        WRITE(JOUT,f513) NNAME(19), (RGAIN(IM),IM=1,10)
        WRITE(JOUT,f513) NNAME(3),(abps(IM),IM=1,10)
        WRITE(JOUT,f513) NNAME(4),(fslos(IM),IM=1,10)
        WRITE(JOUT,f513) NNAME(10), (FLDST(IM),IM=1,10)
        WRITE(JOUT,f513) NNAME(11), (SIGPOW(IM),IM=1,10)
        WRITE(JOUT,f513) NNAME(12), (SN(IM),IM=1,10)
        WRITE(JOUT,f513) NNAME(13), (prob(IM),IM=1,10)
        WRITE(jout,f513) NNAME(14), (crel(IM),IM=1,10)
        WRITE(JOUT,f513) NNAME(15), (RELY(IM),IM=1,10)
        WRITE(JOUT,f513) NNAME(16), (spro(IM),IM=1,10)
        WRITE(JOUT,f513) NNAME(21), (TLLOW(IM),IM =1,10)
        WRITE(JOUT,f513) NNAME(22), (TLHGH(IM),IM=1,10)
        LINES = LINES + NADD
        IF(LINES.gt.LINMAX) then
           CALL OUTTOP
           LINES = LINTOP(10) + NADD
        end if
        WRITE(JOUT,505)
        WRITE(JOUT,505)
        irem=ist-10
        IST1=10*irem+13
        WRITE(f505(2:4),'(i3)')IST1
        WRITE(f512(6:7),'(i2)')irem
        WRITE(f513(9:10),'(i2)')irem
        WRITE(JOUT,f505)
        WRITE(JOUT,f512) (HN(IM),ITEMP(IM),IM=11,IST), XNHP, MODE(IF)
        WRITE(JOUT,f513) NNAME(1), (timed(IM),IM=11,ist), DELAY(IF)
        WRITE(JOUT,f513) NNAME(2), (B(IM),IM=11,IST), ANGLE(IF)
        WRITE(JOUT,f513) NNAME(18), (hp(IM),IM=11,ist), VHIGH(IF)
        WRITE(JOUT,f513) NNAME(9), (TLOSS(IM),IM=11,IST), DBLOS(IF)
        WRITE(JOUT,f513) NNAME(5),(TGAIN(IM),IM=11,IST),TGAIN(NREL)
        WRITE(JOUT,f513) NNAME(19), (RGAIN(IM),IM=11,IST), RGAIN(NREL)
        WRITE(JOUT,f513) NNAME(3),(abps(IM),IM=11,ist)
        WRITE(JOUT,f513) NNAME(4),(fslos(IM),IM=11,ist)
        WRITE(JOUT,f513) NNAME(10), (FLDST(IM),IM=11,IST), DBU(IF)
        WRITE(JOUT,f513) NNAME(11), (SIGPOW(IM),IM=11,IST), SIGPW
        WRITE(JOUT,f513) NNAME(12), (SN(IM),IM=11,IST), SNDB(IF)
        WRITE(JOUT,f513) NNAME(13), (prob(IM),IM=11,ist), CPROB(IF)
        WRITE(jout,f513) NNAME(14), (crel(IM),IM=11,ist), SNPR(IF)
        WRITE(JOUT,f513) NNAME(15), (RELY(IM),IM=11,IST), RELIAB(IF)
        WRITE(JOUT,f513) NNAME(16), (spro(IM),IM=11,ist), SPROB(IF)
        WRITE(JOUT,f513) NNAME(21), (TLLOW(IM),IM =11,IST),DBLOSL(IF)
        WRITE(JOUT,f513) NNAME(22), (TLHGH(IM),IM=11,IST) ,DBLOSU(IF)
      ENDIF
      NRCNSE=anint(XNYNOIS(IF)+RNEFF(IF))
      WRITE(JOUT,511) NRCNSE, DBW(IF)
      WRITE(JOUT,502) DSL,ASM,DSU,SLS,ADS,SUS
      XRCNSE=RCNSE+RNEFF(IF)
      WRITE(JOUT,503) DU, XRCNSE, DL, SYGU, SIGM, SYGL
      WRITE(JOUT,506) D90R, D50R, D10R
      WRITE(JOUT,507) D90S, D50S, D10S
  625 RETURN
  501 FORMAT(' SUMMARY  ',I3,' MODES   FREQ = ',F5.1,' MHZ  UT = ',F5.1)
  502 FORMAT(' ',' SIGNAL =',3F7.1,'  /',3F8.1)
  503 FORMAT(' ',' NOISE = ',3F7.1,'  /',3F8.1)
  505 FORMAT(' ')
  506 FORMAT(' ',' RELIAB =',3F7.1)
  507 FORMAT(' ',' SPROB = ',3F7.1)
  511 FORMAT(' ',' NOISE = ',I6,5X,' S. POWER = ',F6.1)
      END
C--------------------------------
