  subroutine f_leapfroga(lb,ub,s, &
        params,anm,an,anp,bn,cn,dn)
  use tensors
  use input_params
  use leapfroga_i !F90 interface blok for leapfroga
  implicit none
  integer, dimension(3)         :: lb,ub,s
  real*8, dimension(s(1),s(2),s(3)), target :: & 
        anm,an,anp,bn,cn,dn 
  real*8,dimension(100) :: params
   
   
  real*8 h,dt
  h=params(98)
  dt=params(99)

  params(P_LOCAL_LOWER_X)=lb(1)
  params(P_LOCAL_LOWER_Y)=lb(2)
  params(P_LOCAL_LOWER_Z)=lb(3)
  params(P_LOCAL_UPPER_X)=ub(1)
  params(P_LOCAL_UPPER_Y)=ub(2)
  params(P_LOCAL_UPPER_Z)=ub(3)

  call leapfroga(params,anm,an,anp,bn,cn,dn)
  return
  end
