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/7894#issuecomment-1577528999,https://api.github.com/repos/pydata/xarray/issues/7894,1577528999,IC_kwDOAMm_X85eBy6n,59711987,2023-06-05T21:59:45Z,2023-06-05T21:59:45Z,NONE,"```
#input array
>>>array = xr.DataArray([1,3,6,np.nan,19,20,13], dims=['time'],
coords=[pd.date_range('2023-06-05 00:00','2023-06-05 06:00',freq='H')])
>>>array
xarray.DataArray(time: 7
array([ 1., 3., 6., nan, 19., 20., 13.])
Coordinates:
time (time) datetime64[ns] 2023-06-05 ... 2023-06-05T06:
Indexes: (1)
Attributes: (0)
#however the integrated value ends up as a NaN
>>>array.integrate('time')
xarray.DataArray
array(nan)
Coordinates: (0)
Indexes: (0)
Attributes: (0)
#if one still wanted to know the integrated values for where there were values it would essentially by like integrating the separate chunks for where the valid values existed
#first chunk
>>>array.isel(time=slice(0,3)).integrate('time')
xarray.DataArray
array(2.34e+13)
Coordinates: (0)
Indexes: (0)
Attributes: (0)
#second chunk
>>>array.isel(time=slice(4,7)).integrate('time')
xarray.DataArray
array(1.296e+14)
Coordinates: (0)
Indexes: (0)
Attributes: (0)
#and then the sum would be the fully integrated area
```
@dcherian I essentially was wondering whether it was possible for a skipna argument or some kind of NaN handling to be implemented that would allow users to avoid integrating in chunks due to the presence of NaNs. I do not work in dev so I would not know how to implement this, but I thought I'd see if others had thoughts.
","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1742035781