!-----------------------------------------------------------------------
!  chksp1 -- evaluate and plot spline function on passed grid
!
subroutine chksp1(zxin,zfunc,ixin,zsplin,isplin,zlbl)
  use nbi_com
  use nbi_dimensions
  !
  implicit none
  integer :: ixin,isplin               ! array dims
  real(fp) :: zxin(ixin)                   ! where to evaluate spline
  real(fp) :: zfunc(ixin)                  ! results of evaluation (computed here)
  real(fp) :: zsplin(4,isplin)             ! spline function coefficients
  character(len=*) zlbl                ! passed label
  !
  !  the functions evaluated have the storage convention of bob mccann's
  !  1d spline functions evaluated in magcf and used e.g. in orbg in the
  !  beam code
  !
  real(fp) :: zxi,zh
  integer :: ixi,jx,izlbl
  !
  !       -------------------
  !       statement functions  -- bob mccann's
  !       -------------------
  !
  !
  real(fp) :: zf1d,zzh,zf0,zf1,zf2,zf3
  !
  !  executable code
  !
  do ixi=1,ixin
     zxi=zxin(ixi)
     jx=int(zxi/dxi(lcentr,2))+1
     zh=zxi-real(jx-1,fp)*dxi(lcentr,2)
     !
     zfunc(ixi)=zf1d(zh,zsplin(1,jx),zsplin(2,jx), &
          zsplin(3,jx),zsplin(4,jx))
     !

  end do
  !
  izlbl=len(zlbl)
  call r8_grafx1(zxin,zfunc,ixin,' ',' ',' ', &
       'transp run '//runid(1:lrunid)//' debug', &
       zlbl(1:izlbl)//' vs xi')
  !
  return
end subroutine chksp1
! 11sep2004 fgtok
