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/7871#issuecomment-1568557130,https://api.github.com/repos/pydata/xarray/issues/7871,1568557130,IC_kwDOAMm_X85dfkhK,10194086,2023-05-30T14:40:50Z,2023-05-30T14:40:50Z,MEMBER,I am closing this. Feel free to re-open/ or open a new issue.,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1723010051 https://github.com/pydata/xarray/issues/7871#issuecomment-1562707652,https://api.github.com/repos/pydata/xarray/issues/7871,1562707652,IC_kwDOAMm_X85dJQbE,10194086,2023-05-25T11:02:29Z,2023-05-25T11:02:29Z,MEMBER,"Yes float64 should cause less imprecision. You can convert using `astype`: ```python import numpy as np import xarray as xr da = xr.DataArray(np.array([1, 2], dtype=np.float32)) da = da.astype(float) ``` As for the other problems I think you are better of asking the people over at rioxarray. However, you should first gather all the steps you did to convert the data as code. This way it is easier to see what you are actually doing. ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1723010051 https://github.com/pydata/xarray/issues/7871#issuecomment-1562605326,https://api.github.com/repos/pydata/xarray/issues/7871,1562605326,IC_kwDOAMm_X85dI3cO,10194086,2023-05-25T09:44:31Z,2023-05-25T09:44:31Z,MEMBER,"xarray handles nan values and ignores them per default - so you don't need to remove them. For example: ```python import numpy as np import xarray as xr da = xr.DataArray([1, 2, 3, np.nan]) da.mean() ``` If you have precision problems - that might be because you have `float32` values. I don't know what goes wrong with your lon values - that is an issue in the reprojection. You could convert them to 0...360 by using ```python lon_dim = ""x"" new_lon = np.mod(da[lon_dim], 360) da = da.assign_coords(**{lon_dim: new_lon}) da.reindex(**{lon_dim : np.sort(da[lon_dim])}) ``` ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1723010051 https://github.com/pydata/xarray/issues/7871#issuecomment-1560777789,https://api.github.com/repos/pydata/xarray/issues/7871,1560777789,IC_kwDOAMm_X85dB5Q9,10194086,2023-05-24T09:32:46Z,2023-05-24T09:32:46Z,MEMBER,"Yes but there are less - so as mentioned it removes all columns/ rows with _only_ nans, if there is at least one non-nan value the row is kept. What is the reason that you want to get rid of the nan values?","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1723010051 https://github.com/pydata/xarray/issues/7871#issuecomment-1560587282,https://api.github.com/repos/pydata/xarray/issues/7871,1560587282,IC_kwDOAMm_X85dBKwS,10194086,2023-05-24T07:24:37Z,2023-05-24T07:24:37Z,MEMBER,"Can you try `notnull` instead of `isnull` - I often get the boolean array wrong in `where`: ```python da = ds['z'] da = da.where(da.notnull(), drop=True) ```","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1723010051 https://github.com/pydata/xarray/issues/7871#issuecomment-1560572196,https://api.github.com/repos/pydata/xarray/issues/7871,1560572196,IC_kwDOAMm_X85dBHEk,10194086,2023-05-24T07:12:28Z,2023-05-24T07:12:28Z,MEMBER,"What is the reason that you want to get rid of the nan values? The reason they come back is that are needed to fill the grid again. The dataframe is 1D but the dataarray is 2D. What you can try is to use `where`: ```python da = ds['z'] da = da.where(da.isnull(), drop=True) ``` but it will only drop the values if the _entire_ row/ column is nan. ","{""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1723010051