V3FIT
r8spgrid.f
1  subroutine r8spgrid(x_newgrid,nx_new,f_new,nx,xpkg,fspl,iwarn,ier)
2 c
3 c regrid a spline function f defined vs. x as in xpkg
4 c to a new grid, given by x_newgrid.
5 c
6 c set warning flag if the range x_newgrid exceeds the range of the
7 c original xpkg.
8 c
9 c (xpkg -- see genxpkg subroutine)
10 c
11 c input:
12 c
13 !============
14 ! idecl: explicitize implicit INTEGER declarations:
15  IMPLICIT NONE
16  INTEGER, PARAMETER :: R8=selected_real_kind(12,100)
17  INTEGER nx_new
18 !============
19  real*8 x_newgrid(nx_new) ! new grid
20 c
21 c output:
22 c
23  real*8 f_new(nx_new) ! f evaluated on this grid
24 c
25 c input:
26 c
27  integer nx ! size of old grid
28  real*8 xpkg(nx,4) ! old grid "package"
29  real*8 fspl(4,nx) ! spline coefficients of f
30 c
31 c output:
32 c condition codes, =0 for normal exit
33 c
34  integer iwarn ! =1 if new grid points out of range
35  integer ier ! =1 if there is an argument error
36 c
37 c--------------------------------------------
38 c local
39 c
40  integer ict(3)
41 c
42  data ict/1,0,0/
43 c
44 c--------------------------------------------
45 c
46  call r8spvec(ict,nx_new,x_newgrid,nx_new,f_new,nx,xpkg,fspl,
47  > iwarn,ier)
48 c
49  return
50  end