regridpack_module Module

A suite of Fortran routines for interpolating values between one-, two-, three-, and four-dimensional arrays defined on uniform or nonuniform orthogonal grids. This operation is commonly referred to as "regridding." Linear or cubic interpolation can be selected independently in each dimension. Extrapolation is not allowed. The subroutines in REGRIDPACK cannot be used to transfer values on nonorthogonal (randomly scattered) data grids.

History

  • John C. Adams (NCAR 1997) : original REGRIDPACK
  • Jacob Williams, Oct 2019, modernized and refactored

Uses

  • module~~regridpack_module~~UsesGraph module~regridpack_module regridpack_module iso_fortran_env iso_fortran_env module~regridpack_module->iso_fortran_env

Interfaces

public interface regrid

  • private subroutine rgrd1(nx, x, p, mx, xx, q, intpol, w, lw, iw, liw, ier)

    subroutine rgrd1 interpolates the values p(i) on the grid x(i) for i=1,...,nx onto q(ii) on the grid xx(ii),ii=1,...,mx.

    requirements

    x must be a strictly increasing grid and xx must be an increasing grid (see ier = 4). in addition the interval

    [xx(1),xx(mx)]
    

    must lie within the interval

    [x(1),x(nx)].
    

    extrapolation is not allowed (see ier=3). if these intervals are identical and the x and xx grids are UNIFORM then subroutine rgrd1u should be used in place of rgrd1.

    Arguments

    Type IntentOptional Attributes Name
    integer, intent(in) :: nx

    the integer dimension of the grid vector x and the dimension of p. nx > 1 if intpol = 1 or nx > 3 if intpol = 3 is required.

    real(kind=wp), intent(in), dimension(nx) :: x

    a real(wp) nx vector of strictly increasing values which defines the x grid on which p is given.

    real(kind=wp), intent(in), dimension(nx) :: p

    a real(wp) nx vector of values given on the x grid

    integer, intent(in) :: mx

    the integer dimension of the grid vector xx and the dimension of q. mx > 0 is required.

    real(kind=wp), intent(in), dimension(mx) :: xx

    a real(wp) mx vector of increasing values which defines the grid on which q is defined. xx(1) < x(1) or xx(mx) > x(nx) is not allowed (see ier = 3)

    real(kind=wp), intent(out) :: q(mx)

    a real(wp) mx vector of values on the xx grid which are interpolated from p on the x grid

    integer, intent(in) :: intpol

    an integer which sets linear or cubic interpolation as follows:

    Read more…
    real(kind=wp), intent(inout), dimension(lw) :: w

    a real(wp) work space of length at least lw which must be provided in the routine calling rgrd1

    integer, intent(in) :: lw

    the integer length of the real(wp) work space w. let

    Read more…
    integer, intent(inout), dimension(*) :: iw

    an integer work space of length at least liw which must be provided in the routine calling rgrd1

    integer, intent(in) :: liw

    the length of the integer work space iw. liw must be greater than or equal to mx.

    integer, intent(out) :: ier

    an integer error flag set as follows:

    Read more…
  • private subroutine rgrd2(nx, ny, x, y, p, mx, my, xx, yy, q, intpol, w, lw, iw, liw, ier)

    subroutine rgrd2 interpolates the values p(i,j) on the orthogonal grid (x(i),y(j)) for i=1,...,nx and j=1,...,ny onto q(ii,jj) on the orthogonal grid (xx(ii),yy(jj)) for ii=1,...,mx and jj=1,...,my.

    method

    linear or cubic interpolation is used (independently) in each direction (see argument intpol).

    requirements

    each of the x,y grids must be strictly montonically increasing and each of the xx,yy grids must be montonically increasing (see ier = 4). in addition the (X,Y) region

    [xx(1),xx(mx)] X [yy(1),yy(my)]
    

    must lie within the (X,Y) region

    [x(1),x(nx)] X [y(1),y(ny)].
    

    extrapolation is not allowed (see ier=3). if these (X,Y) regions are identical and the orthogonal grids are UNIFORM in each direction then subroutine rgrd2u should be used instead of rgrd2.

    Arguments

    Type IntentOptional Attributes Name
    integer, intent(in) :: nx

    the integer dimension of the grid vector x and the first dimension of p. nx > 1 if intpol(1) = 1 or nx > 3 if intpol(1) = 3 is required.

    integer, intent(in) :: ny

    the integer dimension of the grid vector y and the second dimension of p. ny > 1 if intpol(2) = 1 or ny > 3 if intpol(2) = 3 is required.

    real(kind=wp), intent(in) :: x(nx)

    a real(wp) nx vector of strictly increasing values which defines the x portion of the orthogonal grid on which p is given

    real(kind=wp), intent(in) :: y(ny)

    a real(wp) ny vector of strictly increasing values which defines the y portion of the orthogonal grid on which p is given

    real(kind=wp), intent(in) :: p(nx,ny)

    a real(wp) nx by ny array of values given on the orthogonal (x,y) grid

    integer, intent(in) :: mx

    the integer dimension of the grid vector xx and the first dimension of q. mx > 0 is required.

    integer, intent(in) :: my

    the integer dimension of the grid vector yy and the second dimension of q. my > 0 is required.

    real(kind=wp), intent(in) :: xx(mx)

    a real(wp) mx vector of increasing values which defines the x portion of the orthogonal grid on which q is defined. xx(1) < x(1) or xx(mx) > x(nx) is not allowed (see ier = 3)

    real(kind=wp), intent(in) :: yy(my)

    a real(wp) my vector of increasing values which defines the y portion of the orthogonal grid on which q is defined. yy(1) < y(1) or yy(my) > y(ny) is not allowed (see ier = 3)

    real(kind=wp), intent(out) :: q(mx,my)

    a real(wp) mx by my array of values on the (xx,yy) grid which are interpolated from p on the (x,y) grid

    integer, intent(in) :: intpol(2)

    an integer vector of dimension 2 which sets linear or cubic interpolation in the x,y directions as follows:

    Read more…
    real(kind=wp), intent(inout) :: w(lw)

    a real(wp) work space of length at least lw which must be provided in the routine calling rgrd2

    integer, intent(in) :: lw

    the integer length of the real(wp) work space w. let

    Read more…
    integer, intent(inout) :: iw(liw)

    an integer work space of length at least liw which must be provided in the routine calling rgrd2

    integer, intent(in) :: liw

    the integer length of the integer work space iw. liw must be at least mx+my

    integer, intent(out) :: ier

    an integer error flag set as follows:

    Read more…
  • private subroutine rgrd3(nx, ny, nz, x, y, z, p, mx, my, mz, xx, yy, zz, q, intpol, w, lw, iw, liw, ier)

    subroutine rgrd3 interpolates the values p(i,j,k) on the orthogonal grid (x(i),y(j),z(k)) for i=1,...,nx; j=1,...,ny; k=1,...,nz onto q(ii,jj,kk) on the orthogonal grid (xx(ii),yy(jj),zz(kk)) for ii=1,...,mx; jj=1,...,my; kk=1,...,mz.

    method

    linear or cubic interpolation is used (independently) in each direction (see argument intpol).

    requirements

    each of the x,y,z grids must be strictly montonically increasing and each of the xx,yy,zz grids must be montonically increasing (see ier = 4). in addition the (X,Y,Z) region

    [xx(1),xx(mx)] X [yy(1),yy(my)] X [zz(1),zz(mz)]
    

    must lie within the (X,Y,Z) region

    [x(1),x(nx)] X [y(1),y(ny)] X [z(1),z(nz)].
    

    extrapolation is not allowed (see ier=3). if these (X,Y,Z) regions are identical and the orthogonal grids are UNIFORM in each direction then subroutine rgrd3u should be used instead of rgrd3.

    Arguments

    Type IntentOptional Attributes Name
    integer, intent(in) :: nx

    the integer dimension of the grid vector x and the first dimension of p. nx > 1 if intpol(1) = 1 or nx > 3 if intpol(1) = 3 is required.

    integer, intent(in) :: ny

    the integer dimension of the grid vector y and the second dimension of p. ny > 1 if intpol(2) = 1 or ny > 3 if intpol(2) = 3 is required.

    integer, intent(in) :: nz

    the integer dimension of the grid vector z and the third dimension of p. nz > 1 if intpol(3) = 1 or nz > 3 if intpol(3) = 3 is required.

    real(kind=wp), intent(in) :: x(nx)

    a real(wp) nx vector of strictly increasing values which defines the x portion of the orthogonal grid on which p is given

    real(kind=wp), intent(in) :: y(ny)

    a real(wp) ny vector of strictly increasing values which defines the y portion of the orthogonal grid on which p is given

    real(kind=wp), intent(in) :: z(nz)

    a real(wp) nz vector of strictly increasing values which defines the z portion of the orthogonal grid on which p is given

    real(kind=wp), intent(in) :: p(nx,ny,nz)

    a real(wp) nx by ny by nz array of values given on the (x,y,z) grid

    integer, intent(in) :: mx

    the integer dimension of the grid vector xx and the first dimension of q. mx > 0 is required.

    integer, intent(in) :: my

    the integer dimension of the grid vector yy and the second dimension of q. my > 0 is required.

    integer, intent(in) :: mz

    the integer dimension of the grid vector zz and the third dimension of q. mz > 0 is required.

    real(kind=wp), intent(in) :: xx(mx)

    a real(wp) mx vector of increasing values which defines the x portion of the orthogonal grid on which q is defined. xx(1) < x(1) or xx(mx) > x(nx) is not allowed (see ier = 3)

    real(kind=wp), intent(in) :: yy(my)

    a real(wp) my vector of increasing values which defines the y portion of the orthogonal grid on which q is defined. yy(1) < y(1) or yy(my) > y(ny) is not allowed (see ier = 3)

    real(kind=wp), intent(in) :: zz(mz)

    a real(wp) mz vector of increasing values which defines the z portion of the orthogonal grid on which q is defined. zz(1) < z(1) or zz(mz) > z(nz) is not allowed (see ier = 3)

    real(kind=wp), intent(out) :: q(mx,my,mz)

    a real(wp) mx by my by mz array of values on the (xx,yy,zz) grid which are interpolated from p on the (x,y,z) grid

    integer, intent(in) :: intpol(3)

    an integer vector of dimension 3 which sets linear or cubic interpolation in each of the x,y,z directions as follows:

    Read more…
    real(kind=wp), intent(inout) :: w(lw)

    a real(wp) work space of length at least lw which must be provided in the routine calling rgrd3

    integer, intent(in) :: lw

    the integer length of the real(wp) work space w. let

    Read more…
    integer, intent(inout) :: iw(liw)

    an integer work space of length at least liw which must be provided in the routine calling rgrd3

    integer, intent(in) :: liw

    the integer length of the integer work space iw. liw must be at least mx+my+mz

    integer, intent(out) :: ier

    an integer error flag set as follows:

    Read more…
  • private subroutine rgrd4(nx, ny, nz, nt, x, y, z, t, p, mx, my, mz, mt, xx, yy, zz, tt, q, intpol, w, lw, iw, liw, ier)

    subroutine rgrd4 interpolates the values p(i,j,k,l) on the orthogonal grid (x(i),y(j),z(k),t(l)) for i=1,...,nx;j=1,...,ny;k=1,...,nz;l=1,...,nt onto q(ii,jj,kk,ll) on the orthogonal grid (xx(ii),yy(jj),zz(kk),tt(ll)) for ii=1,...,mx;jj=1,...,my;kk=1,...,mz;ll=1,...,mt

    method

    linear or cubic interpolation is used (independently) in each direction (see argument intpol).

    requirements

    each of the x,y,z,t grids must be strictly montonically increasing and each of the xx,yy,zz,tt grids must be montonically increasing (see ier = 4). in addition the (X,Y,Z,T) region of the q grid

    [xx(1),xx(mx)] X [yy(1),yy(my)] X [zz(1),zz(mz)] X [tt(1),tt(my)]
    

    must lie within the (X,Y,Z,T) region of the p grid

    [x(1),x(nx)] X [y(1),y(ny)] X [z(1),z(nz)] X [t(1),t(nt)].
    

    extrapolation is not allowed (see ier=3). if these (X,Y,Z,T) regions are identical and the orthogonal grids are UNIFORM in each direction then subroutine rgrd4u should be used instead of rgrd4.

    Arguments

    Type IntentOptional Attributes Name
    integer, intent(in) :: nx

    the integer dimension of the grid vector x and the first dimension of p. nx > 1 if intpol(1) = 1 or nx > 3 if intpol(1) = 3 is required.

    integer, intent(in) :: ny

    the integer dimension of the grid vector y and the second dimension of p. ny > 1 if intpol(2) = 1 or ny > 3 if intpol(2) = 3 is required.

    integer, intent(in) :: nz

    the integer dimension of the grid vector z and the third dimension of p. nz > 1 if intpol(3) = 1 or nz > 3 if intpol(3) = 3 is required.

    integer, intent(in) :: nt

    the integer dimension of the grid vector t and the fourth dimension of p. nt > 1 if intpol(4) = 1 or nt > 3 if intpol(4) = 3 is required.

    real(kind=wp), intent(in) :: x(nx)

    a real(wp) nx vector of strictly increasing values which defines the x portion of the orthogonal grid on which p is given

    real(kind=wp), intent(in) :: y(ny)

    a real(wp) ny vector of strictly increasing values which defines the y portion of the orthogonal grid on which p is given

    real(kind=wp), intent(in) :: z(nz)

    a real(wp) nz vector of strictly increasing values which defines the z portion of the orthogonal grid on which p is given

    real(kind=wp), intent(in) :: t(nt)

    a real(wp) nt vector of strictly increasing values which defines the t portion of the orthogonal grid on which p is given

    real(kind=wp), intent(in) :: p(nx,ny,nz,nt)

    a real(wp) nx by ny by nz by nt array of values given on the (x,y,z,t) grid

    integer, intent(in) :: mx

    the integer dimension of the grid vector xx and the first dimension of q. mx > 0 is required.

    integer, intent(in) :: my

    the integer dimension of the grid vector yy and the second dimension of q. my > 0 is required.

    integer, intent(in) :: mz

    the integer dimension of the grid vector zz and the third dimension of q. mz > 0 is required.

    integer, intent(in) :: mt

    the integer dimension of the grid vector tt and the fourth dimension of q. mt > 0 is required.

    real(kind=wp), intent(in) :: xx(mx)

    a real(wp) mx vector of increasing values which defines the x portion of the orthogonal grid on which q is defined. xx(1) < x(1) or xx(mx) > x(nx) is not allowed (see ier = 3)

    real(kind=wp), intent(in) :: yy(my)

    a real(wp) my vector of increasing values which defines the y portion of the orthogonal grid on which q is defined. yy(1) < y(1) or yy(my) > y(ny) is not allowed (see ier = 3)

    real(kind=wp), intent(in) :: zz(mz)

    a real(wp) mz vector of increasing values which defines the z portion of the orthogonal grid on which q is defined. zz(1) < z(1) or zz(mz) > z(nz) is not allowed (see ier = 3)

    real(kind=wp), intent(in) :: tt(mt)

    a real(wp) mt vector of increasing values which defines the t portion of the orthogonal grid on which q is defined. tt(1) < t(1) or tt(mt) > t(nt) is not allowed (see ier = 3)

    real(kind=wp), intent(out) :: q(mx,my,mz,mt)

    a real(wp) mx by my by mz by mt array of values on the (xx,yy,zz,tt) grid which are interpolated from p on the (x,y,z,t) grid

    integer, intent(in) :: intpol(4)

    an integer vector of dimension 4 which sets linear or cubic interpolation in each of the x,y,z,t directions as follows:

    Read more…
    real(kind=wp), intent(inout) :: w(lw)

    a real(wp) work space of length at least lw which must be provided in the routine calling rgrd4

    integer, intent(in) :: lw

    the integer length of the real(wp) work space w. let

    Read more…
    integer, intent(inout) :: iw(liw)

    an integer work space of length at least liw which must be provided in the routine calling rgrd4

    integer, intent(in) :: liw

    the integer length of the integer work space iw. liw must be at least mx+my+mz+mt

    integer, intent(out) :: ier

    an integer error flag set as follows:

    Read more…
  • private subroutine rgrd1u(nx, p, mx, q, intpol, w, lw, iw, liw, ier)

    subroutine rgrd1u interpolates the nx vector p onto the mx vector q. it is assumed that p and q are values on uniform nx and mx grids which subdivide the same interval (INCLUDING END POINTS). if p and q are values on nonuniform grids and/or if q is defined on a grid which lies within the p grid then subroutine rgrd1 should be used.

    method

    linear or cubic interpolation (see intpol) is used when the mx uniform grid is not a subgrid of the nx uniform grid (i.e., whenever mx-1 does not divide nx-1). q is set directly from p in the subgrid case.

    Arguments

    Type IntentOptional Attributes Name
    integer, intent(in) :: nx

    the integer dimension of p. nx > 1 if intpol = 1 or nx > 3 if intpol = 3 is required (see ier = 2).

    real(kind=wp), intent(in) :: p(nx)

    a real(wp) nx dimensioned vector of given values

    integer, intent(in) :: mx

    the integer dimension of q. mx > 1 is required (see ier = 1)

    real(kind=wp), intent(out), dimension(mx) :: q

    a real(wp) mx dimensioned vector of values which are interpolated from p.

    integer, intent(in) :: intpol

    an integer which sets linear or cubic interpolation as follows:

    Read more…
    real(kind=wp), intent(inout) :: w(lw)

    a real(wp) work space of length lw.

    integer, intent(in) :: lw

    the integer length of the work space w in the routine calling rgrd1u. if mx-1 divides nx-1 then the mx uniform grid is a subgrid of the nx uniform grid. in this case let lwmin = 1. otherwise let lwmin = mx if intpol = 1 or lwmin = mx if intpol = 3. then lw must be greater than or equal to lwmin (see ier=4).

    integer, intent(inout) :: iw(liw)

    an integer work space of length liw

    integer, intent(in) :: liw

    the integer length of the integer work space iw in the routine calling rgrd1u. liw must be greater than or equal to mx.

    integer, intent(out) :: ier

    an integer error flag set as follows:

    Read more…
  • private subroutine rgrd2u(nx, ny, p, mx, my, q, intpol, w, lw, iw, liw, ier)

    subroutine rgrd2u interpolates the nx by ny array p onto the mx by my array q. linear or cubic interpolation is used in each direction (see argument intpol). it is assumed that p and q are values on uniform nx by ny and mx by my grids superimposed on the same rectangle (INCLUDING BOUNDARIES). if p and q are values on nonuniform orthogonal grids and/or if the grid on which q is defined lies within the p grid then subroutine rgrd2 should be used.

    method

    linear or cubic interpolation (see intpol) is used in each direction for which the q grid is not a subgrid of the p grid. [the mx (my) uniform grid is a subgrid of the nx (ny) uniform grid if and only if mx-1 (my-1) divides nx-1 (ny-1)]. values are set directly without (the need for) interpolation in subgrid directions.

    Arguments

    Type IntentOptional Attributes Name
    integer, intent(in) :: nx

    the integer first dimension of p. nx > 1 if intpol(1) = 1 or nx > 3 if intpol(1) = 3 is required (see ier = 2).

    integer, intent(in) :: ny

    the integer second dimension of p. ny > 1 if intpol(2) = 1 or ny > 3 if intpol(2) = 3 is required (see ier = 2).

    real(kind=wp), intent(in) :: p(nx,ny)

    a real(wp) nx by ny array of given values

    integer, intent(in) :: mx

    the integer first dimension of q. mx > 1 is required (see ier = 1)

    integer, intent(in) :: my

    the integer second dimension of q. my > 1 is required (see ier = 1)

    real(kind=wp), intent(out) :: q(mx,my)

    a real(wp) mx by my array of values which are interpolated from p.

    integer, intent(in) :: intpol(2)

    an integer vector of dimension 2 which sets linear or cubic interpolation in each of the x,y directions as follows:

    Read more…
    real(kind=wp), intent(inout) :: w(lw)

    a real(wp) work space of length at least lw which must be provided in the routine calling rgrd2u

    integer, intent(in) :: lw

    the integer length of the work space w.

    Read more…
    integer, intent(inout) :: iw(liw)

    an integer work space of length at least liw which must be provided in the routine calling rgrd2u

    integer, intent(in) :: liw

    the integer length of the integer work space iw. liw must be greater than or equal to mx+my.

    integer, intent(out) :: ier

    an integer error flag set as follows:

    Read more…
  • private subroutine rgrd3u(nx, ny, nz, p, mx, my, mz, q, intpol, w, lw, iw, liw, ier)

    subroutine rgrd3u interpolates the nx by ny by nz array p onto the mx by my by mz array q. it is assumed that p and q are values on uniform nx by ny by nz and mx by my by mz grids which are superimposed on the same box region (INCLUDING BOUNDARIES). if p and q are values on nonuniform orthogonal grids and/or if the grid on which q is defined lies within the p grid then subroutine rgrd3 should be used.

    method

    linear or cubic interpolation (see intpol) is used in each direction for which the q grid is not a subgrid of the p grid. [the mx (my,mz) uniform grid is a subgrid of the nx (ny,nz) uniform grid if and only if mx-1 (my-1,nz-1) divides nx-1 (ny-1,nz-1)]. Values are set directly without (the need for) interpolation in subgrid directions.

    Arguments

    Type IntentOptional Attributes Name
    integer, intent(in) :: nx

    the integer first dimension of p. nx > 1 if intpol(1) = 1 or nx > 3 if intpol(1) = 3 is required (see ier = 2).

    integer, intent(in) :: ny

    the integer second dimension of p. ny > 1 if intpol(2) = 1 or ny > 3 if intpol(2) = 3 is required (see ier = 2).

    integer, intent(in) :: nz

    the integer third dimension of p. nz > 1 if intpol(3) = 1 or nz > 3 if intpol(3) = 3 is required (see ier = 2)

    real(kind=wp), intent(in) :: p(nx,ny,nz)

    a real(wp) nx by ny by nz array of given values

    integer, intent(in) :: mx

    the integer first dimension of q. mx > 1 is required (see ier = 1)

    integer, intent(in) :: my

    the integer second dimension of q. my > 1 is required (see ier = 1)

    integer, intent(in) :: mz

    the integer third dimension of q. mz > 1 is required (see ier = 1)

    real(kind=wp), intent(out) :: q(mx,my,mz)

    a real(wp) mx by my by mz array of values which are interpolated from p.

    integer, intent(in) :: intpol(3)

    an integer vector of dimension 3 which sets linear or cubic interpolation in each of the x,y,z directions as follows:

    Read more…
    real(kind=wp), intent(inout) :: w(lw)

    a real(wp) work space of length at least lw which must be provided in the routine calling rgrd3u

    integer, intent(in) :: lw

    the integer length of the real(wp) work space w.

    Read more…
    integer, intent(inout) :: iw(liw)

    an integer work space of length at least liw which must be provided in the routine calling rgrd3u

    integer, intent(in) :: liw

    the integer length of the integer work space iw. liw must be greater than or equal to mx+my+mz

    integer, intent(out) :: ier

    an integer error flag set as follows:

    Read more…
  • private subroutine rgrd4u(nx, ny, nz, nt, p, mx, my, mz, mt, q, intpol, w, lw, iw, liw, ier)

    subroutine rgrd4u interpolates the nx by ny by nz by nt array p onto the mx by my by mz by mt array q. it is assumed that p and q are values on uniform nx by ny by nz by nt and mx by my by mz by mt grids which are superimposed on the same box region (INCLUDING BOUNDARIES). if p and q are values on nonuniform orthogonal grids and/or if the grid on which q is defined lies within the p grid then subroutine rgrd4 should be used.

    method

    linear or cubic interpolation (see intpol) is used in each direction for which the q grid is not a subgrid of the p grid. [the mx (my,mz,mt) uniform grid is a subgrid of the nx (ny,nz,nt) uniform grid if and only if mx-1 (my-1,nz-1,nt-1) divides nx-1 (ny-1,nz-1,nt-1)]. Values are set directly without (the need for) interpolation in subgrid directions.

    Arguments

    Type IntentOptional Attributes Name
    integer, intent(in) :: nx

    the integer first dimension of p. nx > 1 if intpol(1) = 1 or nx > 3 if intpol(1) = 3 is required (see ier = 2).

    integer, intent(in) :: ny

    the integer second dimension of p. ny > 1 if intpol(2) = 1 or ny > 3 if intpol(2) = 3 is required (see ier = 2).

    integer, intent(in) :: nz

    the integer third dimension of p. nz > 1 if intpol(3) = 1 or nz > 3 if intpol(3) = 3 is required (see ier = 2)

    integer, intent(in) :: nt

    the integer fourth dimension of p. nt > 1 if intpol(4) = 1 or nt > 3 if intpol(4) = 3 is required (see ier=2)

    real(kind=wp), intent(in) :: p(nx,ny,nz,nt)

    a real(wp) nx by ny by nz by nt array of given values

    integer, intent(in) :: mx

    the integer first dimension of q. mx > 1 is required (see ier = 1)

    integer, intent(in) :: my

    the integer second dimension of q. my > 1 is required (see ier = 1)

    integer, intent(in) :: mz

    the integer third dimension of q. mz > 1 is required (see ier = 1)

    integer, intent(in) :: mt

    the integer fourth dimension of q. mt > 1 is required (see ier = 1)

    real(kind=wp), intent(out) :: q(mx,my,mz,mt)

    a real(wp) mx by my by mz by mt array of values which are interpolated from p.

    integer, intent(in) :: intpol(4)

    an integer vector of dimension 4 which sets linear or cubic interpolation in each of the x,y,z,t directions as follows:

    Read more…
    real(kind=wp), intent(inout) :: w(lw)

    a real(wp) work space of length at least lw which must be provided in the routine calling rgrd4u

    integer, intent(in) :: lw

    the integer length of the work space w.

    Read more…
    integer, intent(inout) :: iw(liw)

    an integer work space of length at least liw which must be provided in the routine calling rgrd4u

    integer, intent(in) :: liw

    the integer length of the integer work space iw. liw must be at least mx+my+mz+mt

    integer, intent(out) :: ier

    an integer error flag set as follows:

    Read more…
  • private subroutine rgrd1_wrapper(x, p, xx, q, intpol, ier)

    Wrapper to rgrd1. Allocates the work arrays internally.

    Arguments

    Type IntentOptional Attributes Name
    real(kind=wp), intent(in), dimension(:) :: x

    original x

    real(kind=wp), intent(in), dimension(:) :: p

    original p(x)

    real(kind=wp), intent(in), dimension(:) :: xx

    regridded xx

    real(kind=wp), intent(out), dimension(:) :: q

    regridded q(xx)

    integer, intent(in) :: intpol
    integer, intent(out) :: ier

    status code:

    Read more…
  • private subroutine rgrd2_wrapper(x, y, p, xx, yy, q, intpol, ier)

    Wrapper to rgrd2. Allocates the work arrays internally.

    Arguments

    Type IntentOptional Attributes Name
    real(kind=wp), intent(in), dimension(:) :: x

    original x

    real(kind=wp), intent(in), dimension(:) :: y

    original y

    real(kind=wp), intent(in), dimension(:,:) :: p

    original p(x,y)

    real(kind=wp), intent(in), dimension(:) :: xx

    regridded xx

    real(kind=wp), intent(in), dimension(:) :: yy

    regridded yy

    real(kind=wp), intent(out), dimension(:,:) :: q

    regridded q(xx,yy)

    integer, intent(in), dimension(2) :: intpol
    integer, intent(out) :: ier Read more…
  • private subroutine rgrd3_wrapper(x, y, z, p, xx, yy, zz, q, intpol, ier)

    Wrapper to rgrd3. Allocates the work arrays internally.

    Arguments

    Type IntentOptional Attributes Name
    real(kind=wp), intent(in), dimension(:) :: x

    original x

    real(kind=wp), intent(in), dimension(:) :: y

    original y

    real(kind=wp), intent(in), dimension(:) :: z

    original z

    real(kind=wp), intent(in), dimension(:,:,:) :: p

    original p(x,y,z)

    real(kind=wp), intent(in), dimension(:) :: xx

    regridded xx

    real(kind=wp), intent(in), dimension(:) :: yy

    regridded yy

    real(kind=wp), intent(in), dimension(:) :: zz

    regridded zz

    real(kind=wp), intent(out), dimension(:,:,:) :: q

    regridded q(xx,yy,zz)

    integer, intent(in), dimension(3) :: intpol
    integer, intent(out) :: ier Read more…
  • private subroutine rgrd4_wrapper(x, y, z, t, p, xx, yy, zz, tt, q, intpol, ier)

    Wrapper to rgrd4. Allocates the work arrays internally.

    Arguments

    Type IntentOptional Attributes Name
    real(kind=wp), intent(in), dimension(:) :: x

    original x

    real(kind=wp), intent(in), dimension(:) :: y

    original y

    real(kind=wp), intent(in), dimension(:) :: z

    original z

    real(kind=wp), intent(in), dimension(:) :: t

    original t

    real(kind=wp), intent(in), dimension(:,:,:,:) :: p

    original p(x,y,z,t)

    real(kind=wp), intent(in), dimension(:) :: xx

    regridded xx

    real(kind=wp), intent(in), dimension(:) :: yy

    regridded yy

    real(kind=wp), intent(in), dimension(:) :: zz

    regridded zz

    real(kind=wp), intent(in), dimension(:) :: tt

    regridded tt

    real(kind=wp), intent(out), dimension(:,:,:,:) :: q

    regridded q(xx,yy,zz,tt)

    integer, intent(in), dimension(4) :: intpol
    integer, intent(out) :: ier Read more…

