module zpad1  
! Zero pad.  Surround data by zeros. 1-D
  use adj_mod
implicit none
  contains
  function zpad1_lop ( adj, add, data, padd) result(stat)
    integer            :: stat 
    logical,intent(in) :: adj,add 
    real,dimension(:)  :: data,padd 
    call adjnull (adj,add,data,padd )
    call zpad1_lop2(adj,add,data,padd )
    stat=0
  end function 
  subroutine zpad1_lop2(adj,add,data,padd)
    logical,intent(in) :: adj,add 
    real, dimension (:)  :: data 
    real, dimension (:)  :: padd 
    integer                              p,  d
    do d= 1, size(data)
      p = d + (size(padd)-size(data))/2
      if ( adj) then
        data(d) = data(d) + padd(p)
      else
        padd(p) = padd(p) + data(d)
      end if
    end do
  end subroutine 
  subroutine zpad1_close()
  end subroutine 
end module 
