diff --git a/fvn_interpol/fvn_interpol.f90 b/fvn_interpol/fvn_interpol.f90 index 1098c66..275d4ec 100644 --- a/fvn_interpol/fvn_interpol.f90 +++ b/fvn_interpol/fvn_interpol.f90 @@ -52,11 +52,11 @@ subroutine fvn_s_find_interval(x,i,xdata,n) ! a simple dichotomy method is used real(kind=sp_kind), intent(in) :: x - integer(kind=sp_kind), intent(in) :: n + integer(kind=ip_kind), intent(in) :: n real(kind=sp_kind), intent(in), dimension(n) :: xdata - integer(kind=sp_kind), intent(out) :: i + integer(kind=ip_kind), intent(out) :: i - integer(kind=sp_kind) :: imin,imax,imoyen + integer(kind=ip_kind) :: imin,imax,imoyen ! special case is where x=xdata(n) then n-1 is returned so ! we will not exclude the upper limit @@ -106,11 +106,11 @@ subroutine fvn_d_find_interval(x,i,xdata,n) ! a simple dichotomy method is used real(kind=dp_kind), intent(in) :: x - integer(kind=sp_kind), intent(in) :: n + integer(kind=ip_kind), intent(in) :: n real(kind=dp_kind), intent(in), dimension(n) :: xdata - integer(kind=sp_kind), intent(out) :: i + integer(kind=ip_kind), intent(out) :: i - integer(kind=sp_kind) :: imin,imax,imoyen + integer(kind=ip_kind) :: imin,imax,imoyen ! special case is where x=xdata(n) then n-1 is returned so ! we will not exclude the upper limit @@ -156,12 +156,12 @@ function fvn_s_quad_interpol(x,n,xdata,ydata) ! xdata must be increasingly ordered ! x must be within xdata(1) and xdata(n) to actually do interpolation ! otherwise extrapolation is done - integer(kind=sp_kind), intent(in) :: n + integer(kind=ip_kind), intent(in) :: n real(kind=sp_kind), intent(in), dimension(n) :: xdata,ydata real(kind=sp_kind), intent(in) :: x real(kind=sp_kind) :: fvn_s_quad_interpol - integer(kind=sp_kind) :: iinf,base,i,j + integer(kind=ip_kind) :: iinf,base,i,j real(kind=sp_kind) :: p call fvn_s_find_interval(x,iinf,xdata,n) @@ -211,12 +211,12 @@ function fvn_d_quad_interpol(x,n,xdata,ydata) ! xdata must be increasingly ordered ! x must be within xdata(1) and xdata(n) to actually do interpolation ! otherwise extrapolation is done - integer(kind=sp_kind), intent(in) :: n + integer(kind=ip_kind), intent(in) :: n real(kind=dp_kind), intent(in), dimension(n) :: xdata,ydata real(kind=dp_kind), intent(in) :: x real(kind=dp_kind) :: fvn_d_quad_interpol - integer(kind=sp_kind) :: iinf,base,i,j + integer(kind=ip_kind) :: iinf,base,i,j real(kind=dp_kind) :: p call fvn_d_find_interval(x,iinf,xdata,n) @@ -267,14 +267,14 @@ function fvn_s_quad_2d_interpol(x,y,nx,xdata,ny,ydata,zdata) ! the couple (x,y) must be as x within xdata(1) and xdata(nx) and ! y within ydata(1) and ydata(ny) to actually do interpolation ! otherwise extrapolation is done - integer(kind=sp_kind), intent(in) :: nx,ny + integer(kind=ip_kind), intent(in) :: nx,ny real(kind=sp_kind), intent(in) :: x,y real(kind=sp_kind), intent(in), dimension(nx) :: xdata real(kind=sp_kind), intent(in), dimension(ny) :: ydata real(kind=sp_kind), intent(in), dimension(nx,ny) :: zdata real(kind=sp_kind) :: fvn_s_quad_2d_interpol - integer(kind=sp_kind) :: ixinf,iyinf,basex,basey,i + integer(kind=ip_kind) :: ixinf,iyinf,basex,basey,i real(kind=sp_kind),dimension(3) :: ztmp !real(kind=4), external :: fvn_s_quad_interpol @@ -335,14 +335,14 @@ function fvn_d_quad_2d_interpol(x,y,nx,xdata,ny,ydata,zdata) ! the couple (x,y) must be as x within xdata(1) and xdata(nx) and ! y within ydata(1) and ydata(ny) to actually do interpolation ! otherwise extrapolation is done - integer(kind=sp_kind), intent(in) :: nx,ny + integer(kind=ip_kind), intent(in) :: nx,ny real(kind=dp_kind), intent(in) :: x,y real(kind=dp_kind), intent(in), dimension(nx) :: xdata real(kind=dp_kind), intent(in), dimension(ny) :: ydata real(kind=dp_kind), intent(in), dimension(nx,ny) :: zdata real(kind=dp_kind) :: fvn_d_quad_2d_interpol - integer(kind=sp_kind) :: ixinf,iyinf,basex,basey,i + integer(kind=ip_kind) :: ixinf,iyinf,basex,basey,i real(kind=dp_kind),dimension(3) :: ztmp !real(kind=8), external :: fvn_d_quad_interpol @@ -402,7 +402,7 @@ function fvn_s_quad_3d_interpol(x,y,z,nx,xdata,ny,ydata,nz,zdata,tdata) ! xdata, ydata and zdata must be increasingly ordered ! The triplet (x,y,z) must be within xdata,ydata and zdata to actually ! perform an interpolation, otherwise extrapolation is done - integer(kind=sp_kind), intent(in) :: nx,ny,nz + integer(kind=ip_kind), intent(in) :: nx,ny,nz real(kind=sp_kind), intent(in) :: x,y,z real(kind=sp_kind), intent(in), dimension(nx) :: xdata real(kind=sp_kind), intent(in), dimension(ny) :: ydata @@ -410,7 +410,7 @@ function fvn_s_quad_3d_interpol(x,y,z,nx,xdata,ny,ydata,nz,zdata,tdata) real(kind=sp_kind), intent(in), dimension(nx,ny,nz) :: tdata real(kind=sp_kind) :: fvn_s_quad_3d_interpol - integer(kind=sp_kind) :: ixinf,iyinf,izinf,basex,basey,basez,i,j + integer(kind=ip_kind) :: ixinf,iyinf,izinf,basex,basey,basez,i,j !real(kind=4), external :: fvn_s_quad_interpol,fvn_s_quad_2d_interpol real(kind=sp_kind),dimension(3,3) :: ttmp @@ -490,7 +490,7 @@ function fvn_d_quad_3d_interpol(x,y,z,nx,xdata,ny,ydata,nz,zdata,tdata) ! xdata, ydata and zdata must be increasingly ordered ! The triplet (x,y,z) must be within xdata,ydata and zdata to actually ! perform an interpolation, otherwise extrapolation is done - integer(kind=sp_kind), intent(in) :: nx,ny,nz + integer(kind=ip_kind), intent(in) :: nx,ny,nz real(kind=dp_kind), intent(in) :: x,y,z real(kind=dp_kind), intent(in), dimension(nx) :: xdata real(kind=dp_kind), intent(in), dimension(ny) :: ydata @@ -498,7 +498,7 @@ function fvn_d_quad_3d_interpol(x,y,z,nx,xdata,ny,ydata,nz,zdata,tdata) real(kind=dp_kind), intent(in), dimension(nx,ny,nz) :: tdata real(kind=dp_kind) :: fvn_d_quad_3d_interpol - integer(kind=sp_kind) :: ixinf,iyinf,izinf,basex,basey,basez,i,j + integer(kind=ip_kind) :: ixinf,iyinf,izinf,basex,basey,basez,i,j !real(kind=8), external :: fvn_d_quad_interpol,fvn_d_quad_2d_interpol real(kind=dp_kind),dimension(3,3) :: ttmp @@ -763,4 +763,5 @@ function fvn_d_spline_eval(x,n,br,co) end function -end module fvn_interpol \ No newline at end of file +end module fvn_interpol +