title: Scipy - data interpolation from one irregular grid to another irregular spaced grid
body: <p>I am struggling with the interpolation between two grids, and I couldn't find an appropriate solution for my problem.</p>
  
  <p>I have 2 different 2D grids, of which the node points are defined by their X and Y coordinates. The grid itself is not rectangular, but forms more or less a parallelogram (so the X-coordinate for (i,j) is not the same as (i,j+1), and the Y coordinate of (i,j) is different from the Y coordinate of (i+1,j).
  Both grids have a 37*5 shape and they overlap almost entirely.</p>
  
  <p>For the first grid I have for each point the X-coordinate, the Y-coordinate and a pressure value. Now I would like to interpolate this pressure distribution of the first grid on the second grid (of which also X and Y are known for each point.</p>
  
  <p>I tried different interpolation methods, but my end result was never correct due to the irregular distribution of my grid points.
  Functions as interp2d or griddata require as input a 1D array, but if I do this, the interpolated solution is wrong (even if I interpolate the pressure values from the original grid again on the original grid, the new pressure values are miles away from the original values.</p>
  
  <p>For 1D interpolation on different irregular grids I use:</p>
  
  <pre><code>def interpolate(X, Y, xNew):
      if xNew&lt;X[0]:
          print 'Interp Warning :', xNew,'is under the interval [',X[0],',',X[-1],']'
          yNew = Y[0]
      elif  xNew&gt;X[-1]:
          print 'Interp Warning :', xNew,'is above the interval [',X[0],',',X[-1],']'
          yNew = Y[-1]
      elif xNew == X[-1] : yNew = Y[-1]
      else:
          ind = numpy.argmax(numpy.bitwise_and(X[:-1]&lt;=xNew,X[1:]&gt;xNew))
          yNew = Y[ind] + ((xNew-X[ind])/(X[ind+1]-X[ind]))*(Y[ind+1]-Y[ind])
  
      return yNew
  </code></pre>
  
  <p>but for 2D I thought griddata would be easier to use. Does anyone have experience with an interpolation where my input is a 2D array for the mesh and for the data?</p>