Subroutines

private subroutine rgrd1_wrapper(x, p, xx, q, intpol, ier)

Wrapper to rgrd1. Allocates the work arrays internally.

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in), dimension(:) :: x

original x

real(kind=wp), intent(in), dimension(:) :: p

original p(x)

real(kind=wp), intent(in), dimension(:) :: xx

regridded xx

real(kind=wp), intent(out), dimension(:) :: q

regridded q(xx)

integer, intent(in) :: intpol
integer, intent(out) :: ier

status code:

Read more…

private subroutine rgrd2_wrapper(x, y, p, xx, yy, q, intpol, ier)

Wrapper to rgrd2. Allocates the work arrays internally.

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in), dimension(:) :: x

original x

real(kind=wp), intent(in), dimension(:) :: y

original y

real(kind=wp), intent(in), dimension(:,:) :: p

original p(x,y)

real(kind=wp), intent(in), dimension(:) :: xx

regridded xx

real(kind=wp), intent(in), dimension(:) :: yy

regridded yy

real(kind=wp), intent(out), dimension(:,:) :: q

regridded q(xx,yy)

integer, intent(in), dimension(2) :: intpol
integer, intent(out) :: ier Read more…

private subroutine rgrd3_wrapper(x, y, z, p, xx, yy, zz, q, intpol, ier)

