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/7278#issuecomment-1321361968,https://api.github.com/repos/pydata/xarray/issues/7278,1321361968,IC_kwDOAMm_X85OwmIw,167164,2022-11-21T02:18:56Z,2022-11-21T02:18:56Z,NONE,"If it takes another couple of years to break, and need another re-write that's probably OK.
But if there is a better/more standard way to do what I'm trying to do, please let me know.
The underlying issue is that I have a netcdf with a RotatedPole grid (e.g. any of the CORDEX data), and I need to find the nearest grid point to a certain point. To do this, I map my point onto the RotatedPole projection (converting it from `lat, lon`, to `x, y`, or `rlat, rlon`), and then use the index mapping's `nearest` method to find the nearest grid point.
It didn't seem like there was an obvious way to do this with the actual API functions, so that's what I landed on.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1444752393
https://github.com/pydata/xarray/issues/7278#issuecomment-1316230358,https://api.github.com/repos/pydata/xarray/issues/7278,1316230358,IC_kwDOAMm_X85OdBTW,4160723,2022-11-16T02:57:48Z,2022-11-16T02:57:48Z,MEMBER,"👍
Use it at your own risk 😉 ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1444752393
https://github.com/pydata/xarray/issues/7278#issuecomment-1316170523,https://api.github.com/repos/pydata/xarray/issues/7278,1316170523,IC_kwDOAMm_X85Ocysb,167164,2022-11-16T01:54:24Z,2022-11-16T01:54:24Z,NONE,"Thank you, this is sufficient for me for now. I was able to replace
```python
nearest_point = remap_label_indexers(self.data, dict(x=x, y=y), method='nearest')[0]
```
with
```python
nearest_point = map_index_queries(self.data, dict(x=x, y=y), method='nearest').dim_indexers
```
","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1444752393
https://github.com/pydata/xarray/issues/7278#issuecomment-1311942192,https://api.github.com/repos/pydata/xarray/issues/7278,1311942192,IC_kwDOAMm_X85OMqYw,4160723,2022-11-11T16:52:54Z,2022-11-11T16:52:54Z,MEMBER,"You may look at the logic implemented in the `map_index_queries()` function in `xarray.core.indexing`. This function is still not public API, but it calls `.sel()` for each index object, which should be more stable (although experimental).
Eventually we'll probably make `merge_sel_results()` public too. It might be useful for third-party indexes.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1444752393
https://github.com/pydata/xarray/issues/7278#issuecomment-1311911082,https://api.github.com/repos/pydata/xarray/issues/7278,1311911082,IC_kwDOAMm_X85OMiyq,35968931,2022-11-11T16:21:21Z,2022-11-11T16:21:21Z,MEMBER,"> I realise that this was probably a function intended for internal use only
Yes, everything under `xarray.core` is internal, and unfortunately internal functions aren't publicly supported, so we provide no guarantee that they will still work/exist between versions.
> Is there a better way to do this? What replaces this function?
@benbovy should know!","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1444752393