      subroutine UNPLDS(RECNUM)
      include 'SIZE.INC'
      include 'GLOBAL.INC'
      include 'LOCAL.INC'
      include 'UNITS.INC'
      real IO(NPX*5*NCHEM*MAXDAT+MAXMAS), BUFFER(VARREC)
      integer IOI(5*MAXMAS),RECNUM,OFFSET,IBUFF(VARIEC)
      integer RRECS, IRECS, CRECS, TRECS, NREALS, NINTS, NCHARS
      integer RECDAT(FILDAT),HRECS,I,M,L,ISET,J,NUSED,K
      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(33)
      IRECS = RECDAT(34)
      CRECS = RECDAT(56)
      TRECS = RRECS+IRECS+CRECS
      NREALS = RECDAT(37)
      NINTS = RECDAT(38)
      NCHARS = RECDAT(52)
      ISET = RECDAT(45)-1
      OFFSET = (RECNUM-1)*TRECS+ISET
      M = 0
      do 180 I = 1, RRECS
         J = I+OFFSET
         read (RANUNT(MACHNO),rec=J) BUFFER
         J = J+1
         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
      NUSED = 0
      do 250 I = 1, MAXMAS
         IMASSG(I) = IO(NUSED+I)
250   continue
      NUSED = NUSED+MAXMAS
      do 280 I = 1, MAXDAT
         do 270 J = 1, NCHEM
            do 260 K = 1, NPX
               STRLDG(K,J,I) = IO(NUSED+1)
               NPSLDG(K,J,I) = IO(NUSED+2)
               PCPLDG(K,J,I) = IO(NUSED+3)
               DRFLDG(K,J,I) = IO(NUSED+4)
               SEELDG(K,J,I) = IO(NUSED+5)
               NUSED = NUSED+5
260         continue
270      continue
280   continue
      NUSED = 0
      do 290 I = 1, MAXMAS
         ISEGG(I) = IOI(NUSED+1)
         ICHEMG(I) = IOI(NUSED+2)
         IMONG(I) = IOI(NUSED+3)
         IDAYG(I) = IOI(NUSED+4)
         IYEARG(I) = IOI(NUSED+5)
         NUSED = NUSED+5
290   continue
      do 300 I = 1, 50
         LOADNM(I) = IOC(I)
300   continue
      NUSED = 50
      do 310 I = 1, 6
         RPASS(3)(I:I) = IOC(NUSED+1)
         WPASS(3)(I:I) = IOC(NUSED+2)
         NUSED = NUSED+2
310   continue
      return
      end