Wrapper to rgrd3. Allocates the work arrays internally.

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in), dimension(:) :: x

original x

real(kind=wp), intent(in), dimension(:) :: y

original y

real(kind=wp), intent(in), dimension(:) :: z

original z

real(kind=wp), intent(in), dimension(:,:,:) :: p

original p(x,y,z)

real(kind=wp), intent(in), dimension(:) :: xx

regridded xx

real(kind=wp), intent(in), dimension(:) :: yy

regridded yy

real(kind=wp), intent(in), dimension(:) :: zz

regridded zz

real(kind=wp), intent(out), dimension(:,:,:) :: q

regridded q(xx,yy,zz)

integer, intent(in), dimension(3) :: intpol
integer, intent(out) :: ier Read more…

private subroutine rgrd4_wrapper(x, y, z, t, p, xx, yy, zz, tt, q, intpol, ier)

Wrapper to rgrd4. Allocates the work arrays internally.

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in), dimension(:) :: x

original x

real(kind=wp), intent(in), dimension(:) :: y

original y

real(kind=wp), intent(in), dimension(:) :: z

original z

real(kind=wp), intent(in), dimension(:) :: t

original t

real(kind=wp), intent(in), dimension(:,:,:,:) :: p

original p(x,y,z,t)

real(kind=wp), intent(in), dimension(:) :: xx

