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/4637#issuecomment-1492399834,https://api.github.com/repos/pydata/xarray/issues/4637,1492399834,IC_kwDOAMm_X85Y9Dba,35968931,2023-03-31T18:10:24Z,2023-03-31T18:10:24Z,MEMBER,"@alrho007 the code for this method on `DataArray` is in here https://github.com/pydata/xarray/blob/850156cf80fe8791d45bcaff2da579cffc0cfc35/xarray/core/dataarray.py#L3303 which calls the implementation defined in `xarray.core.missing` https://github.com/pydata/xarray/blob/1c81162755457b3f4dc1f551f0321c75ec9daf6c/xarray/core/missing.py#L308 I would start by trying to understand that code (looking at where things are imported to make it work), and then create a small test case example with a monotonically decreasing index that causes a problem. Then try to work out exactly which step in the code causes the issue, and whether it can be generalized to fix the issue. ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,754789691 https://github.com/pydata/xarray/issues/4637#issuecomment-1491793033,https://api.github.com/repos/pydata/xarray/issues/4637,1491793033,IC_kwDOAMm_X85Y6vSJ,61923007,2023-03-31T11:36:46Z,2023-03-31T11:37:12Z,NONE,"@TomNicholas @dcherian where would I start from if I want to work on this? ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,754789691 https://github.com/pydata/xarray/issues/4637#issuecomment-789652922,https://api.github.com/repos/pydata/xarray/issues/4637,789652922,MDEyOklzc3VlQ29tbWVudDc4OTY1MjkyMg==,7123715,2021-03-03T11:39:38Z,2021-03-03T11:39:38Z,NONE," A simple trick could be to not use the coordinate while interpolating. An example with the same data but the second dataset has a decreasing index. ```python import numpy as np import xarray as xr da = xr.DataArray([0, 2, np.nan, 3, 3.25], dims=""x"", coords={""x"": [0, 1, 2, 3, 4]}) da1= xr.DataArray([3.25, 3,np.nan,2,0],dims='x',coords={""x"":[4,3,2,1,0]}) da_inter=da.interpolate_na(dim='x', method='cubic') da1_inter=da1.interpolate_na(dim='x',method='cubic',use_coordinate=False) ``` As far as I understand interpolation, the result is the same. ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,754789691