module tcai1_mod
! Transient Convolution Adjoint Input 1-D. yy(m1+n1)
  implicit none
  contains
!========================================================
  subroutine tcai1_lop2(xx,yy,bb)
    INTEGER, PARAMETER       :: dp = SELECTED_REAL_KIND(14, 60)
    real(dp), dimension (:)  :: xx 
    real(dp), dimension (:)  :: yy 
    real(dp), dimension (:)  :: bb 
    integer b, x, y
    do b= 1, size(bb)
      do x= 1, size(xx)
        y = x + b - 1
        if (y <= size(yy) ) xx(x) = xx(x) +  yy(y) * bb(b)
      end do
    end do
  end subroutine 
end module 