regridded xx

real(kind=wp), intent(in), dimension(:) :: yy

regridded yy

real(kind=wp), intent(in), dimension(:) :: zz

regridded zz

real(kind=wp), intent(in), dimension(:) :: tt

regridded tt

real(kind=wp), intent(out), dimension(:,:,:,:) :: q

regridded q(xx,yy,zz,tt)

integer, intent(in), dimension(4) :: intpol
integer, intent(out) :: ier Read more…

private subroutine rgrd1(nx, x, p, mx, xx, q, intpol, w, lw, iw, liw, ier)

subroutine rgrd1 interpolates the values p(i) on the grid x(i) for i=1,...,nx onto q(ii) on the grid xx(ii),ii=1,...,mx.

Read more…

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nx

the integer dimension of the grid vector x and the dimension of p. nx > 1 if intpol = 1 or nx > 3 if intpol = 3 is required.

real(kind=wp), intent(in), dimension(nx) :: x

a real(wp) nx vector of strictly increasing values which defines the x grid on which p is given.

real(kind=wp), intent(in), dimension(nx) :: p

a real(wp) nx vector of values given on the x grid

integer, intent(in) :: mx

the integer dimension of the grid vector xx and the dimension of q. mx > 0 is required.

real(kind=wp), intent(in), dimension(mx) :: xx

a real(wp) mx vector of increasing values which defines the grid on which q is defined. xx(1) < x(1) or xx(mx) > x(nx) is not allowed (see ier = 3)

real(kind=wp), intent(out) :: q(mx)

a real(wp) mx vector of values on the xx grid which are interpolated from p on the x grid

integer, intent(in) :: intpol

an integer which sets linear or cubic interpolation as follows:

Read more…
real(kind=wp), intent(inout), dimension(lw) :: w

a real(wp) work space of length at least lw which must be provided in the routine calling rgrd1

integer, intent(in) :: lw

the integer length of the real(wp) work space w. let

Read more…
integer, intent(inout), dimension(*) :: iw

an integer work space of length at least liw which must be provided in the routine calling rgrd1

integer, intent(in) :: liw

the length of the integer work space iw. liw must be greater than or equal to mx.

integer, intent(out) :: ier

an integer error flag set as follows:

Read more…

private subroutine lint1(nx, p, mx, q, ix, dx)

linearly interpolate p on x onto q on xx

Arguments

Type IntentOptional Attributes Name
integer :: nx
real(kind=wp) :: p(nx)
integer :: mx
real(kind=wp) :: q(mx)
integer :: ix(mx)
real(kind=wp) :: dx(mx)

private subroutine cubt1(nx, p, mx, q, ix, dxm, dx, dxp, dxpp)

cubically interpolate p on x to q on xx

Arguments

Type IntentOptional Attributes Name
integer :: nx
real(kind=wp) :: p(nx)
integer :: mx
real(kind=wp) :: q(mx)
integer :: ix(mx)
real(kind=wp) :: dxm(mx)
real(kind=wp) :: dx(mx)
real(kind=wp) :: dxp(mx)
real(kind=wp) :: dxpp(mx)

private subroutine linmx(nx, x, mx, xx, ix, dx)

set x grid pointers for xx grid and interpolation scale terms

Arguments

Type IntentOptional Attributes Name
integer :: nx
real(kind=wp) :: x(*)
integer :: mx
real(kind=wp) :: xx(*)
integer :: ix(*)
real(kind=wp) :: dx(*)

private subroutine cubnmx(nx, x, mx, xx, ix, dxm, dx, dxp, dxpp)

Arguments

Type IntentOptional Attributes Name
integer :: nx
real(kind=wp) :: x(*)
integer :: mx
real(kind=wp) :: xx(*)
integer :: ix(*)
real(kind=wp) :: dxm(*)
real(kind=wp) :: dx(*)
real(kind=wp) :: dxp(*)
real(kind=wp) :: dxpp(*)

private subroutine rgrd1u(nx, p, mx, q, intpol, w, lw, iw, liw, ier)

subroutine rgrd1u interpolates the nx vector p onto the mx vector q. it is assumed that p and q are values on uniform nx and mx grids which subdivide the same interval (INCLUDING END POINTS). if p and q are values on nonuniform grids and/or if q is defined on a grid which lies within the p grid then subroutine rgrd1 should be used.

Read more…

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nx

the integer dimension of p. nx > 1 if intpol = 1 or nx > 3 if intpol = 3 is required (see ier = 2).

real(kind=wp), intent(in) :: p(nx)

a real(wp) nx dimensioned vector of given values

integer, intent(in) :: mx

the integer dimension of q. mx > 1 is required (see ier = 1)

real(kind=wp), intent(out), dimension(mx) :: q

a real(wp) mx dimensioned vector of values which are interpolated from p.

integer, intent(in) :: intpol

an integer which sets linear or cubic interpolation as follows:

Read more…
real(kind=wp), intent(inout) :: w(lw)

a real(wp) work space of length lw.

integer, intent(in) :: lw

the integer length of the work space w in the routine calling rgrd1u. if mx-1 divides nx-1 then the mx uniform grid is a subgrid of the nx uniform grid. in this case let lwmin = 1. otherwise let lwmin = mx if intpol = 1 or lwmin = mx if intpol = 3. then lw must be greater than or equal to lwmin (see ier=4).

integer, intent(inout) :: iw(liw)

an integer work space of length liw

integer, intent(in) :: liw

