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

  anm_%d => an

  anp_%d => an

  bnm_%d => bn

  bnp_%d => bn

  cnm_%d => cn

  cnp_%d => cn

  dnm_%d => dn

  dnp_%d => dn

  call initstep(params,anm_,an,anp_,bnm_,bn,bnp_,cnm_,cn, &
     cnp_,dnm_,dn,dnp_,temp)
  return
  end
