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.
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.
Type | Intent | Optional | 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:
values other than 1 or 3 in intpol are not allowed (ier = 3). |
||
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.
then lw must be greater than or equal to lwx+lwy |
||
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:
|