      SUBROUTINE READLIJINGTABLE1(maxyear,ntyp,dcorr1,nyearmin,
     * nyearmax)

C     READLIJINGTABLE5 READS DATA FROM LIJING ET AL. 2014
C     TABLE 1  (DEPTH CORRECTION ).

      parameter (icmax=20)
      parameter (xdroph=6.691)
      parameter (xdropt5=6.828,xdropt10=6.301)
      character*200 text,filename
 
      dimension dcorr1(maxyear,ntyp)
      dimension icomma(icmax,2),xdrop(icmax)

      call extraname('sys.inf'//CHAR(0),
     * 'CH14_table1.txt'//CHAR(0),filename)
      open(9,file=filename,status='old')

c     read in headers

      do 20 n=1,1
20     read(9,'(a)') text

c     read in data
c    column 1: year
c    column 2: T7/DB
c    column 3: unk_deep
c    column 4: T4/T6
c    column 5: unk_shallow
c    column 6: T10
c    column 7: T5
c    column 8: TSK T4/T6
c    column 9: TSK T5
c    column 10: TSK T7

      xdrop(1)=xdroph
      xdrop(2)=xdroph
      xdrop(3)=xdroph
      xdrop(4)=xdroph
      xdrop(5)=xdropt10
      xdrop(6)=xdropt5
      xdrop(7)=xdroph
      xdrop(8)=xdropt5
      xdrop(9)=xdroph

      nyearmax=0
      nyearmin=maxyear
      do 50 ny=1,maxyear

       call clearstring(text,200)
       read(9,'(a)',end=4) text
       call findlastchar(nsp,text,200)

       call spacefindl(nsp,icmax,ncomma,icomma,text)
       if ( ncomma .lt. 2 ) goto 50

       read(text(icomma(1,1):icomma(1,1)+icomma(1,2)-1),*)
     *  nyear
c      xyear=xyear*1000.
c      nyear=xyear+0.1
c      write(6,*) 'xyear',nyear,xyear
       if ( nyear .gt. nyearmax ) nyearmax=nyear
       if ( nyear .lt. nyearmin ) nyearmin=nyear

       do 55 nx=1,ncomma-1
        nc=nx+1
        dcorr1(nyear,nx)=xdrop(nx)
        if ( text(icomma(nc,1):icomma(nc,1)+icomma(nc,2)-1)
     *      .ne. 'NaN' ) then
         read(text(icomma(nc,1):icomma(nc,1)+icomma(nc,2)-1),*)
     *    dcorr1(nyear,nx)
        endif
c       write(6,*) 'acorr',nyear,dcorr1(nyear,1)
55     continue

50    continue
4     continue
      close(9)

      return
      end
