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/3299#issuecomment-530242012,https://api.github.com/repos/pydata/xarray/issues/3299,530242012,MDEyOklzc3VlQ29tbWVudDUzMDI0MjAxMg==,3460034,2019-09-11T06:32:44Z,2019-09-11T20:47:29Z,CONTRIBUTOR,"Based on your input and expected result, I would guess that you are looking to regrid your data from the x/y curvilinear grid of your GRIB weather data to a new rectilinear (lon/lat) grid? If so, I would suggest using xESMF ([example here](https://xesmf.readthedocs.io/en/latest/notebooks/Curvilinear_grid.html)), since [xarray itself does not appear to support this type of interpolation yet](https://github.com/pydata/xarray/issues/2281). As an example, given the dimension names you currently have and expect in the output, your code could look something like the following: ```python import xesmf as xe # ...load data... ds_xy_grid = ds_xy_grid.rename(latitude='lat', longitude='lon') ds_out = xr.Dataset({'lat': (['lat'], np.linspace(44.77, 56.14, 421)), 'lon': (['lon'], np.linspace(2.976, 19.84, 461)}) regridder = xe.Regridder(ds_xy_grid, ds_out, 'bilinear') ds_lonlat_grid = regridder(ds_xy_grid) ds_lonlat_grid = ds_lonlat_grid.rename(lat='latitude', lon='longitude') ``` (updated as per comment below)","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,491719758 https://github.com/pydata/xarray/issues/3299#issuecomment-530288406,https://api.github.com/repos/pydata/xarray/issues/3299,530288406,MDEyOklzc3VlQ29tbWVudDUzMDI4ODQwNg==,3106851,2019-09-11T08:56:24Z,2019-09-11T08:56:24Z,NONE,"@jthielen Thank you! This is pretty much what I was looking for. If someone else sees this: your line `regridder = xe.Regridder(ds_xy_grid, ds_out)` is missing the method e.g. `regridder = xe.Regridder(ds_xy_grid, ds_out, 'bilinear')`","{""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,491719758 https://github.com/pydata/xarray/issues/3299#issuecomment-530231603,https://api.github.com/repos/pydata/xarray/issues/3299,530231603,MDEyOklzc3VlQ29tbWVudDUzMDIzMTYwMw==,3106851,2019-09-11T05:54:59Z,2019-09-11T05:54:59Z,NONE,"I don't see how .rename would work for me - could you give me an example? Expected result is something like: ``` Dimensions: (latitude: 421, longitude: 461) Coordinates: time datetime64[ns] 2015-05-10T12:00:00 step timedelta64[ns] 00:00:00 heightAboveGround int64 10 latitude float64 44.77 44.77 44.77 ... 56.14 56.14 56.14 longitude float64 2.976 3.011 3.046 ... 19.75 19.8 19.84 ```","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,491719758 https://github.com/pydata/xarray/issues/3299#issuecomment-530112996,https://api.github.com/repos/pydata/xarray/issues/3299,530112996,MDEyOklzc3VlQ29tbWVudDUzMDExMjk5Ng==,5635139,2019-09-10T20:48:40Z,2019-09-10T20:48:40Z,MEMBER,"I think you're looking for `.rename`. If not, could you post a MCVE as per the issue template please?","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,491719758