      subroutine SHOW(IT,IS)
      include 'SIZE.INC'
      include 'GLOBAL.INC'
      include 'LOCAL.INC'
      include 'MODNAM.INC'
      include 'TRANS.INC'
      include 'UNITS.INC'
      include 'INPAR.INC'
      integer HOW,NOSHOW,SHOLEN(14),MINSHO(14),EOF,LENS2(2),MINS2(2)
      integer IT,IS,INUNIT,IFIND,I,ITEMP,I1,I3,J,LRAIL,IPASS,IP1,
     &          IMBED,NAMLEN,NAMLN2,TWO
      character*1 SHONAM(94), NAME2(9)
      character TUNIT(4)*7, MONAM(13)*9, NAMECO*50, NAMEEC*50
      character REQFMT(3)*34
      data NAMLEN,NAMLN2,TWO/94,9,2/
      data REQFMT(1)/'(//'' Option-> ''                  )'/
      data REQFMT(2)/'('' Help, or    QUIt-> ''          )'/
      data REQFMT(3)/'('' (Enter Yes, No, or Quit)-> ''  )'/
      data TUNIT/' Hours ',' Days  ',' Months',' Years '/
      data MONAM/'January  ','February ','March    ','April    ',
     & 'May      ','June     ','July     ','August   ','September',
     & 'October  ','November ','December ','Average  '/
      data NOSHOW,SHOLEN/14,9,8,9,10,7,7,5,4,4,4,5,8,5,9/
      data SHONAM/
     &'C','H','E','M','I','S','T','R','Y',
     &'G','E','O','M','E','T','R','Y',
     &'A','D','V','E','C','T','I','O','N',
     &'D','I','S','P','E','R','S','I','O','N',
     &'Q','U','A','L','I','T','Y',
     &'G','L','O','B','A','L','S',
     &'L','O','A','D','S',
     &'T','I','M','E',
     &'H','E','L','P',
     &'Q','U','I','T',
     &'P','U','L','S','E',
     &'P','R','O','D','U','C','T','S',
     &'P','L','O','T','S',
     &'V','A','R','I','A','B','L','E','S'/
      data MINSHO/1,2,1,1,3,2,1,1,1,3,2,2,2,1/
      data LENS2,MINS2/5,4,1,1/
      data NAME2/'F','R','A','M','E', 'Q','U','I','T'/
      REQFMT(1)(16:17) = CRSTOP(MACHNO)
      REQFMT(2)(24:25) = CRSTOP(MACHNO)
      REQFMT(3)(32:33) = CRSTOP(MACHNO)
      INUNIT = TTYIN(MACHNO)
      call READSP
      IT = 0
      IS = 0
100   continue
      HOW = IFIND(NOSHOW,NAMLEN,SHOLEN,SHONAM,MINSHO)
      HOW = HOW+3
      go to (230,410,430,240,250,300,310,320,370,380,110,230,400,150,160
     &   ,170,390), HOW
110   continue
      I = IFIND(TWO,NAMLN2,LENS2,NAME2,MINS2)
      I = I+3
      go to (140,410,420,120,400), I
120   continue
      if (MODEG.eq.1) then
         write (TTYOUT(MACHNO),5000)
