  subroutine f_boundupdt(lb,ub,s, &
        params,an,anv1,bn,bnv1,cn,cnv1,dn,dnv1,phi)
  use tensors
  use input_params
  use boundupdt_i !F90 interface blok for boundupdt
  implicit none
  integer, dimension(3)         :: lb,ub,s
  real*8, dimension(s(1),s(2),s(3)), target :: & 
        an,anv1,bn,bnv1,cn,cnv1,dn,dnv1,phi 
  real*8,dimension(100) :: params
   
  type(GridFunction) :: anp_
  type(GridFunction) :: bnp_
  type(GridFunction) :: cnp_
  type(GridFunction) :: dnp_
  type(GridFunction) :: phip_
   
  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)

  anp_%d => an

  bnp_%d => bn

  cnp_%d => cn

  dnp_%d => dn

  phip_%d => phi

  call boundupdt(params,an,anp_,bn,bnp_,cn,cnp_,dn,dnp_,phip_)
  return
  end
