title: Error while regridding 3-D satellite data in Python with Basemap, 2-D works
body: <p>I have the following issue:</p>
  
  <p>I have cloud cover datasets from different satellites, that I want to regrid onto the grid of a climate model to make comparisons between the model output and the observed satellite data.</p>
  
  <p>For now I was using the interp function from basemap, which works perfectly fine for arrays in the shape of: 1 x longitude x latitude, but it doesn't work for arrays of the shape n x longitude x latitude. What would be the best way to regrid these sort of 3-D arrays?</p>
  
  <pre><code>from mpl_toolkits.basemap import interp
  import xarray as xr 
  def regrid_MAR10km(x_in,y_in,data_in): 
      mar_10km = xr.open_dataset('/media/..../MAR_10km /MARv3.5.2-10km-ERA-2008.nc')
      lat = mar_10km['LAT']
      lon = mar_10km['LON']
      result = interp(data_in, x_in, y_in,lon,lat)
      return result  
  </code></pre>
  
  <p>My problem is, that I get error messages of the following form when I try to use 3-D data, in my case the array is of the form 161 (which is the cloud cover for every month!) x lon x lat</p>
  
  <pre><code>&lt;xarray.DataArray 'Cloud_Fraction_Mask_Total_Mean' (Begin_Date: 161, lat: 28, lon: 110)&gt;
  [495880 values with dtype=float64]
  Coordinates:
  * Begin_Date  (Begin_Date) datetime64[ns] 2002-07-01 2002-08-01 2002-09-01 ...
  * lat         (lat) float32 85.5 84.5 83.5 82.5 81.5 80.5 79.5 78.5 77.5 ...
  * lon         (lon) float32 -94.5 -93.5 -92.5 -91.5 -90.5 -89.5 -88.5 ...
  </code></pre>
  
  <p>And that is the error that it produces:</p>
  
  <pre><code> IndexError                                Traceback (most recent call   last)
  &lt;ipython-input-19-5117a62e570e&gt; in &lt;module&gt;()
  ----&gt; 1 cloud_regrid =      fc.regrid_MAR10km(longitude,latitude,cloud_data_UD)
  
  /media/sf_Shared/Black_and_bloom/CODE/functions.py in regrid_MAR10km(x_in, y_in, data_in)
   20         lat = mar_10km['LAT']
   21         lon = mar_10km['LON']
  ---&gt; 22         result = interp(data_in, x_in, y_in,lon,lat)
   23         return result
  
  /home/sh16450/miniconda3/envs/snowflakes/lib/python3.5/site-packages/mpl_toolkits/basemap/__init__.py in interp(datain, xin, yin, xout, yout,  checkbounds, masked, order)
  4958         dataout = (1.-delx)*(1.-dely)*datain[yi,xi] + \
  4959                   delx*dely*datain[yip1,xip1] + \
  -&gt; 4960                   (1.-delx)*dely*datain[yip1,xi] + \
  4961                   delx*(1.-dely)*datain[yi,xip1]
  4962     elif order == 0:
  
  IndexError: index 41 is out of bounds for axis 1 with size 28
  </code></pre>