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/1467#issuecomment-427078097,https://api.github.com/repos/pydata/xarray/issues/1467,427078097,MDEyOklzc3VlQ29tbWVudDQyNzA3ODA5Nw==,1197350,2018-10-04T16:11:16Z,2018-10-04T16:11:16Z,MEMBER,"Month unit support in cftime is being discussed in in https://github.com/Unidata/cftime/pull/69 Perhaps xarray folks would like to weigh in.","{""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-319325871,https://api.github.com/repos/pydata/xarray/issues/1467,319325871,MDEyOklzc3VlQ29tbWVudDMxOTMyNTg3MQ==,10050469,2017-08-01T09:57:42Z,2017-08-02T16:05:15Z,MEMBER,"Hi Matthias, I think your solution is fine. The best is simply to avoid ""months"" as units altogether. If one has a ""real"" calendar one can also let pandas and xarray do the job: ```python t = pd.date_range(start='1980-01', end='2010-12', freq='MS') target = np.random.rand(len(t), 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', t), 'lat': lat, 'lon': lon} ) target_xr.to_netcdf('test_2.nc') ``` which creates the following time units automatically: ``` int64 time(time) ; time:units = ""days since 1980-01-01 00:00:00"" ; time:calendar = ""proleptic_gregorian"" ; ```","{""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-311771725,https://api.github.com/repos/pydata/xarray/issues/1467,311771725,MDEyOklzc3VlQ29tbWVudDMxMTc3MTcyNQ==,2443309,2017-06-28T20:02:49Z,2017-06-28T20:02:49Z,MEMBER,"I would think that this sort of feature belongs in `netcdftime`, not `xarray`. There are obvious issues with defining what a year (or a month) is but I image we can sort those out. ","{""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-311636103,https://api.github.com/repos/pydata/xarray/issues/1467,311636103,MDEyOklzc3VlQ29tbWVudDMxMTYzNjEwMw==,4160723,2017-06-28T11:45:18Z,2017-06-28T11:45:18Z,MEMBER,"Although I'm not a specialist of CF conventions, this issue may be related to this one: https://github.com/Unidata/netcdftime/issues/5. The forthcoming `NetCDFTimeIndex` (#1252) uses the `netcdftime` package. It's rather about using `common_year` with `noleap` calendar, though.","{""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-311634421,https://api.github.com/repos/pydata/xarray/issues/1467,311634421,MDEyOklzc3VlQ29tbWVudDMxMTYzNDQyMQ==,10050469,2017-06-28T11:36:37Z,2017-06-28T11:36:37Z,MEMBER,"> I think I do mean 'years' in the CF convention sense Can you pinpoint to which part of the CF convention? From the link I read: ``a year is exactly 365.242198781 days``, which would lead to highly unlikely calendar dates. I agree however that interpreting ""years"" as being ""calendar years"" is the only way that makes sense. For the record, netCDF4 also doesn't like ""years"": ```python import netCDF4 ds = netCDF4.Dataset('/home/mowglie/Downloads/histsoc_population_0.5deg_1861-2005.nc4') time = ds.variables['time'] netCDF4.num2date(time[:], units=time.units) --------------------------------------------------------------------------- ValueError Traceback (most recent call last) in () 2 ds = netCDF4.Dataset('histsoc_population_0.5deg_1861-2005.nc4') 3 time = ds.variables['time'] ----> 4 netCDF4.num2date(time[:], units=time.units) netCDF4/_netCDF4.pyx in netCDF4._netCDF4.num2date (netCDF4/_netCDF4.c:66463)() ValueError: unsupported time units ```","{""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-311620076,https://api.github.com/repos/pydata/xarray/issues/1467,311620076,MDEyOklzc3VlQ29tbWVudDMxMTYyMDA3Ng==,10050469,2017-06-28T10:24:36Z,2017-06-28T10:24:36Z,MEMBER,"I am not sure to understand what you are asking us to do here. The problem with ""years"" is that their use is not recommended by the CF conventions. Very often (and I think your file means it this way), users would like years to be simple ""calendar years"" , i.e. : 1901-01-01, 1902-01-01, but this is not what the unit ""years"" means in the CF conventions: see http://cfconventions.org/cf-conventions/v1.6.0/cf-conventions.html#time-coordinate","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,238990919