html_url,issue_url,id,node_id,user,created_at,updated_at,author_association,body,reactions,performed_via_github_app,issue
https://github.com/pydata/xarray/issues/2281#issuecomment-497155229,https://api.github.com/repos/pydata/xarray/issues/2281,497155229,MDEyOklzc3VlQ29tbWVudDQ5NzE1NTIyOQ==,25473287,2019-05-30T00:24:36Z,2019-05-30T00:33:49Z,NONE,"> An MPI error?!
@fspaolo Could you post a [minimal reproducible example](https://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports) on [xESMF's issue tracker](https://github.com/JiaweiZhuang/xESMF/issues)? Just to keep this issue clean. The error looks like an ESMF installation problem that can happen on legacy OS, and it can be easily fixed by Docker or other containers.
> It is surprising that a package targeting n-dimensional gridded datasets (particularly those from the geo/climate sciences) does not handle such a common task with spatial gridded data.
Just a side comment: This is a common but highly non-trivial task... Even small edges cases like periodic longitudes and polar singularities can cause interesting troubles. Otherwise I would just code up an algorithm in Xarray from scratch instead of relying on a heavy Fortran library. But things will get improved over time...","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,340486433
https://github.com/pydata/xarray/issues/2281#issuecomment-404685906,https://api.github.com/repos/pydata/xarray/issues/2281,404685906,MDEyOklzc3VlQ29tbWVudDQwNDY4NTkwNg==,25473287,2018-07-12T23:58:48Z,2018-07-13T18:24:02Z,NONE,"> Do you have any proposal?
I guess it is not an API design problem yet... The algorithm is not here since `interpn` doesn't deal with curvilinear grids.
> I think we could make dr.interp(xc=lon, yc=lat) work for the N-D -> M-D case by wrapping scipy.interpolate.griddata
My concern with `scipy.interpolate.griddata` is that the performance might be miserable... `griddata` takes an arbitrary **stream** of data points in a D-dimensional space. It doesn't know if those source data points have a gridded/mesh structure. A curvilinear grid mesh needs to be flatten into a stream of points before passed to `griddata()`. Might not be too bad for nearest-neighbour search, but very inefficient for linear/bilinear method, where knowing the mesh structure beforehand can save a lot of computation.
Utilizing`scipy.interpolate.griddata` would be a nice feature, but it should probably be used for data point streams (more like a Pandas dataframe method?), not as a way to handle curvilinear grids.
PS: I have some broader concerns regarding interp vs xESMF: JiaweiZhuang/xESMF#24","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,340486433
https://github.com/pydata/xarray/issues/2281#issuecomment-404387651,https://api.github.com/repos/pydata/xarray/issues/2281,404387651,MDEyOklzc3VlQ29tbWVudDQwNDM4NzY1MQ==,25473287,2018-07-12T04:43:09Z,2018-07-13T00:11:44Z,NONE,"One way I can think of to make `interp()` work on this example: Define a new coordinate system (i.e. two new coordinate variables) on the source curvilinear grid, and rewrite the destination coordinate using those new coordinate variables (not lat, lon anymore).
But this is absolutely too convoluted...
Updated: see [Gridded with Scipy](https://www.fatiando.org/verde/latest/gallery/scipygridder.html#sphx-glr-gallery-scipygridder-py) for a similar idea.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,340486433