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/324#issuecomment-781427391,https://api.github.com/repos/pydata/xarray/issues/324,781427391,MDEyOklzc3VlQ29tbWVudDc4MTQyNzM5MQ==,6926916,2021-02-18T15:33:06Z,2021-02-18T15:33:06Z,NONE,"still relevant, also for me ... I just wanted to group by half hours, for which I'd need access to` .groupby(['time.hour','time.minutes'])`","{""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,58117200
https://github.com/pydata/xarray/issues/1467#issuecomment-319296663,https://api.github.com/repos/pydata/xarray/issues/1467,319296663,MDEyOklzc3VlQ29tbWVudDMxOTI5NjY2Mw==,6926916,2017-08-01T07:54:43Z,2017-08-01T07:54:43Z,NONE,"In order to construct a netcdf file with a 2D field on a monthly resolution (for X number of years), I currently use the lines of code mentioned below. Since I do not care about the type of calendar, I just use 360_day, in which each month of the year has 30 days. Perhaps this can be useful for others. In case a better solution is available, please let me know!
```
import numpy as np
import pandas as pd
import xarray as xr
# 51 years, saving first day of each month.
mmhours = np.arange(0,(51*360*24),30*24)
attrs = {'units': 'Hours since 1955-01-01T12:00:00', 'calendar' : '360_day'}
target = np.random.rand(len(mmhours),10,10)
lat = np.arange(50,51,0.1)
lon = np.arange(3,4,0.1)
target_xr = xr.Dataset({'test': (['time', 'lat', 'lon'], target)},
coords={'time': ('time', mmhours, attrs) ,'lat': lat, 'lon': lon})
target_xr.to_netcdf('test.nc', encoding={'test': {'zlib': True}})
```","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,238990919
https://github.com/pydata/xarray/issues/1467#issuecomment-318927935,https://api.github.com/repos/pydata/xarray/issues/1467,318927935,MDEyOklzc3VlQ29tbWVudDMxODkyNzkzNQ==,6926916,2017-07-30T20:39:05Z,2017-07-30T20:39:05Z,NONE,"I actually have a similar issues with respect to 'months'. I want to write out my xarray dataarray as a netcdf file, with months as time intervals (one value per month, doesn't matter what day of the month is used as a reference). As with the 'years' described above, this does not seem to work in the current framework? ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,238990919