        subroutine HYDPR
      include 'SIZE.INC'
      include 'GLOBAL.INC'
      include 'LOCAL.INC'
      include 'UNITS.INC'
      include 'LOCAL1.INC'
      include 'LOCAL2.INC'
      include 'LOCAL3.INC'
        double precision DTEMP
        real HPLUS, HYDRX, KAHL, KNHL, KBHL, TEMP2, TKEL
        integer I, II, J, KK, III, VRAIL
        integer IFORM, ION, I1, I2, I3, K, N1
        common /PRODUC/ IFORM, ION, I1, I2, I3, K, N1
5000  format (' WARNING: The product chemistry specifications for'/1X,  
     &   50A1)
5010  format (' include an invalid entry at location',I5)
      if (NPROCG(N1).eq.1) go to 100
      if (NPROCG(N1).eq.2) go to 160
      if (NPROCG(N1).eq.3) go to 220
      go to 280
100   continue
      if (RFORMG(N1).gt.28) go to 120
      do 110 J = 1, KOUNT
         TKEL = TCELG(J,NDAT)+273.15
         HPLUS = 10.**(-PHG(J,NDAT))
         KAHL = KAHG(IFORM,ION,I1)
         if (EAHG(IFORM,ION,I1).ne.0.0) KAHL = 10.**(KAHG(IFORM,ION,I1)-
     &      ((1000.*EAHG(IFORM,ION,I1))/(4.58*TKEL)))
         TEMP2 = YIELDG(N1)
         if (EAYLDG(N1).ne.0.0) TEMP2 = 10.**(YIELDG(N1)-((1000.*EAYLDG(
     &      N1))/(4.58*TKEL)))
         DTEMP = 0.0D+00
         DTEMP = TEMP2*KAHL*(MWTG(I2)/MWTG(I1))*HPLUS*ALPHA(I3,J,K)
         YIELDL(I2,I1,J) = YIELDL(I2,I1,J)+DTEMP
110   continue
      go to 290
120   continue
      IFORM = RFORMG(N1)-28
      do 150 J = 1, KOUNT
         II = -2
         TKEL = TCELG(J,NDAT)+273.15
         HPLUS = 10.**(-PHG(J,NDAT))
         do 140 ION = 1, 7
            if (SPFLGG(ION,I1).eq.0) go to 130
            KAHL = KAHG(IFORM,ION,I1)
            if (EAHG(IFORM,ION,I1).ne.0.0) KAHL = 10.**(KAHG(IFORM,ION,
     &         I1)-((1000.*EAHG(IFORM,ION,I1))/(4.58*TKEL)))
            TEMP2 = YIELDG(N1)
            if (EAYLDG(N1).ne.0.0) TEMP2 = 10.**(YIELDG(N1)-((1000.*
     &         EAYLDG(N1))/(4.58*TKEL)))
            KK = 3*ION+II+IFORM-1
            DTEMP = 0.0D+00
            DTEMP = TEMP2*KAHL*(MWTG(I2)/MWTG(I1))*HPLUS*ALPHA(KK,J,K)
            YIELDL(I2,I1,J) = YIELDL(I2,I1,J)+DTEMP
130         continue
            II = II+1
140      continue
150   continue
      go to 290
160   continue
      if (RFORMG(N1).gt.28) go to 180
      do 170 J = 1, KOUNT
         TKEL = TCELG(J,NDAT)+273.15
         KNHL = KNHG(IFORM,ION,I1)
         if (ENHG(IFORM,ION,I1).ne.0.0) KNHL = 10.**(KNHG(IFORM,ION,I1)-
     &      ((1000.*ENHG(IFORM,ION,I1))/(4.58*TKEL)))
         TEMP2 = YIELDG(N1)
         if (EAYLDG(N1).ne.0.0) TEMP2 = 10.**(YIELDG(N1)-((1000.*EAYLDG(
     &      N1))/(4.58*TKEL)))
         DTEMP = 0.0D+00
         DTEMP = TEMP2*KNHL*(MWTG(I2)/MWTG(I1))*ALPHA(I3,J,K)
         YIELDL(I2,I1,J) = YIELDL(I2,I1,J)+DTEMP
