module wei_kxmig
  !! fk-fx migration 
  use wei_util
  use wei_pro
  !---------------
  implicit none
contains
  !----------------------------------------------------------------
  subroutine weikxmig(wfld,iws,izs,ith,WCop,FKop,FXop)
    complex, dimension(:,:,:,:,:), pointer :: wfld
    integer,external,optional :: FKop,FXop
    integer :: izs,iws,ith
    integer :: st
#ifdef DEBUG
    character(len=128), parameter :: unit='weikxmig'
#endif
    interface !!-------------------------
       integer function WCop(wfld,iws,izs,ith,FKop,FXop) result(st)
         complex, dimension(:,:,:,:,:), pointer :: wfld
         integer, intent(in)       :: iws,izs,ith
         integer,external,optional :: FKop,FXop
       end function WCop
    end interface !!---------------------
#ifdef DEBUG
    if(wpro%dbg>9) call in(unit)
#endif

    st = WCop(wfld,iws,izs,ith,FKop,FXop)

#ifdef DEBUG
    if(wpro%dbg>9) call out(unit)
#endif
  end subroutine weikxmig
  !----------------------------------------------------------------
end module wei_kxmig
