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/7108#issuecomment-1266073388,https://api.github.com/repos/pydata/xarray/issues/7108,1266073388,IC_kwDOAMm_X85Ldr8s,4160723,2022-10-03T21:28:43Z,2022-10-03T21:28:43Z,MEMBER,"> I suppose re-projecting it on a 0-360 would be the only way around this specific issue. A custom Xarray index would help, e.g., `PeriodicBoundaryIndex` (#7031) or a `GeographicIndex` leveraging libraries like S2Geometry or H3. ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1391699976 https://github.com/pydata/xarray/issues/7108#issuecomment-1265012286,https://api.github.com/repos/pydata/xarray/issues/7108,1265012286,IC_kwDOAMm_X85LZo4-,4160723,2022-10-03T06:57:17Z,2022-10-03T06:57:17Z,MEMBER,"TBH, I had to do some research before figuring out what was going on :).","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1391699976 https://github.com/pydata/xarray/issues/7108#issuecomment-1263548977,https://api.github.com/repos/pydata/xarray/issues/7108,1263548977,IC_kwDOAMm_X85LUDox,4160723,2022-09-30T13:03:26Z,2022-09-30T13:03:26Z,MEMBER,"It looks like the error is because of the non-monotonic coordinate labels for the ""lon"" coordinate in `nc_bug` rather than a float precision issue. The ""lon"" coordinate seems monotonic for `nc_ok` so it works. When a `slice` is given as indexer, Xarray internally calls `pandas.Index.slice_indexer()`, which requires that the index must be ordered and unique ([docs](https://pandas.pydata.org/docs/reference/api/pandas.Index.slice_indexer.html)). Unfortunately, Pandas does not mention it while it raises a KeyError. Should we first check the index in Xarray and raise a nicer error message if it is not unique / ordered?","{""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1391699976