the integer length of the integer work space iw in the routine calling rgrd1u. liw must be greater than or equal to mx.

integer, intent(out) :: ier

an integer error flag set as follows:

Read more…

private subroutine lint1u(nx, p, mx, q, ix, dx, inmx, isubx)

Arguments

Type IntentOptional Attributes Name
integer :: nx
real(kind=wp) :: p(nx)
integer :: mx
real(kind=wp) :: q(mx)
integer :: ix(mx)
real(kind=wp) :: dx(mx)
integer :: inmx
integer :: isubx

private subroutine cubt1u(nx, p, mx, q, ix, dxm, dx, dxp, dxpp, inmx, isubx)

Arguments

Type IntentOptional Attributes Name
integer :: nx
real(kind=wp) :: p(nx)
integer :: mx
real(kind=wp) :: q(mx)
integer :: ix(mx)
real(kind=wp) :: dxm(mx)
real(kind=wp) :: dx(mx)
real(kind=wp) :: dxp(mx)
real(kind=wp) :: dxpp(mx)
integer :: inmx
integer :: isubx

private subroutine linmxu(nx, mx, ix, dx)

set linear interpolation terms

Arguments

Type IntentOptional Attributes Name
integer :: nx
integer :: mx
integer :: ix(mx)
real(kind=wp) :: dx(mx)

private subroutine cubnmxu(nx, mx, ix, dxm, dx, dxp, dxpp)

set cubic interpolation terms

Arguments

Type IntentOptional Attributes Name
integer :: nx
integer :: mx
integer :: ix(mx)
real(kind=wp) :: dxm(mx)
real(kind=wp) :: dx(mx)
real(kind=wp) :: dxp(mx)
real(kind=wp) :: dxpp(mx)

private subroutine rgrd2(nx, ny, x, y, p, mx, my, xx, yy, q, intpol, w, lw, iw, liw, ier)

subroutine rgrd2 interpolates the values p(i,j) on the orthogonal grid (x(i),y(j)) for i=1,...,nx and j=1,...,ny onto q(ii,jj) on the orthogonal grid (xx(ii),yy(jj)) for ii=1,...,mx and jj=1,...,my.

Read more…

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nx

the integer dimension of the grid vector x and the first dimension of p. nx > 1 if intpol(1) = 1 or nx > 3 if intpol(1) = 3 is required.

integer, intent(in) :: ny

the integer dimension of the grid vector y and the second dimension of p. ny > 1 if intpol(2) = 1 or ny > 3 if intpol(2) = 3 is required.

real(kind=wp), intent(in) :: x(nx)

a real(wp) nx vector of strictly increasing values which defines the x portion of the orthogonal grid on which p is given

real(kind=wp), intent(in) :: y(ny)

a real(wp) ny vector of strictly increasing values which defines the y portion of the orthogonal grid on which p is given

real(kind=wp), intent(in) :: p(nx,ny)

a real(wp) nx by ny array of values given on the orthogonal (x,y) grid

integer, intent(in) :: mx

the integer dimension of the grid vector xx and the first dimension of q. mx > 0 is required.

integer, intent(in) :: my

the integer dimension of the grid vector yy and the second dimension of q. my > 0 is required.

real(kind=wp), intent(in) :: xx(mx)

a real(wp) mx vector of increasing values which defines the x portion of the orthogonal grid on which q is defined. xx(1) < x(1) or xx(mx) > x(nx) is not allowed (see ier = 3)

real(kind=wp), intent(in) :: yy(my)

a real(wp) my vector of increasing values which defines the y portion of the orthogonal grid on which q is defined. yy(1) < y(1) or yy(my) > y(ny) is not allowed (see ier = 3)

real(kind=wp), intent(out) :: q(mx,my)

a real(wp) mx by my array of values on the (xx,yy) grid which are interpolated from p on the (x,y) grid

integer, intent(in) :: intpol(2)

an integer vector of dimension 2 which sets linear or cubic interpolation in the x,y directions as follows:

Read more…
real(kind=wp), intent(inout) :: w(lw)

a real(wp) work space of length at least lw which must be provided in the routine calling rgrd2

integer, intent(in) :: lw

the integer length of the real(wp) work space w. let

Read more…
integer, intent(inout) :: iw(liw)

an integer work space of length at least liw which must be provided in the routine calling rgrd2

integer, intent(in) :: liw

the integer length of the integer work space iw. liw must be at least mx+my

integer, intent(out) :: ier

an integer error flag set as follows:

Read more…

private subroutine lint2(nx, ny, p, mx, my, q, intpol, jy, dy, pj, pjp, ix, dxm, dx, dxp, dxpp)

linearly interpolate in y

Arguments

Type IntentOptional Attributes Name
integer :: nx
integer :: ny
real(kind=wp) :: p(nx,ny)
integer :: mx
integer :: my
real(kind=wp) :: q(mx,my)
integer :: intpol(2)
integer :: jy(my)
real(kind=wp) :: dy(my)
real(kind=wp) :: pj(mx)
real(kind=wp) :: pjp(mx)
integer :: ix(mx)
real(kind=wp) :: dxm(mx)
real(kind=wp) :: dx(mx)
real(kind=wp) :: dxp(mx)
real(kind=wp) :: dxpp(mx)

private subroutine cubt2(nx, ny, p, mx, my, q, intpol, jy, dym, dy, dyp, dypp, pjm, pj, pjp, pjpp, ix, dxm, dx, dxp, dxpp)

Arguments

Type IntentOptional Attributes Name
integer :: nx
integer :: ny
real(kind=wp) :: p(nx,ny)
integer :: mx
integer :: my
real(kind=wp) :: q(mx,my)
integer :: intpol(2)
integer :: jy(my)
real(kind=wp) :: dym(my)
real(kind=wp) :: dy(my)
real(kind=wp) :: dyp(my)
real(kind=wp) :: dypp(my)
real(kind=wp) :: pjm(mx)
real(kind=wp) :: pj(mx)
real(kind=wp) :: pjp(mx)
real(kind=wp) :: pjpp(mx)
integer :: ix(mx)
real(kind=wp) :: dxm(mx)
real(kind=wp) :: dx(mx)
real(kind=wp) :: dxp(mx)
real(kind=wp) :: dxpp(mx)

private subroutine rgrd2u(nx, ny, p, mx, my, q, intpol, w, lw, iw, liw, ier)

subroutine rgrd2u interpolates the nx by ny array p onto the mx by my array q. linear or cubic interpolation is used in each direction (see argument intpol). it is assumed that p and q are values on uniform nx by ny and mx by my grids superimposed on the same rectangle (INCLUDING BOUNDARIES). if p and q are values on nonuniform orthogonal grids and/or if the grid on which q is defined lies within the p grid then subroutine rgrd2 should be used.

Read more…

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nx

the integer first dimension of p. nx > 1 if intpol(1) = 1 or nx > 3 if intpol(1) = 3 is required (see ier = 2).

integer, intent(in) :: ny

the integer second dimension of p. ny > 1 if intpol(2) = 1 or ny > 3 if intpol(2) = 3 is required (see ier = 2).

real(kind=wp), intent(in) :: p(nx,ny)

a real(wp) nx by ny array of given values

integer, intent(in) :: mx

the integer first dimension of q. mx > 1 is required (see ier = 1)

integer, intent(in) :: my

the integer second dimension of q. my > 1 is required (see ier = 1)

real(kind=wp), intent(out) :: q(mx,my)

a real(wp) mx by my array of values which are interpolated from p.

integer, intent(in) :: intpol(2)

an integer vector of dimension 2 which sets linear or cubic interpolation in each of the x,y directions as follows:

Read more…
real(kind=wp), intent(inout) :: w(lw)

a real(wp) work space of length at least lw which must be provided in the routine calling rgrd2u

integer, intent(in) :: lw

the integer length of the work space w.

Read more…
integer, intent(inout) :: iw(liw)

an integer work space of length at least liw which must be provided in the routine calling rgrd2u

integer, intent(in) :: liw

the integer length of the integer work space iw. liw must be greater than or equal to mx+my.

integer, intent(out) :: ier

an integer error flag set as follows:

Read more…

private subroutine lint2u(nx, ny, p, mx, my, q, intpol, jy, dy, pj, pjp, ix, dxm, dx, dxp, dxpp, inmx, jnmy, isubx, jsuby)

linearly interpolate p onto q in y

Arguments

Type IntentOptional Attributes Name
integer :: nx
integer :: ny
real(kind=wp) :: p(nx,ny)
integer :: mx
integer :: my
real(kind=wp) :: q(mx,my)
integer :: intpol(2)
integer :: jy(my)
real(kind=wp) :: dy(my)
real(kind=wp) :: pj(mx)
real(kind=wp) :: pjp(mx)
integer :: ix(mx)
real(kind=wp) :: dxm(mx)
real(kind=wp) :: dx(mx)
real(kind=wp) :: dxp(mx)
real(kind=wp) :: dxpp(mx)
integer :: inmx
integer :: jnmy
integer :: isubx
integer :: jsuby

private subroutine cubt2u(nx, ny, p, mx, my, q, intpol, jy, dym, dy, dyp, dypp, pjm, pj, pjp, pjpp, ix, dxm, dx, dxp, dxpp, inmx, jnmy, isubx, jsuby)

cubically interpolate p onto q in y

Arguments

