      subroutine replace_meas_sig(za, nl, meas_signals, sigfile)

c     save 
      external linerd, openfile, closefile
      character*(*) sigfile
      integer nl
      real*8 meas_signals(*)
      real*4 za(*)

      integer mmax
      parameter(mmax = 900)
      logical done
      integer nsize
      real*8 za_l(mmax), tran_l(mmax),za_t(mmax) ,dum

      data done /.false./, nsize/0/
      save za_t, tran_l
      if( .not. done) then 
          call openfile(1,45,sigfile)
          i=0
 10       i=i+1
          read(45,*,end=15) za_t(i),dum,dum, tran_l(i)
          go to 10
 15       call closefile(45)
          nsize=i-1
          done=.true.
      endif

      do i=1,nl
          za_l(i) = za(i)
      enddo
        print*, "inside replace signals" 
        print*, za_t(1), tran_l(1), nsize, za_l(1)
      call linerd(za_t, tran_l, za_l, meas_signals, nsize, nl)
        print*, "after liner " 
      return
      end
