      subroutine KINSEL(MAXSEL,KOUNT,NSEL,SELECT)
      include 'INPAR.INC'
      include 'UNITS.INC'
      real RESULT
      integer NSEL,SELECT(7),IFLAG,I,J,N,KOUNT,M,MAXSEL
      character REQFMT(3)*35
      data REQFMT(1)/'(/1X,''Enter segment number---> ''  )'/
      data REQFMT(2) /'(1X,''Enter parameter number-> ''   )'/
      data REQFMT(3) /'(1X,''Parameter-> ''                )'/
      REQFMT(1)(33:34) = CRSTOP(MACHNO)
      REQFMT(2)(32:33) = CRSTOP(MACHNO)
      REQFMT(3)(19:20) = CRSTOP(MACHNO)
      SELECT(1) = 1
      NSEL = 1
100   continue
      write (TTYOUT(MACHNO),5000)
5000  format (//' The following parameters are available for time-trace 
     &plotting'/' of values averaged over the ecosystem space:'/' ("Diss
     &olved" = aqueous + complexes with "dissolved" organics.)')
      write (TTYOUT(MACHNO),5010)
5010  format (/' 1 - Water Column: average "dissolved" (mg/L)'/' 2 -    
     &           average  sorbed     (mg/kg)'/' 3 -               total 
     &mass          (kg)')
      write (TTYOUT(MACHNO),5020)
5020  format (/' 4 - Benthic:      average "dissolved" (mg/L)'/' 5      
     &           average  sorbed     (mg/kg)'/' 6                 total 
     &mass          (kg)')
      write (TTYOUT(MACHNO),5030)
5030  format (//' Enter parameters, one per line;'/' enter "0" to end da
     &ta entry and proceed.')
110   continue
      write (TTYOUT(MACHNO),REQFMT(3))
      call KINNUM (IFLAG,RESULT)
      go to (110,230,120,100,230,130), IFLAG
120   continue
      write (TTYOUT(MACHNO),5040)
5040  format (//' Unrecognized response.')
      go to 110
130   continue
      I = int(RESULT)
      if (I.eq.0) go to 150
      if (I.ge.1 .and. I.le.6) go to 140
      write (TTYOUT(MACHNO),5050) I
5050  format (/' Parameter ',I3,' is out-of-range.')
      go to 110
140   continue
      J = I+1
      if (J.eq.5.or.J.eq.6) J = J-1
      if (I.eq.3) J = 6
      I = J
      NSEL = NSEL+1
      SELECT(NSEL) = I
      go to 110
150   continue
      J = 1
160   continue
      write (TTYOUT(MACHNO),5060)
5060  format (//' The following parameters are available for',' each seg
     &ment:'/)
      write (TTYOUT(MACHNO),5070)
5070  format (' 1 -  Total concentration   (Water Column, mg/L; benthic,
     & mg/kg)'/' 2 -  Dissolved + complexed (mg/liter of fluid volume)'/
     &' 3 -  Sorbed                (mg/kg of sediment)'/' 4 -  Biosorbed
     &             (ug/g)'/' 5 -  Mass                  (grams/square me
     &ter of AREA)'/)
      write (TTYOUT(MACHNO),5080)
5080  format (//' Enter segment-parameter number pair,',' one number per
     & line;'/' enter 0 when data entry is complete; Quit to abort.'/)
170   continue
180   continue
      if (J.eq.1.or.J.eq.2) write (TTYOUT(MACHNO),REQFMT(J))
      call KINNUM (IFLAG,RESULT)
      go to (170,230,190,160,230,200), IFLAG
190   continue
      write (TTYOUT(MACHNO),5040)
      go to 110
200   continue
      I = int(RESULT)
      if (I.eq.0) go to 230
      if (J.eq.2) go to 210
      N = I
      if (N.ge.1 .and. N.le.KOUNT) go to 220
      write (TTYOUT(MACHNO),5090) N
5090  format (/' Segment number ',I3,' is out-of-range.')
      go to 180
210   continue
      M = I
      if (M.ge.1 .and. M.le.5) go to 220
      write (TTYOUT(MACHNO),5050) M
      go to 180
220   continue
      J = J+1
      if (J.eq.2) go to 180
      I = 7+(N-1)*5+M
      NSEL = NSEL+1
      SELECT(NSEL) = I
      J = 1
      go to 180
230   continue
      return
      end