170   continue
      go to 290
180   continue
      IFORM = RFORMG(N1)-28
      do 210 J = 1, KOUNT
         II = -2
         TKEL = TCELG(J,NDAT)+273.15
         do 200 ION = 1, 7
            if (SPFLGG(ION,I1).eq.0) go to 190
            KNHL = KNHG(IFORM,ION,I1)
            if (ENHG(IFORM,ION,I1).ne.0.0) KNHL = 10.**(KNHG(IFORM,ION,
     &         I1)-((1000.*ENHG(IFORM,ION,I1))/(4.58*TKEL)))
            TEMP2 = YIELDG(N1)
            if (EAYLDG(N1).ne.0.0) TEMP2 = 10.**(YIELDG(N1)-((1000.*
     &         EAYLDG(N1))/(4.58*TKEL)))
            KK = 3*ION+II+IFORM-1
            DTEMP = 0.0D+00
            DTEMP = TEMP2*KNHL*(MWTG(I2)/MWTG(I1))*ALPHA(KK,J,K)
            YIELDL(I2,I1,J) = YIELDL(I2,I1,J)+DTEMP
190         continue
            II = II+1
200      continue
210   continue
      go to 290
220   continue
      if (RFORMG(N1).gt.28) go to 240
      do 230 J = 1, KOUNT
         TKEL = TCELG(J,NDAT)+273.15
         HYDRX = 10.**(-POHG(J,NDAT))
         KBHL = KBHG(IFORM,ION,I1)
         if (EBHG(IFORM,ION,I1).ne.0.0) KBHL = 10.**(KBHG(IFORM,ION,I1)-
     &      ((1000.*EBHG(IFORM,ION,I1))/(4.58*TKEL)))
         TEMP2 = YIELDG(N1)
         if (EAYLDG(N1).ne.0.0) TEMP2 = 10.**(YIELDG(N1)-((1000.*EAYLDG(
     &      N1))/(4.58*TKEL)))
         DTEMP = 0.0D+00
         DTEMP = TEMP2*KBHL*(MWTG(I2)/MWTG(I1))*HYDRX*ALPHA(I3,J,K)
         YIELDL(I2,I1,J) = YIELDL(I2,I1,J)+DTEMP
230   continue
      go to 290
240   continue
      IFORM = RFORMG(N1)-28
      do 270 J = 1, KOUNT
         II = -2
         TKEL = TCELG(J,NDAT)+273.15
         HYDRX = 10.**(-POHG(J,NDAT))
         do 260 ION = 1, 7
            if (SPFLGG(ION,I1).eq.0) go to 250
            KBHL = KBHG(IFORM,ION,I1)
            if (EBHG(IFORM,ION,I1).ne.0.0) KBHL = 10.**(KBHG(IFORM,ION,
     &         I1)-((1000.*EBHG(IFORM,ION,I1))/(4.58*TKEL)))
            TEMP2 = YIELDG(N1)
            if (EAYLDG(N1).ne.0.0) TEMP2 = 10.**(YIELDG(N1)-((1000.*
     &         EAYLDG(N1))/(4.58*TKEL)))
            KK = 3*ION+II+IFORM-1
            DTEMP = 0.0D+00
            DTEMP = TEMP2*KBHL*(MWTG(I2)/MWTG(I1))*HYDRX*ALPHA(KK,J,K)
            YIELDL(I2,I1,J) = YIELDL(I2,I1,J)+DTEMP
250         continue
            II = II+1
260      continue
270   continue
      go to 290
280   continue
      III = VRAIL(CHEMNA(1,CHPARG(N1)))
      write (TTYOUT(MACHNO),5000) (CHEMNA(I,CHPARG(N1)),I=1,III)
      write (TTYOUT(MACHNO),5010) N1
      write (TTYOUT(MACHNO),5020)
5020  format (1X,'This entry has caused a code malfunction in HYDPR.')
      go to 290
290   continue
      return
      end
