C ------------------------------------------------

	subroutine fd_absorb_model

	include 'common.h'
	real taper(nx)

c taper parameters

	aabs=3.*nabs
	
c initialise spatial window

	window=1.
	tmp=1.
	do i=1,nabs
	taper(nabs+1-i)=exp(-1./aabs**2*(i-1)**2)	
	enddo
	

	do i=1,nabs
	window(i,:)=taper(i)
	window(nx+1-i,:)=taper(i)
	tmp(:,i)=taper(i)
	tmp(:,nz+1-i)=taper(i)
	enddo
	window=window*tmp
	window=window/maxval(window)
	write(*,*)minval(window),' < window < ',maxval(window)
	
	write(*,*)' Saving window '
        open(unit=20,file=seisfile(1:lnblnk(seisfile))//'_wd',status='unknown')
        do i=1,nx,iout
        do j=1,nz,iout
        write(20,*)window(i,j)
        enddo
        enddo
	close(20)


	return
	end

