Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=Float64), | intent(in), | dimension(:) | :: | x | Abscissa values |
|
real(kind=Float64), | intent(in), | dimension(:) | :: | y | Ordinate values |
|
real(kind=Float64), | intent(in) | :: | xout | Abscissa value to interpolate |
||
real(kind=Float64), | intent(in) | :: | yout | Ordinate value to interpolate |
||
type(InterpolCoeffs2D), | intent(out) | :: | c | Interpolation Coefficients |
||
integer, | intent(out), | optional | :: | err | Error code |
subroutine interpol2D_coeff_arr(x,y,xout,yout,c,err)
!!Bilinear interpolation coefficients and indicies for a 2D grid z(x,y)
real(Float64), dimension(:), intent(in) :: x
!+ Abscissa values
real(Float64), dimension(:), intent(in) :: y
!+ Ordinate values
real(Float64), intent(in) :: xout
!+ Abscissa value to interpolate
real(Float64), intent(in) :: yout
!+ Ordinate value to interpolate
type(InterpolCoeffs2D), intent(out) :: c
!+ Interpolation Coefficients
integer, intent(out), optional :: err
!+ Error code
real(Float64) :: xmin, ymin, dx, dy
integer :: sx, sy, err_status
err_status = 1
sx = size(x)
sy = size(y)
xmin = x(1)
ymin = y(1)
dx = abs(x(2)-x(1))
dy = abs(y(2)-y(1))
call interpol2D_coeff(xmin, dx, sx, ymin, dy, sy, xout, yout, c, err_status)
if(present(err)) err = err_status
end subroutine interpol2D_coeff_arr