Type IntentOptional Attributes Name
integer :: nx
integer :: ny
real(kind=wp) :: p(nx,ny)
integer :: mx
integer :: my
real(kind=wp) :: q(mx,my)
integer :: intpol(2)
integer :: jy(my)
real(kind=wp) :: dym(my)
real(kind=wp) :: dy(my)
real(kind=wp) :: dyp(my)
real(kind=wp) :: dypp(my)
real(kind=wp) :: pjm(mx)
real(kind=wp) :: pj(mx)
real(kind=wp) :: pjp(mx)
real(kind=wp) :: pjpp(mx)
integer :: ix(mx)
real(kind=wp) :: dxm(mx)
real(kind=wp) :: dx(mx)
real(kind=wp) :: dxp(mx)
real(kind=wp) :: dxpp(mx)
integer :: inmx
integer :: jnmy
integer :: isubx
integer :: jsuby

private subroutine rgrd3(nx, ny, nz, x, y, z, p, mx, my, mz, xx, yy, zz, q, intpol, w, lw, iw, liw, ier)

subroutine rgrd3 interpolates the values p(i,j,k) on the orthogonal grid (x(i),y(j),z(k)) for i=1,...,nx; j=1,...,ny; k=1,...,nz onto q(ii,jj,kk) on the orthogonal grid (xx(ii),yy(jj),zz(kk)) for ii=1,...,mx; jj=1,...,my; kk=1,...,mz.

Read more…

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nx

the integer dimension of the grid vector x and the first dimension of p. nx > 1 if intpol(1) = 1 or nx > 3 if intpol(1) = 3 is required.

integer, intent(in) :: ny

the integer dimension of the grid vector y and the second dimension of p. ny > 1 if intpol(2) = 1 or ny > 3 if intpol(2) = 3 is required.

integer, intent(in) :: nz

the integer dimension of the grid vector z and the third dimension of p. nz > 1 if intpol(3) = 1 or nz > 3 if intpol(3) = 3 is required.

real(kind=wp), intent(in) :: x(nx)

a real(wp) nx vector of strictly increasing values which defines the x portion of the orthogonal grid on which p is given

real(kind=wp), intent(in) :: y(ny)

a real(wp) ny vector of strictly increasing values which defines the y portion of the orthogonal grid on which p is given

real(kind=wp), intent(in) :: z(nz)

a real(wp) nz vector of strictly increasing values which defines the z portion of the orthogonal grid on which p is given

real(kind=wp), intent(in) :: p(nx,ny,nz)

a real(wp) nx by ny by nz array of values given on the (x,y,z) grid

integer, intent(in) :: mx

the integer dimension of the grid vector xx and the first dimension of q. mx > 0 is required.

integer, intent(in) :: my

the integer dimension of the grid vector yy and the second dimension of q. my > 0 is required.

integer, intent(in) :: mz

the integer dimension of the grid vector zz and the third dimension of q. mz > 0 is required.

real(kind=wp), intent(in) :: xx(mx)

a real(wp) mx vector of increasing values which defines the x portion of the orthogonal grid on which q is defined. xx(1) < x(1) or xx(mx) > x(nx) is not allowed (see ier = 3)

real(kind=wp), intent(in) :: yy(my)

a real(wp) my vector of increasing values which defines the y portion of the orthogonal grid on which q is defined. yy(1) < y(1) or yy(my) > y(ny) is not allowed (see ier = 3)

real(kind=wp), intent(in) :: zz(mz)

a real(wp) mz vector of increasing values which defines the z portion of the orthogonal grid on which q is defined. zz(1) < z(1) or zz(mz) > z(nz) is not allowed (see ier = 3)

real(kind=wp), intent(out) :: q(mx,my,mz)

a real(wp) mx by my by mz array of values on the (xx,yy,zz) grid which are interpolated from p on the (x,y,z) grid

integer, intent(in) :: intpol(3)

an integer vector of dimension 3 which sets linear or cubic interpolation in each of the x,y,z directions as follows:

Read more…
real(kind=wp), intent(inout) :: w(lw)

a real(wp) work space of length at least lw which must be provided in the routine calling rgrd3

integer, intent(in) :: lw

the integer length of the real(wp) work space w. let

Read more…
integer, intent(inout) :: iw(liw)

an integer work space of length at least liw which must be provided in the routine calling rgrd3

integer, intent(in) :: liw

the integer length of the integer work space iw. liw must be at least mx+my+mz

integer, intent(out) :: ier

an integer error flag set as follows:

Read more…

private subroutine lint3(nx, ny, nz, p, mx, my, mxmy, mz, q, intpol, kz, dz, pk, pkp, jy, dym, dy, dyp, dypp, pjm, pj, pjp, pjpp, ix, dxm, dx, dxp, dxpp)

linearly interpolate in z direction

Arguments

Type IntentOptional Attributes Name
integer :: nx
integer :: ny
integer :: nz
real(kind=wp) :: p(nx,ny,nz)
integer :: mx
integer :: my
integer :: mxmy
integer :: mz
real(kind=wp) :: q(mxmy,mz)
integer :: intpol(3)
integer :: kz(mz)
real(kind=wp) :: dz(mz)
real(kind=wp) :: pk(mxmy)
real(kind=wp) :: pkp(mxmy)
integer :: jy(my)
real(kind=wp) :: dym(my)
real(kind=wp) :: dy(my)
real(kind=wp) :: dyp(my)
real(kind=wp) :: dypp(my)
real(kind=wp) :: pjm(mx)
real(kind=wp) :: pj(mx)
real(kind=wp) :: pjp(mx)
real(kind=wp) :: pjpp(mx)
integer :: ix(mx)
real(kind=wp) :: dxm(mx)
real(kind=wp) :: dx(mx)
real(kind=wp) :: dxp(mx)
real(kind=wp) :: dxpp(mx)

private subroutine cubt3(nx, ny, nz, p, mx, my, mxmy, mz, q, intpol, kz, dzm, dz, dzp, dzpp, pkm, pk, pkp, pkpp, jy, dym, dy, dyp, dypp, pjm, pj, pjp, pjpp, ix, dxm, dx, dxp, dxpp)

cubically interpolate in z

Arguments

Type IntentOptional Attributes Name
integer :: nx
integer :: ny
integer :: nz
real(kind=wp) :: p(nx,ny,nz)
integer :: mx
integer :: my
integer :: mxmy
integer :: mz
real(kind=wp) :: q(mxmy,mz)
integer :: intpol(3)
integer :: kz(mz)
real(kind=wp) :: dzm(mz)
real(kind=wp) :: dz(mz)
real(kind=wp) :: dzp(mz)
real(kind=wp) :: dzpp(mz)
real(kind=wp) :: pkm(mxmy)
real(kind=wp) :: pk(mxmy)
real(kind=wp) :: pkp(mxmy)
real(kind=wp) :: pkpp(mxmy)
integer :: jy(my)
real(kind=wp) :: dym(my)
real(kind=wp) :: dy(my)
real(kind=wp) :: dyp(my)
real(kind=wp) :: dypp(my)
real(kind=wp) :: pjm(mx)
real(kind=wp) :: pj(mx)
real(kind=wp) :: pjp(mx)
real(kind=wp) :: pjpp(mx)
integer :: ix(mx)
real(kind=wp) :: dxm(mx)
real(kind=wp) :: dx(mx)
real(kind=wp) :: dxp(mx)
real(kind=wp) :: dxpp(mx)

private subroutine rgrd3u(nx, ny, nz, p, mx, my, mz, q, intpol, w, lw, iw, liw, ier)

subroutine rgrd3u interpolates the nx by ny by nz array p onto the mx by my by mz array q. it is assumed that p and q are values on uniform nx by ny by nz and mx by my by mz grids which are superimposed on the same box region (INCLUDING BOUNDARIES). if p and q are values on nonuniform orthogonal grids and/or if the grid on which q is defined lies within the p grid then subroutine rgrd3 should be used.

Read more…

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nx

the integer first dimension of p. nx > 1 if intpol(1) = 1 or nx > 3 if intpol(1) = 3 is required (see ier = 2).

integer, intent(in) :: ny

the integer second dimension of p. ny > 1 if intpol(2) = 1 or ny > 3 if intpol(2) = 3 is required (see ier = 2).

integer, intent(in) :: nz

the integer third dimension of p. nz > 1 if intpol(3) = 1 or nz > 3 if intpol(3) = 3 is required (see ier = 2)

real(kind=wp), intent(in) :: p(nx,ny,nz)

a real(wp) nx by ny by nz array of given values

integer, intent(in) :: mx

the integer first dimension of q. mx > 1 is required (see ier = 1)

integer, intent(in) :: my

the integer second dimension of q. my > 1 is required (see ier = 1)

integer, intent(in) :: mz

the integer third dimension of q. mz > 1 is required (see ier = 1)

real(kind=wp), intent(out) :: q(mx,my,mz)

a real(wp) mx by my by mz array of values which are interpolated from p.

integer, intent(in) :: intpol(3)

an integer vector of dimension 3 which sets linear or cubic interpolation in each of the x,y,z directions as follows:

Read more…
real(kind=wp), intent(inout) :: w(lw)

a real(wp) work space of length at least lw which must be provided in the routine calling rgrd3u

integer, intent(in) :: lw

the integer length of the real(wp) work space w.

Read more…
integer, intent(inout) :: iw(liw)

an integer work space of length at least liw which must be provided in the routine calling rgrd3u

integer, intent(in) :: liw

the integer length of the integer work space iw. liw must be greater than or equal to mx+my+mz

integer, intent(out) :: ier

an integer error flag set as follows:

Read more…

