nub question.

I have a 3d array of input data1 of dimensions [nx,ny,nz]

The data represent a 3D continuous function sampled on an irregular grid.

data[i,j,k] is the data at grid point [i,j,k].

xgrid1[i,j,k] are the x-coordinates of point [i,j,k].

ygrid1[i,j,k] are the y-coordinates of point [i,j,k].

zgrid1[i,j,k] are the z-coordinates of point [i,j,k].

xgrid1, ygrid1, and zgrid1 could be instead be represented by an array of triple grid1.

xgrid2, ygrid2, and zgrid2 (or grid2) are the coordinates of a different grid.

How do generate a 3D array data2 that approximates the function represented by data1 at the grid points defined by grid2?

This should be a trivial application of any interpolation package, but I find the documentation of the packages too concise to be of much help.