27 votes
Accepted

How to interpolate scattered data to a regular grid in Python?

It is straightforward to do so with numpy, scipy.interpolate.griddata, and matplotlib. Here ...
  • 4,933
13 votes

How to interpolate scattered data to a regular grid in Python?

You have a lot of options. The easiest solution for this simple task would be to use a GIS software, e.g. the free QGIS. Add delimited text layer and try raster interpolation. Download a free ...
  • 5,906
7 votes

Python - How to write interpolated raster to netcdf file

I changed your model solution a little bit; but it's like Ingvar Lukas wrote in his answer: you redefined xi and yi in the ...
  • 1,969
6 votes

Python - How to write interpolated raster to netcdf file

You have a shape mismatch, as you are overwritingxi and yi using np.meshgrid, then assigning ...
5 votes

Can I interpolate rainfall data from stations outside of watershed for the watershed?

Yes, you can interpolate the rainfall from stations outside the watershed. However, the quality of the interpolation will depend on the distance between the stations and the watershed, the prevailing ...
  • 4,339
4 votes

Can I interpolate rainfall data from stations outside of watershed for the watershed?

In short: Yes you can/should use stations outside of your watershed. More in detail: There is well known methods in hydrology to solve the situation you are presenting. One simple method is to ...
  • 2,633
1 vote

Difficulty interpolating near poles using lat/lons

$\color{blue}{\text{The answer here presumes that Earth is a sphere.}}$ $\color{blue}{\text{This is not fully true, but the question seems to build in that assumption.}}$ $\color{blue}{\text{That ...
  • 2,656
1 vote

Interpolating world data to a local grid in Python

As @gansub implicitly suggested, you may have a better outcome by defining the output grid as well. Check this very similar question: How to interpolate scattered data to a regular grid in Python? ...
  • 302

Only top scored, non community-wiki answers of a minimum length are eligible