5000  format (/' Currently in steady-state mode;'/' time parameters not 
     &defined.'/)
         go to 400
      endif
      if (MODEG.eq.2) then
         write (TTYOUT(MACHNO),5010) TINITL,TENDG,TUNIT(TCODEG),CINTG,
     &      TUNIT(TCODEG)
5010     format (//1X,'A RUN will integrate from ',F7.0,' to ',F7.0,A7,/
     &      1X,'with output at intervals of ',F8.2,A7/)
         if (IFLAG.eq.2) write (TTYOUT(MACHNO),5020) TENDG,TUNIT(TCODEG)
5020     format (' A CONTINUE will commence at ',F8.0,A7/)
         write (TTYOUT(MACHNO),5030) CINTG,TINITL,TENDG,TCODEG
5030  format (' (CINT = ',F8.2,' TINIT = ',F7.0/'  TEND = ',F7.0,'  TCOD
     &E = ',I1,')')
         go to 400
      endif
      if (MODEG.ne.3) go to 130
      if (NYEARG.lt.1) NYEARG = 1
      ITEMP = YEAR1G+NYEARG-1
      write (TTYOUT(MACHNO),5040) YEAR1G,ITEMP,TUNIT(TCODEG),YEAR1G,
     &   NYEARG,TCODEG
5040  format (' A RUN will integrate from 1 January ',I4,/'             
     &    through 31 December ',I4,/' with daily output encoded in',A7,/
     &' (YEAR1 = ',I4,', NYEAR =',I4,', and TCODE =',I2,').')
      if (IFLAG.eq.2) then
         ITEMP = LASTYR+NYEARG
         write (TTYOUT(MACHNO),5050) ITEMP,NYEARG
5050     format (/' CONTinuation will proceed through 31 December ',I4,:
     &      /' (NYEAR = ',I4,'.)')
      endif
      if (IFLAG.gt.2) write (TTYOUT(MACHNO),5050) LASTYR
      go to 400
130   continue
      write (TTYOUT(MACHNO),5060)
5060  format (/' MODE is not in allowable range (1, 2, or 3 only).'/)
      go to 400
140   continue
      write (TTYOUT(MACHNO),5070)
5070  format (//' The following options are available:'//10X,' Frame - l
     &ist current integration time parameters, or'/10X,' Quit  - return 
     &to command mode without any action.')
      write (TTYOUT(MACHNO),REQFMT(1))
      call INREC (EOF,INUNIT,INPUT)
      if (EOF.eq.1) go to 410
      STOPIT = 0
      go to 110
150   continue
      IT = 4
      go to 400
160   continue
      IT = 5
      go to 400
170   continue
      open (unit=PLTLUN(MACHNO),status='OLD',access='SEQUENTIAL',form='U
     &NFORMATTED',FILE='SSOUT.PLT',err=200)
      if (.not.(TOPOPN(MACHNO))) rewind PLTLUN(MACHNO)
      if (FIXFIL.ne.0) go to 180
      IT = 8
      go to 220
180   continue
      read (PLTLUN(MACHNO),end=210,err=200) I1,I2,I3
      write (TTYOUT(MACHNO),5080) I1,I2,I3
5080  format (//' Number of chemicals--',I2/' Simulation Mode--    ',I2/
     &   ' Number of segments-- ',I2//)
      do 190 I = 1, I1
         read (PLTLUN(MACHNO),end=210,err=200) NAMECO
         J = LRAIL(NAMECO,50)
         write (TTYOUT(MACHNO),5090) I,NAMECO(1:J)
5090     format (' Chemical:',I2,') ',A)
190   continue
      read (PLTLUN(MACHNO),end=210,err=200) NAMEEC
      J = LRAIL(NAMEEC,50)
      write (TTYOUT(MACHNO),5100) NAMEEC(1:J)
5100  format (' Environment--',A)
      go to 220
200   continue
      write (TTYOUT(MACHNO),5110)
5110  format (//' Error reading the plot file.')
      go to 220
210   continue
      write (TTYOUT(MACHNO),5120)
5120  format (//' End-of-file enountered while reading the',' plot file.
     &')
220   continue
      close (unit=PLTLUN(MACHNO),err=400)
      go to 400
230   continue
      write (TTYOUT(MACHNO),5130)
5130  format (/' The following options are available '//' Advection,  Ch
     &emistry,   Dispersion,   GEometry,'/' GLobals,    Loads,       PLo
     &t,         PUlse Loads,'/' PRoducts,   QUAlity,     Time Frame,   
     &Variables,')
      write (TTYOUT(MACHNO),REQFMT(2))
      call INREC (EOF,INUNIT,INPUT)
      STOPIT = 0
      go to 100
240   continue
      IT = 6
      go to 400
250   continue
      IPASS = 0
      do 290 I = 1, KOUNT
         if (IPASS.eq.1) go to 260
         call HEDSHO
         write (TTYOUT(MACHNO),5140) I,TYPEG(I),MONAM(MONTHG)
5140     format (/' Segment No. ',I2,',  Type--',A1,',  Month--',A9)
         write (TTYOUT(MACHNO),5150) VOLG(I),XSAG(I),AREAG(I),LENGG(I),
     &      DEPTHG(I),WIDTHG(I),STFLOG(I,MONTHG),STSEDG(I,MONTHG),NPSFLG
     &      (I,MONTHG),NPSEDG(I,MONTHG)
5150     format (/' VOL    = ',1PG11.4,' XSA    = ',G11.4/' AREA   = ', 
     &      G11.4,' LENGth = ',G11.4/' DEPTH  = ',G11.4,' WIDTH  = ',   
     &      G11.4/' STFLO  = ',G11.4,' STSED  = ',G11.4/' NPSFL  = ',   
     &      G11.4,' NPSED  = ',G11.4)
         if (TYPEG(I).ne.'B') then
            write (TTYOUT(MACHNO),5160) SEEPSG(I,MONTHG),SUSEDG(I,MONTHG
     &         )
5160        format (' SEEPS  = ',G11.4,' SUSED  = ',G11.4)
            if (I.eq.1.or.(I.gt.1.and.TYPEG(I-1).eq.'B')) write (TTYOUT(
     &         MACHNO),5170) WINDG(I,MONTHG),EVAPG(I,MONTHG)
5170        format (' WIND   = ',G11.4,' EVAP   = ',G11.4,/)
         else
            write (TTYOUT(MACHNO),5180) SEEPSG(I,MONTHG),BULKDG(I,MONTHG
     &         ),PCTWAG(I,MONTHG)
5180  format (' SEEPS  = ',G11.4,' BULKD  = ',G11.4/' Percent water (PCT
     &WA) = ',G11.4)
         endif
260      continue
         IPASS = 0
         if (I.eq.KOUNT) go to 290
         IP1 = I+1
270      continue
         write (TTYOUT(MACHNO),5190) IP1
5190     format (/' Do you want to see Segment #',I3,'?')
         write (TTYOUT(MACHNO),REQFMT(3))
         call INREC (EOF,INUNIT,INPUT)
         if (EOF.eq.1) go to 410
         START = IMBED(INPUT,0)
         if (START.eq.-999) goto 290
         if (INPUT(START:START).eq.'Q'.or.INPUT(START:START).eq.'q') go
     &      to 400
         if (INPUT(START:START).eq.'Y'.or.INPUT(START:START).eq.'y') go
     &      to 290
         if (INPUT(START:START).eq.'N'.or.INPUT(START:START).eq.'n') go
     &      to 280
         write (TTYOUT(MACHNO),5200)
5200     format (/' Response not understood, please try again.')
         go to 270
280      continue
         IPASS = 1
290   continue
      go to 400
300   continue
      call HEDSHO
      IT = 1
      go to 400
310   continue
      call HEDSHO
      IT = 2
      go to 400
320   continue
      IPASS = 0
      do 360 I = 1, KOUNT
         if (IPASS.eq.1) go to 330
         call HEDSHO
         write (TTYOUT(MACHNO),5140) I,TYPEG(I),MONAM(MONTHG)
         write (TTYOUT(MACHNO),5210) AECG(I,MONTHG),CECG(I,MONTHG),
     &      REDAGG(I,MONTHG),FROCG(I,MONTHG),PHG(I,MONTHG),POHG(I,MONTHG
     &      ),TCELG(I,MONTHG),DOCG(I,MONTHG)
5210     format (/' AEC   = ',1PG11.4,' CEC    = ',G11.4/' REDAG = ',   
     &      G11.4,' FROC   = ',G11.4/' PH    = ',G11.4,' POH    = ',    
     &      G11.4/' TCEL  = ',G11.4,' DOC    = ',G11.4)
         if (TYPEG(I).ne.'B') then
            write (TTYOUT(MACHNO),5220) BACPLG(I,MONTHG),PLMASG(I,MONTHG
     &         ),KO2G(I,MONTHG),DISO2G(I,MONTHG),CHLG(I,MONTHG),DFACG(I,
     &         MONTHG)
5220        format (' BACPL = ',1PG11.4,' PLMAS  = ',G11.4/' KO2   = ', 
     &         G11.4,' DISO2  = ',G11.4/' CHL   = ',G11.4,' DFAC   = ', 
     &         G11.4/)
         else
            write (TTYOUT(MACHNO),5230) BNBACG(I,MONTHG),BNMASG(I,MONTHG
     &         )
5230        format (' BNBAC = ',1PG11.4,' BNMAS  = ',G11.4)
         endif
330      continue
         IPASS = 0
         if (I.eq.KOUNT) go to 360
         IP1 = I+1
340      continue
         write (TTYOUT(MACHNO),5190) IP1
         write (TTYOUT(MACHNO),REQFMT(3))
         call INREC (EOF,INUNIT,INPUT)
         if (EOF.eq.1) go to 410
         START = IMBED(INPUT,0)
         if (START.eq.-999) goto 360
         if (INPUT(START:START).eq.'Q'.or.INPUT(START:START).eq.'q') go
     &      to 400
         if (INPUT(START:START).eq.'Y'.or.INPUT(START:START).eq.'y') go
     &      to 360
         if (INPUT(START:START).eq.'N'.or.INPUT(START:START).eq.'n') go
     &      to 350
         write (TTYOUT(MACHNO),5200)
         go to 340
350      continue
         IPASS = 1
360   continue
      go to 400
370   continue
      call HEDSHO
      IT = 3
      go to 400
380   continue
      call HEDSHO
      IT = 7
      go to 400
390   continue
      call SHOVAR
400   continue
      return
410   continue
      write (TTYOUT(MACHNO),5240)
5240  format (/' E-O-F encountered. SHOW  terminated.')
      go to 400
420   continue
      write (TTYOUT(MACHNO),5250)
5250  format (/' Option not identified.')
      go to 400
430   continue
      STOPIT = START-1
      call PRTPRM (IS)
      go to 400
      end
