      subroutine UNPAK(RECNUM,KT)
      include 'SIZE.INC'
      include 'GLOBAL.INC'
      include 'LOCAL.INC'
      include 'UNITS.INC'
      real BUFFER(VARREC), IO(789)
      integer IBUFF(VARIEC),IOI(7),I,M,L,ISET,J,KT
      integer RECNUM,OFFSET,NUSED
      integer TRECS,RRECS,IRECS,CRECS,NREALS,NINTS,NCHARS
      integer RECDAT(FILDAT),HRECS
      character*1 CBUFF(VARCEC),IOC(62)
      do 100 I = 1, VARCEC
         CBUFF(I) = ' '
100   continue
      do 110 I = 1, VARIEC
         IBUFF(I) = 0
110   continue
      do 120 I = 1, VARREC
         BUFFER(I) = 0.0
120   continue
      HRECS = FILDAT/VARIEC
      if (FILDAT-VARIEC*HRECS.ne.0) HRECS = HRECS+1
      M = 0
      do 140 I = 1, HRECS
         read (RANUNT(MACHNO),rec=I) IBUFF
         do 130 L = 1, VARIEC
            M = M+1
            if (M.gt.FILDAT) go to 150
            RECDAT(M) = IBUFF(L)
130      continue
140   continue
150   continue
      RRECS = RECDAT(15)
      IRECS = RECDAT(16)
      CRECS = RECDAT(54)
      TRECS = RRECS+IRECS+CRECS
      NREALS = RECDAT(19)
      NINTS = RECDAT(20)
      NCHARS = RECDAT(50)
      ISET = RECDAT(9)-1
      OFFSET = (RECNUM-1)*TRECS+ISET
      M = 0
      do 180 I = 1, RRECS
         J = OFFSET+I
         read (RANUNT(MACHNO),rec=J) BUFFER
         do 160 L = 1, VARREC
            M = M+1
            if (M.gt.NREALS) go to 170
            IO(M) = BUFFER(L)
160      continue
170      continue
180   continue
      OFFSET = OFFSET+RRECS
      M = 0
      do 210 I = 1, IRECS
         J = OFFSET+I
         read (RANUNT(MACHNO),rec=J) IBUFF
         do 190 L = 1, VARIEC
            M = M+1
            if (M.gt.NINTS) go to 200
            IOI(M) = IBUFF(L)
190      continue
200      continue
210   continue
      OFFSET = OFFSET+IRECS
      M = 0
      do 240 I = 1, CRECS
         J = OFFSET+I
         read (RANUNT(MACHNO),rec=J) CBUFF
         do 220 L = 1, VARCEC
            M = M+1
            if (M.gt.NCHARS) go to 230
            IOC(M) = CBUFF(L)
220      continue
230      continue
240   continue
      MWTG(KT) = IO(1)
      KOCG(KT) = IO(2)
      KOWG(KT) = IO(3)
      KVOG(KT) = IO(4)
      HENRYG(KT) = IO(5)
      EHENG(KT) = IO(6)
      VAPRG(KT) = IO(7)
      EVPRG(KT) = IO(8)
      NUSED = 8
      do 250 I = 1, 6
         PKG(I,KT) = IO(NUSED+1)
         EPKG(I,KT) = IO(NUSED+2)
         KIECG(I,KT) = IO(NUSED+3)
         NUSED = NUSED+3
250   continue
      do 260 I = 1, 7
         SOLG(I,KT) = IO(NUSED+1)
         ESOLG(I,KT) = IO(NUSED+2)
         KPSG(I,KT) = IO(NUSED+3)
         KPBG(I,KT) = IO(NUSED+4)
         KPDOCG(I,KT) = IO(NUSED+5)
         KDPG(I,KT) = IO(NUSED+6)
         RFLATG(I,KT) = IO(NUSED+7)
         LAMAXG(I,KT) = IO(NUSED+8)
         NUSED = NUSED+8
260   continue
      do 280 J = 1, 7
         do 270 I = 1, 3
            QUANTG(I,J,KT) = IO(NUSED+1)
            KAHG(I,J,KT) = IO(NUSED+2)
            EAHG(I,J,KT) = IO(NUSED+3)
            KNHG(I,J,KT) = IO(NUSED+4)
            ENHG(I,J,KT) = IO(NUSED+5)
            KBHG(I,J,KT) = IO(NUSED+6)
            EBHG(I,J,KT) = IO(NUSED+7)
            KOXG(I,J,KT) = IO(NUSED+8)
            EOXG(I,J,KT) = IO(NUSED+9)
            K1O2G(I,J,KT) = IO(NUSED+10)
            EK1O2G(I,J,KT) = IO(NUSED+11)
            KREDG(I,J,KT) = IO(NUSED+12)
            EREDG(I,J,KT) = IO(NUSED+13)
            NUSED = NUSED+13
270      continue
280   continue
      do 300 J = 1, 7
         do 290 I = 1, 4
            KBACWG(I,J,KT) = IO(NUSED+1)
            QTBAWG(I,J,KT) = IO(NUSED+2)
            KBACSG(I,J,KT) = IO(NUSED+3)
            QTBASG(I,J,KT) = IO(NUSED+4)
            NUSED = NUSED+4
290      continue
300   continue
      do 320 J = 1, 7
         do 310 I = 1, 46
            ABSORG(I,J,KT) = IO(NUSED+I)
310      continue
         NUSED = NUSED+46
320   continue
      do 330 I = 1, 50
         CHEMNA(I,KT) = IOC(I)
330   continue
      NUSED = 50
      do 340 I = 1, 6
         RPASS(1)(I:I) = IOC(NUSED+1)
         WPASS(1)(I:I) = IOC(NUSED+2)
         NUSED = NUSED+2
340   continue
      do 350 I = 1, 7
         SPFLGG(I,KT) = IOI(I)
350   continue
      NUSED = 7
      return
      end
