      SUBROUTINE QEFKIN
     I                  (MESSFL)
C
C     + + + PURPOSE + + +
C     edit kinetic parameters
C
C     + + + DUMMY ARGUMENTS + + ++ 
      INTEGER   MESSFL
C
C     + + + ARGUMENT DEFINITIONS + + +
C     MESSFL - Fortran unit number for message file
C
C     + + + COMMON BLOCKS + + +
      INCLUDE 'CQ2VAL.INC'
C
C     + + + LOCAL VARIABLES + + +
      INTEGER      I,J,I1,SCLU,SGRP,RESP,IRET,RNUM,CNUM,
     1             IVAL(MXRCH),CVAL(3,MXRCH)
      REAL         RVAL(7,MXRCH)
      CHARACTER*1  TBUFF(80,MXRCH)
      CHARACTER*15 SCNAME
C
C     + + + EXTERNALS + + +
      EXTERNAL     QRESP, QRESCN, QETHET, ZWNSET, ZGTRET, QEGANP
C
C     + + + END SPECIFICATIONS + + +
C
      I1  = 1
      SCLU= 12
C
 5    CONTINUE
C
        SGRP= 1
        CALL QRESP (MESSFL,SCLU,SGRP,RESP)
C
        GO TO (10,20,30,40,50), RESP
C
 10     CONTINUE
C         BOD/DO data
 15       CONTINUE
C           get here if user selects 'prev' on 2nd screen
            SCNAME= 'BOD/DO (EFKB)'
            CALL QEGANP (MESSFL,METFLG,SCNAME,
     M                   GPARM)
C           check user exit command value
            CALL ZGTRET (IRET)
            IF (IRET.EQ.1) THEN
C             now do data 6
              DO 17 I= 1,NUMRCH
                DAT6(1,I)  = DAT2(1,I)
                DO 16 J= 1,4
                  RVAL(J,I)= DAT6(J,I)
 16             CONTINUE
                CVAL(1,I)= DAT6(5,I)
                RVAL(5,I)= DAT6(6,I)
                RVAL(6,I)= DAT6(7,I)
                RVAL(7,I)= DAT6(8,I)
 17           CONTINUE
              RNUM= 7
              CNUM= 1
              SGRP= 2+ METFLG
              CALL QRESCN (MESSFL,SCLU,SGRP,I1,RNUM,CNUM,NUMRCH,I1,
     M                     IVAL,RVAL,CVAL,TBUFF)
              DO 19 I= 1,NUMRCH
                DO 18 J= 1,4
                  DAT6(J,I)= RVAL(J,I)
 18             CONTINUE
                DAT6(5,I)= CVAL(1,I)
                DAT6(6,I)= RVAL(5,I)
                DAT6(7,I)= RVAL(6,I)
                DAT6(8,I)= RVAL(7,I)
 19           CONTINUE
C             check user exit command value
              CALL ZGTRET (IRET)
            ELSE
C             user selected 'prev' in QEGANP, back to kinetics menu
              IRET= 1
            END IF
          IF (IRET.EQ.2) GO TO 15
          GO TO 100
C
 20     CONTINUE
C         nitrogen/phosphorous data
 25       CONTINUE
C           get here if user selects 'prev' on 2nd screen
            SCNAME= 'Nitrogen (EFKN)'
            CALL QEGANP (MESSFL,METFLG,SCNAME,
     M                   GPARM)
C           check user exit command value
            CALL ZGTRET (IRET)
            IF (IRET.EQ.1) THEN
C             now do data 6A
              DO 28 I= 1,NUMRCH
                DAT6A(1,I)= DAT2(1,I)
 28           CONTINUE
              RNUM= 9
              SGRP= 4+ METFLG
              CALL QRESCN (MESSFL,SCLU,SGRP,I1,RNUM,I1,NUMRCH,I1,
     M                     IVAL,DAT6A,CVAL,TBUFF)
C             check user exit command value
              CALL ZGTRET (IRET)
            ELSE
C             user selected 'prev' in QEGANP, back to kinetics menu
              IRET= 1
            END IF
          IF (IRET.EQ.2) GO TO 25
          GO TO 100
C
 30     CONTINUE
C         algae/coliform data
 35       CONTINUE
C           get here if user selects 'prev' on 2nd screen
            SCNAME= 'Algae (EFKA)'
            CALL QEGANP (MESSFL,METFLG,SCNAME,
     M                   GPARM)
C           check user exit command value
            CALL ZGTRET (IRET)
            IF (IRET.EQ.1) THEN
C             now do data 6B
              DO 38 I= 1,NUMRCH
                DAT6B(1,I)= DAT2(1,I)
 38           CONTINUE
              RNUM= 8
              SGRP= 6+ METFLG
              CALL QRESCN (MESSFL,SCLU,SGRP,I1,RNUM,I1,NUMRCH,I1,
     M                     IVAL,DAT6B,CVAL,TBUFF)
C             check user exit command value
              CALL ZGTRET (IRET)
            ELSE
C             user selected 'prev' in QEGANP, back to kinetics menu
              IRET= 1
            END IF
          IF (IRET.EQ.2) GO TO 35
          GO TO 100
C
 40     CONTINUE
C         theta values
          SCNAME= 'Theta (EFKT)'
          CALL QETHET (MESSFL,SCNAME,
     M                 THEIND,THEVAL)
          GO TO 100
C
 50     CONTINUE
C         all done
          GO TO 100
C
 100    CONTINUE
C
      IF (RESP.NE.5) GO TO 5
C
      RETURN
      END