private subroutine lint3u(nx, ny, nz, p, mx, my, mxmy, mz, q, intpol, kz, dz, pk, pkp, jy, dym, dy, dyp, dypp, pjm, pj, pjp, pjpp, ix, dxm, dx, dxp, dxpp, inmx, jnmy, knmz, isubx, jsuby, ksubz)

linearly interpolate in z direction

Arguments

Type IntentOptional Attributes Name
integer :: nx
integer :: ny
integer :: nz
real(kind=wp) :: p(nx,ny,nz)
integer :: mx
integer :: my
integer :: mxmy
integer :: mz
real(kind=wp) :: q(mxmy,mz)
integer :: intpol(3)
integer :: kz(mz)
real(kind=wp) :: dz(mz)
real(kind=wp) :: pk(mxmy)
real(kind=wp) :: pkp(mxmy)
integer :: jy(my)
real(kind=wp) :: dym(my)
real(kind=wp) :: dy(my)
real(kind=wp) :: dyp(my)
real(kind=wp) :: dypp(my)
real(kind=wp) :: pjm(mx)
real(kind=wp) :: pj(mx)
real(kind=wp) :: pjp(mx)
real(kind=wp) :: pjpp(mx)
integer :: ix(mx)
real(kind=wp) :: dxm(mx)
real(kind=wp) :: dx(mx)
real(kind=wp) :: dxp(mx)
real(kind=wp) :: dxpp(mx)
integer :: inmx
integer :: jnmy
integer :: knmz
integer :: isubx
integer :: jsuby
integer :: ksubz

private subroutine cubt3u(nx, ny, nz, p, mx, my, mxmy, mz, q, intpol, kz, dzm, dz, dzp, dzpp, pkm, pk, pkp, pkpp, jy, dym, dy, dyp, dypp, pjm, pj, pjp, pjpp, ix, dxm, dx, dxp, dxpp, inmx, jnmy, knmz, isubx, jsuby, ksubz)

cubically interpolate in z

Arguments

Type IntentOptional Attributes Name
integer :: nx
integer :: ny
integer :: nz
real(kind=wp) :: p(nx,ny,nz)
integer :: mx
integer :: my
integer :: mxmy
integer :: mz
real(kind=wp) :: q(mxmy,mz)
integer :: intpol(3)
integer :: kz(mz)
real(kind=wp) :: dzm(mz)
real(kind=wp) :: dz(mz)
real(kind=wp) :: dzp(mz)
real(kind=wp) :: dzpp(mz)
real(kind=wp) :: pkm(mxmy)
real(kind=wp) :: pk(mxmy)
real(kind=wp) :: pkp(mxmy)
real(kind=wp) :: pkpp(mxmy)
integer :: jy(my)
real(kind=wp) :: dym(my)
real(kind=wp) :: dy(my)
real(kind=wp) :: dyp(my)
real(kind=wp) :: dypp(my)
real(kind=wp) :: pjm(mx)
real(kind=wp) :: pj(mx)
real(kind=wp) :: pjp(mx)
real(kind=wp) :: pjpp(mx)
integer :: ix(mx)
real(kind=wp) :: dxm(mx)
real(kind=wp) :: dx(mx)
real(kind=wp) :: dxp(mx)
real(kind=wp) :: dxpp(mx)
integer :: inmx
integer :: jnmy
integer :: knmz
integer :: isubx
integer :: jsuby
integer :: ksubz

private subroutine rgrd4(nx, ny, nz, nt, x, y, z, t, p, mx, my, mz, mt, xx, yy, zz, tt, q, intpol, w, lw, iw, liw, ier)

subroutine rgrd4 interpolates the values p(i,j,k,l) on the orthogonal grid (x(i),y(j),z(k),t(l)) for i=1,...,nx;j=1,...,ny;k=1,...,nz;l=1,...,nt onto q(ii,jj,kk,ll) on the orthogonal grid (xx(ii),yy(jj),zz(kk),tt(ll)) for ii=1,...,mx;jj=1,...,my;kk=1,...,mz;ll=1,...,mt

Read more…

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nx

the integer dimension of the grid vector x and the first dimension of p. nx > 1 if intpol(1) = 1 or nx > 3 if intpol(1) = 3 is required.

integer, intent(in) :: ny

the integer dimension of the grid vector y and the second dimension of p. ny > 1 if intpol(2) = 1 or ny > 3 if intpol(2) = 3 is required.

integer, intent(in) :: nz

the integer dimension of the grid vector z and the third dimension of p. nz > 1 if intpol(3) = 1 or nz > 3 if intpol(3) = 3 is required.

integer, intent(in) :: nt

the integer dimension of the grid vector t and the fourth dimension of p. nt > 1 if intpol(4) = 1 or nt > 3 if intpol(4) = 3 is required.

real(kind=wp), intent(in) :: x(nx)

a real(wp) nx vector of strictly increasing values which defines the x portion of the orthogonal grid on which p is given

real(kind=wp), intent(in) :: y(ny)

a real(wp) ny vector of strictly increasing values which defines the y portion of the orthogonal grid on which p is given

real(kind=wp), intent(in) :: z(nz)

a real(wp) nz vector of strictly increasing values which defines the z portion of the orthogonal grid on which p is given

real(kind=wp), intent(in) :: t(nt)

a real(wp) nt vector of strictly increasing values which defines the t portion of the orthogonal grid on which p is given

real(kind=wp), intent(in) :: p(nx,ny,nz,nt)

a real(wp) nx by ny by nz by nt array of values given on the (x,y,z,t) grid

integer, intent(in) :: mx

the integer dimension of the grid vector xx and the first dimension of q. mx > 0 is required.

integer, intent(in) :: my

the integer dimension of the grid vector yy and the second dimension of q. my > 0 is required.

integer, intent(in) :: mz

the integer dimension of the grid vector zz and the third dimension of q. mz > 0 is required.

integer, intent(in) :: mt

the integer dimension of the grid vector tt and the fourth dimension of q. mt > 0 is required.

real(kind=wp), intent(in) :: xx(mx)

a real(wp) mx vector of increasing values which defines the x portion of the orthogonal grid on which q is defined. xx(1) < x(1) or xx(mx) > x(nx) is not allowed (see ier = 3)

real(kind=wp), intent(in) :: yy(my)

a real(wp) my vector of increasing values which defines the y portion of the orthogonal grid on which q is defined. yy(1) < y(1) or yy(my) > y(ny) is not allowed (see ier = 3)

real(kind=wp), intent(in) :: zz(mz)

a real(wp) mz vector of increasing values which defines the z portion of the orthogonal grid on which q is defined. zz(1) < z(1) or zz(mz) > z(nz) is not allowed (see ier = 3)

real(kind=wp), intent(in) :: tt(mt)

a real(wp) mt vector of increasing values which defines the t portion of the orthogonal grid on which q is defined. tt(1) < t(1) or tt(mt) > t(nt) is not allowed (see ier = 3)

real(kind=wp), intent(out) :: q(mx,my,mz,mt)

a real(wp) mx by my by mz by mt array of values on the (xx,yy,zz,tt) grid which are interpolated from p on the (x,y,z,t) grid

integer, intent(in) :: intpol(4)

an integer vector of dimension 4 which sets linear or cubic interpolation in each of the x,y,z,t directions as follows:

Read more…
real(kind=wp), intent(inout) :: w(lw)

a real(wp) work space of length at least lw which must be provided in the routine calling rgrd4

integer, intent(in) :: lw

the integer length of the real(wp) work space w. let

Read more…
integer, intent(inout) :: iw(liw)

an integer work space of length at least liw which must be provided in the routine calling rgrd4

integer, intent(in) :: liw

the integer length of the integer work space iw. liw must be at least mx+my+mz+mt

integer, intent(out) :: ier

an integer error flag set as follows:

Read more…

private subroutine lint4(nx, ny, nz, nt, p, mx, my, mz, mt, mxmy, mxmymz, q, intpol, lt, dt, pt, ptp, kz, dzm, dz, dzp, dzpp, pkm, pk, pkp, pkpp, jy, dym, dy, dyp, dypp, pjm, pj, pjp, pjpp, ix, dxm, dx, dxp, dxpp)

linearly interpolate in t direction

Arguments

Type IntentOptional Attributes Name
integer :: nx
integer :: ny
integer :: nz
integer :: nt
real(kind=wp) :: p(nx,ny,nz,nt)
integer :: mx
integer :: my
integer :: mz
integer :: mt
integer :: mxmy
integer :: mxmymz
real(kind=wp) :: q(mxmymz,mt)
integer :: intpol(4)
integer :: lt(mt)
real(kind=wp) :: dt(mt)
real(kind=wp) :: pt(mxmymz)
real(kind=wp) :: ptp(mxmymz)
integer :: kz(mz)
real(kind=wp) :: dzm(mz)
real(kind=wp) :: dz(mz)
real(kind=wp) :: dzp(mz)
real(kind=wp) :: dzpp(mz)
real(kind=wp) :: pkm(mxmy)
real(kind=wp) :: pk(mxmy)
real(kind=wp) :: pkp(mxmy)
real(kind=wp) :: pkpp(mxmy)
integer :: jy(my)
real(kind=wp) :: dym(my)
real(kind=wp) :: dy(my)
real(kind=wp) :: dyp(my)
real(kind=wp) :: dypp(my)
real(kind=wp) :: pjm(mx)
real(kind=wp) :: pj(mx)
real(kind=wp) :: pjp(mx)
real(kind=wp) :: pjpp(mx)
integer :: ix(mx)
real(kind=wp) :: dxm(mx)
real(kind=wp) :: dx(mx)
real(kind=wp) :: dxp(mx)
real(kind=wp) :: dxpp(mx)

private subroutine cubt4(nx, ny, nz, nt, p, mx, my, mz, mt, mxmy, mxmymz, q, intpol, lt, dtm, dt, dtp, dtpp, ptm, pt, ptp, ptpp, kz, dzm, dz, dzp, dzpp, pkm, pk, pkp, pkpp, jy, dym, dy, dyp, dypp, pjm, pj, pjp, pjpp, ix, dxm, dx, dxp, dxpp)

cubically interpolate in t

Arguments

Type IntentOptional Attributes Name
integer :: nx
integer :: ny
integer :: nz
integer :: nt
real(kind=wp) :: p(nx,ny,nz,nt)
integer :: mx
integer :: my
integer :: mz
integer :: mt
integer :: mxmy
integer :: mxmymz
real(kind=wp) :: q(mxmymz,mt)
integer :: intpol(4)
integer :: lt(mt)
real(kind=wp) :: dtm(mt)
real(kind=wp) :: dt(mt)
real(kind=wp) :: dtp(mt)
real(kind=wp) :: dtpp(mt)
real(kind=wp) :: ptm(mxmymz)
real(kind=wp) :: pt(mxmymz)
real(kind=wp) :: ptp(mxmymz)
real(kind=wp) :: ptpp(mxmymz)
integer :: kz(mz)
real(kind=wp) :: dzm(mz)
real(kind=wp) :: dz(mz)
real(kind=wp) :: dzp(mz)
real(kind=wp) :: dzpp(mz)
real(kind=wp) :: pkm(mxmy)
real(kind=wp) :: pk(mxmy)
real(kind=wp) :: pkp(mxmy)
real(kind=wp) :: pkpp(mxmy)
integer :: jy(my)
real(kind=wp) :: dym(my)
real(kind=wp) :: dy(my)
real(kind=wp) :: dyp(my)
real(kind=wp) :: dypp(my)
real(kind=wp) :: pjm(mx)
real(kind=wp) :: pj(mx)
real(kind=wp) :: pjp(mx)
real(kind=wp) :: pjpp(mx)
integer :: ix(mx)
real(kind=wp) :: dxm(mx)
real(kind=wp) :: dx(mx)
real(kind=wp) :: dxp(mx)
real(kind=wp) :: dxpp(mx)

private subroutine rgrd4u(nx, ny, nz, nt, p, mx, my, mz, mt, q, intpol, w, lw, iw, liw, ier)

subroutine rgrd4u interpolates the nx by ny by nz by nt array p onto the mx by my by mz by mt array q. it is assumed that p and q are values on uniform nx by ny by nz by nt and mx by my by mz by mt grids which are superimposed on the same box region (INCLUDING BOUNDARIES). if p and q are values on nonuniform orthogonal grids and/or if the grid on which q is defined lies within the p grid then subroutine rgrd4 should be used.

Read more…

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nx

the integer first dimension of p. nx > 1 if intpol(1) = 1 or nx > 3 if intpol(1) = 3 is required (see ier = 2).

integer, intent(in) :: ny

the integer second dimension of p. ny > 1 if intpol(2) = 1 or ny > 3 if intpol(2) = 3 is required (see ier = 2).

integer, intent(in) :: nz

the integer third dimension of p. nz > 1 if intpol(3) = 1 or nz > 3 if intpol(3) = 3 is required (see ier = 2)

integer, intent(in) :: nt

the integer fourth dimension of p. nt > 1 if intpol(4) = 1 or nt > 3 if intpol(4) = 3 is required (see ier=2)

real(kind=wp), intent(in) :: p(nx,ny,nz,nt)

a real(wp) nx by ny by nz by nt array of given values

integer, intent(in) :: mx

the integer first dimension of q. mx > 1 is required (see ier = 1)

integer, intent(in) :: my

the integer second dimension of q. my > 1 is required (see ier = 1)

integer, intent(in) :: mz

the integer third dimension of q. mz > 1 is required (see ier = 1)

integer, intent(in) :: mt

the integer fourth dimension of q. mt > 1 is required (see ier = 1)

real(kind=wp), intent(out) :: q(mx,my,mz,mt)

a real(wp) mx by my by mz by mt array of values which are interpolated from p.

integer, intent(in) :: intpol(4)

an integer vector of dimension 4 which sets linear or cubic interpolation in each of the x,y,z,t directions as follows:

Read more…
real(kind=wp), intent(inout) :: w(lw)

a real(wp) work space of length at least lw which must be provided in the routine calling rgrd4u

integer, intent(in) :: lw

the integer length of the work space w.

Read more…
integer, intent(inout) :: iw(liw)

an integer work space of length at least liw which must be provided in the routine calling rgrd4u

integer, intent(in) :: liw

the integer length of the integer work space iw. liw must be at least mx+my+mz+mt

integer, intent(out) :: ier

an integer error flag set as follows:

Read more…

private subroutine lint4u(nx, ny, nz, nt, p, mx, my, mz, mt, mxmy, mxmymz, q, intpol, lt, dt, pt, ptp, kz, dzm, dz, dzp, dzpp, pkm, pk, pkp, pkpp, jy, dym, dy, dyp, dypp, pjm, pj, pjp, pjpp, ix, dxm, dx, dxp, dxpp, inmx, jnmy, knmz, lnmt, isubx, jsuby, ksubz, lsubt)

linearly interpolate in t direction

Arguments

Type IntentOptional Attributes Name
integer :: nx
integer :: ny
integer :: nz
integer :: nt
real(kind=wp) :: p(nx,ny,nz,nt)
integer :: mx
integer :: my
integer :: mz
integer :: mt
integer :: mxmy
integer :: mxmymz
real(kind=wp) :: q(mxmymz,mt)
integer :: intpol(4)
integer :: lt(mt)
real(kind=wp) :: dt(mt)
real(kind=wp) :: pt(mxmymz)
real(kind=wp) :: ptp(mxmymz)
integer :: kz(mz)
real(kind=wp) :: dzm(mz)
real(kind=wp) :: dz(mz)
real(kind=wp) :: dzp(mz)
real(kind=wp) :: dzpp(mz)
real(kind=wp) :: pkm(mxmy)
real(kind=wp) :: pk(mxmy)
real(kind=wp) :: pkp(mxmy)
real(kind=wp) :: pkpp(mxmy)
integer :: jy(my)
real(kind=wp) :: dym(my)
real(kind=wp) :: dy(my)
real(kind=wp) :: dyp(my)
real(kind=wp) :: dypp(my)
real(kind=wp) :: pjm(mx)
real(kind=wp) :: pj(mx)
real(kind=wp) :: pjp(mx)
real(kind=wp) :: pjpp(mx)
integer :: ix(mx)
real(kind=wp) :: dxm(mx)
real(kind=wp) :: dx(mx)
real(kind=wp) :: dxp(mx)
real(kind=wp) :: dxpp(mx)
integer :: inmx
integer :: jnmy
integer :: knmz
integer :: lnmt
integer :: isubx
integer :: jsuby
integer :: ksubz
integer :: lsubt

private subroutine cubt4u(nx, ny, nz, nt, p, mx, my, mz, mt, mxmy, mxmymz, q, intpol, lt, dtm, dt, dtp, dtpp, ptm, pt, ptp, ptpp, kz, dzm, dz, dzp, dzpp, pkm, pk, pkp, pkpp, jy, dym, dy, dyp, dypp, pjm, pj, pjp, pjpp, ix, dxm, dx, dxp, dxpp, inmx, jnmy, knmz, lnmt, isubx, jsuby, ksubz, lsubt)

cubically interpolate in t

Arguments

Type IntentOptional Attributes Name
integer :: nx
integer :: ny
integer :: nz
integer :: nt
real(kind=wp) :: p(nx,ny,nz,nt)
integer :: mx
integer :: my
integer :: mz
integer :: mt
integer :: mxmy
integer :: mxmymz
real(kind=wp) :: q(mxmymz,mt)
integer :: intpol(4)
integer :: lt(mt)
real(kind=wp) :: dtm(mt)
real(kind=wp) :: dt(mt)
real(kind=wp) :: dtp(mt)
real(kind=wp) :: dtpp(mt)
real(kind=wp) :: ptm(mxmymz)
real(kind=wp) :: pt(mxmymz)
real(kind=wp) :: ptp(mxmymz)
real(kind=wp) :: ptpp(mxmymz)
integer :: kz(mz)
real(kind=wp) :: dzm(mz)
real(kind=wp) :: dz(mz)
real(kind=wp) :: dzp(mz)
real(kind=wp) :: dzpp(mz)
real(kind=wp) :: pkm(mxmy)
real(kind=wp) :: pk(mxmy)
real(kind=wp) :: pkp(mxmy)
real(kind=wp) :: pkpp(mxmy)
integer :: jy(my)
real(kind=wp) :: dym(my)
real(kind=wp) :: dy(my)
real(kind=wp) :: dyp(my)
real(kind=wp) :: dypp(my)
real(kind=wp) :: pjm(mx)
real(kind=wp) :: pj(mx)
real(kind=wp) :: pjp(mx)
real(kind=wp) :: pjpp(mx)
integer :: ix(mx)
real(kind=wp) :: dxm(mx)
real(kind=wp) :: dx(mx)
real(kind=wp) :: dxp(mx)
real(kind=wp) :: dxpp(mx)
integer :: inmx
integer :: jnmy
integer :: knmz
integer :: lnmt
integer :: isubx
integer :: jsuby
integer :: ksubz
integer :: lsubt