issue_comments
70 rows where issue = 205473898 sorted by updated_at descending
This data as json, CSV (advanced)
Suggested facets: reactions, created_at (date), updated_at (date)
issue 1
- CFTimeIndex · 70 ✖
id | html_url | issue_url | node_id | user | created_at | updated_at ▲ | author_association | body | reactions | performed_via_github_app | issue |
---|---|---|---|---|---|---|---|---|---|---|---|
388656404 | https://github.com/pydata/xarray/pull/1252#issuecomment-388656404 | https://api.github.com/repos/pydata/xarray/issues/1252 | MDEyOklzc3VlQ29tbWVudDM4ODY1NjQwNA== | spencerkclark 6628425 | 2018-05-13T21:13:23Z | 2018-05-13T21:13:23Z | MEMBER | Indeed that meeting played an important role here. Thank you @rabernat! |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex 205473898 | |
388649761 | https://github.com/pydata/xarray/pull/1252#issuecomment-388649761 | https://api.github.com/repos/pydata/xarray/issues/1252 | MDEyOklzc3VlQ29tbWVudDM4ODY0OTc2MQ== | spencerahill 6200806 | 2018-05-13T19:21:41Z | 2018-05-13T19:21:41Z | CONTRIBUTOR | Credit also due to @rabernat for organizing the workshop in late 2016 where this effort got off the ground, and to @shoyer who sketched out an initial roadmap for the implementation at that meeting. So excited to have this in! In aospy alone, we'll be able to get rid of 100s (1000+?) of lines of code now that CFTime is in place. |
{ "total_count": 1, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex 205473898 | |
388624249 | https://github.com/pydata/xarray/pull/1252#issuecomment-388624249 | https://api.github.com/repos/pydata/xarray/issues/1252 | MDEyOklzc3VlQ29tbWVudDM4ODYyNDI0OQ== | rabernat 1197350 | 2018-05-13T12:44:02Z | 2018-05-13T12:44:02Z | MEMBER | Congrats to everyone who made this happen, especially @spencerclark. This feature is going to make so many people happy! |
{ "total_count": 1, "+1": 0, "-1": 0, "laugh": 0, "hooray": 1, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex 205473898 | |
388620120 | https://github.com/pydata/xarray/pull/1252#issuecomment-388620120 | https://api.github.com/repos/pydata/xarray/issues/1252 | MDEyOklzc3VlQ29tbWVudDM4ODYyMDEyMA== | spencerkclark 6628425 | 2018-05-13T11:32:09Z | 2018-05-13T11:32:09Z | MEMBER | @shoyer, @jhamman, @maxim-lian, @spencerahill many thanks for the substantial feedback, help, and encouragement here. You guys are great! |
{ "total_count": 1, "+1": 0, "-1": 0, "laugh": 0, "hooray": 1, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex 205473898 | |
388602324 | https://github.com/pydata/xarray/pull/1252#issuecomment-388602324 | https://api.github.com/repos/pydata/xarray/issues/1252 | MDEyOklzc3VlQ29tbWVudDM4ODYwMjMyNA== | jhamman 2443309 | 2018-05-13T05:17:59Z | 2018-05-13T05:17:59Z | MEMBER | Okay, I'm going to merge now. Hopefully a few of us can stress test this a bit more prior to the next release. Thanks @spencerkclark for all the work here over the past 15 months!!! |
{ "total_count": 1, "+1": 0, "-1": 0, "laugh": 0, "hooray": 1, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex 205473898 | |
388581344 | https://github.com/pydata/xarray/pull/1252#issuecomment-388581344 | https://api.github.com/repos/pydata/xarray/issues/1252 | MDEyOklzc3VlQ29tbWVudDM4ODU4MTM0NA== | fmaussion 10050469 | 2018-05-12T20:37:34Z | 2018-05-12T20:37:34Z | MEMBER | Congrats! This is a great piece of work and will be very useful to the climate community. |
{ "total_count": 1, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex 205473898 | |
388576430 | https://github.com/pydata/xarray/pull/1252#issuecomment-388576430 | https://api.github.com/repos/pydata/xarray/issues/1252 | MDEyOklzc3VlQ29tbWVudDM4ODU3NjQzMA== | shoyer 1217238 | 2018-05-12T19:09:37Z | 2018-05-12T19:09:37Z | MEMBER | OK, I'm happy with this. Time to merge I guess? |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex 205473898 | |
388556972 | https://github.com/pydata/xarray/pull/1252#issuecomment-388556972 | https://api.github.com/repos/pydata/xarray/issues/1252 | MDEyOklzc3VlQ29tbWVudDM4ODU1Njk3Mg== | spencerkclark 6628425 | 2018-05-12T13:56:02Z | 2018-05-12T13:56:02Z | MEMBER | Thanks @shoyer, those are good questions. I addressed your inline comments. Let me know if you have anything else.
Through pandas, this raises an informative ``` In [1]: from cftime import num2date In [2]: import numpy as np In [3]: import xarray as xr In [4]: xr.set_options(enable_cftimeindex=True) Out[4]: <xarray.core.options.set_options at 0x10c3a99d0> In [5]: time = num2date(np.arange(5), units='days since 0001-01-01', calendar='noleap') In [6]: data = xr.DataArray(np.arange(5), coords=[time], dims=['time']) In [7]: data.resample(time='2D').mean()TypeError Traceback (most recent call last) <ipython-input-8-577095ede89a> in <module>() ----> 1 data.resample(time='2D').mean() /Users/spencerclark/xarray-dev/xarray/xarray/core/common.pyc in resample(self, freq, dim, how, skipna, closed, label, base, keep_attrs, **indexer) 616 resampler = self._resample_cls(self, group=group, dim=dim_name, 617 grouper=grouper, --> 618 resample_dim=RESAMPLE_DIM) 619 620 return resampler /Users/spencerclark/xarray-dev/xarray/xarray/core/resample.pyc in init(self, args, kwargs) 128 "cannot have the same name as actual dimension " 129 "('{}')! ".format(self._resample_dim, self._dim)) --> 130 super(DataArrayResample, self).init(args, kwargs) 131 132 def apply(self, func, shortcut=False, kwargs): /Users/spencerclark/xarray-dev/xarray/xarray/core/groupby.pyc in init(self, obj, group, squeeze, grouper, bins, cut_kwargs) 233 raise ValueError('index must be monotonic for resampling') 234 s = pd.Series(np.arange(index.size), index) --> 235 first_items = s.groupby(grouper).first() 236 full_index = first_items.index 237 if first_items.isnull().any(): //anaconda/envs/xarray-dev/lib/python2.7/site-packages/pandas/core/generic.pyc in groupby(self, by, axis, level, as_index, sort, group_keys, squeeze, kwargs) 5160 return groupby(self, by=by, axis=axis, level=level, as_index=as_index, 5161 sort=sort, group_keys=group_keys, squeeze=squeeze, -> 5162 kwargs) 5163 5164 def asfreq(self, freq, method=None, how=None, normalize=False, //anaconda/envs/xarray-dev/lib/python2.7/site-packages/pandas/core/groupby.pyc in groupby(obj, by, kwds) 1846 raise TypeError('invalid type: %s' % type(obj)) 1847 -> 1848 return klass(obj, by, kwds) 1849 1850 //anaconda/envs/xarray-dev/lib/python2.7/site-packages/pandas/core/groupby.pyc in init(self, obj, keys, axis, level, grouper, exclusions, selection, as_index, sort, group_keys, squeeze, **kwargs) 514 level=level, 515 sort=sort, --> 516 mutated=self.mutated) 517 518 self.obj = obj //anaconda/envs/xarray-dev/lib/python2.7/site-packages/pandas/core/groupby.pyc in _get_grouper(obj, key, axis, level, sort, mutated, validate) 2848 # a passed-in Grouper, directly convert 2849 if isinstance(key, Grouper): -> 2850 binner, grouper, obj = key._get_grouper(obj, validate=False) 2851 if key.key is None: 2852 return grouper, [], obj //anaconda/envs/xarray-dev/lib/python2.7/site-packages/pandas/core/resample.pyc in _get_grouper(self, obj, validate) 1118 def _get_grouper(self, obj, validate=True): 1119 # create the resampler and return our binner -> 1120 r = self._get_resampler(obj) 1121 r._set_binner() 1122 return r.binner, r.grouper, r.obj //anaconda/envs/xarray-dev/lib/python2.7/site-packages/pandas/core/resample.pyc in _get_resampler(self, obj, kind) 1114 raise TypeError("Only valid with DatetimeIndex, " 1115 "TimedeltaIndex or PeriodIndex, " -> 1116 "but got an instance of %r" % type(ax).name) 1117 1118 def _get_grouper(self, obj, validate=True): TypeError: Only valid with DatetimeIndex, TimedeltaIndex or PeriodIndex, but got an instance of 'CFTimeIndex' ```
I updated things such that if In [2]: import numpy as np In [3]: import xarray as xr In [4]: xr.set_options(enable_cftimeindex=True) Out[4]: <xarray.core.options.set_options at 0x10af58850> In [5]: time = num2date(np.arange(5), units='days since 0001-01-01', calendar='noleap') In [6]: data = xr.DataArray(np.arange(5), coords=[time], dims=['time']) In [7]: data.plot()TypeError Traceback (most recent call last) <ipython-input-7-118f55e0b3d0> in <module>() ----> 1 data.plot() /Users/spencerclark/xarray-dev/xarray/xarray/plot/plot.pyc in call(self, kwargs) 357 358 def call(self, kwargs): --> 359 return plot(self._da, **kwargs) 360 361 @functools.wraps(hist) /Users/spencerclark/xarray-dev/xarray/xarray/plot/plot.pyc in plot(darray, row, col, col_wrap, ax, rtol, subplot_kws, kwargs) 155 kwargs['ax'] = ax 156 --> 157 return plotfunc(darray, kwargs) 158 159 /Users/spencerclark/xarray-dev/xarray/xarray/plot/plot.pyc in line(darray, args, kwargs) 258 yplt = darray.coords[ylabel] 259 --> 260 _ensure_plottable(xplt) 261 262 primitive = ax.plot(xplt, yplt, args, **kwargs) /Users/spencerclark/xarray-dev/xarray/xarray/plot/plot.pyc in _ensure_plottable(*args) 54 if not (_valid_numpy_subdtype(np.array(x), numpy_types) or 55 _valid_other_type(np.array(x), other_types)): ---> 56 raise TypeError('Plotting requires coordinates to be numeric ' 57 'or dates of type np.datetime64 or ' 58 'datetime.datetime.') TypeError: Plotting requires coordinates to be numeric or dates of type np.datetime64 or datetime.datetime.
In [9]: data.plot()NotImplementedError Traceback (most recent call last) <ipython-input-9-118f55e0b3d0> in <module>() ----> 1 data.plot() /Users/spencerclark/xarray-dev/xarray/xarray/plot/plot.pyc in call(self, kwargs) 357 358 def call(self, kwargs): --> 359 return plot(self._da, **kwargs) 360 361 @functools.wraps(hist) /Users/spencerclark/xarray-dev/xarray/xarray/plot/plot.pyc in plot(darray, row, col, col_wrap, ax, rtol, subplot_kws, **kwargs) 124 125 if contains_cftime_datetimes(darray): --> 126 raise NotImplementedError('Plotting arrays of cftime.datetime objects ' 127 'is currently not possible.') 128 NotImplementedError: Plotting arrays of cftime.datetime objects is currently not possible. ``` |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex 205473898 | |
388535018 | https://github.com/pydata/xarray/pull/1252#issuecomment-388535018 | https://api.github.com/repos/pydata/xarray/issues/1252 | MDEyOklzc3VlQ29tbWVudDM4ODUzNTAxOA== | shoyer 1217238 | 2018-05-12T06:50:45Z | 2018-05-12T06:50:45Z | MEMBER | A couple other things to think about from a usability perspective: - What happens when you try to resample along CFTimeIndex? - What happens when you try to plot a DataArray with a CFTimeIndex? These should at least raise informative errors (use |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex 205473898 | |
388449084 | https://github.com/pydata/xarray/pull/1252#issuecomment-388449084 | https://api.github.com/repos/pydata/xarray/issues/1252 | MDEyOklzc3VlQ29tbWVudDM4ODQ0OTA4NA== | spencerkclark 6628425 | 2018-05-11T18:33:31Z | 2018-05-11T18:33:31Z | MEMBER | This could be ready. I'm happy to address any further concerns if anyone has them. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex 205473898 | |
388264386 | https://github.com/pydata/xarray/pull/1252#issuecomment-388264386 | https://api.github.com/repos/pydata/xarray/issues/1252 | MDEyOklzc3VlQ29tbWVudDM4ODI2NDM4Ng== | jhamman 2443309 | 2018-05-11T05:33:13Z | 2018-05-11T05:33:13Z | MEMBER | Tests are green here now. @shoyer and @spencerkclark - are we waiting on anything else before merging? |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex 205473898 | |
385832391 | https://github.com/pydata/xarray/pull/1252#issuecomment-385832391 | https://api.github.com/repos/pydata/xarray/issues/1252 | MDEyOklzc3VlQ29tbWVudDM4NTgzMjM5MQ== | shoyer 1217238 | 2018-05-02T00:46:47Z | 2018-05-02T00:46:47Z | MEMBER | See also https://github.com/pydata/xarray/pull/2098, which should fix failing builds on master |
{ "total_count": 1, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex 205473898 | |
385832299 | https://github.com/pydata/xarray/pull/1252#issuecomment-385832299 | https://api.github.com/repos/pydata/xarray/issues/1252 | MDEyOklzc3VlQ29tbWVudDM4NTgzMjI5OQ== | spencerkclark 6628425 | 2018-05-02T00:45:57Z | 2018-05-02T00:45:57Z | MEMBER |
Thanks @shoyer, it looks like that did the trick. I addressed your recent comments; let me know if you have any further feedback. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex 205473898 | |
385451651 | https://github.com/pydata/xarray/pull/1252#issuecomment-385451651 | https://api.github.com/repos/pydata/xarray/issues/1252 | MDEyOklzc3VlQ29tbWVudDM4NTQ1MTY1MQ== | spencerkclark 6628425 | 2018-04-30T16:25:35Z | 2018-04-30T16:25:35Z | MEMBER | @jhamman sure thing, see https://github.com/conda-forge/cftime-feedstock/issues/2. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex 205473898 | |
385447271 | https://github.com/pydata/xarray/pull/1252#issuecomment-385447271 | https://api.github.com/repos/pydata/xarray/issues/1252 | MDEyOklzc3VlQ29tbWVudDM4NTQ0NzI3MQ== | jhamman 2443309 | 2018-04-30T16:10:56Z | 2018-04-30T16:10:56Z | MEMBER | @spencerkclark - mind reporting the conda issue upstream at https://github.com/conda-forge/cftime-feedstock? |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex 205473898 | |
385442360 | https://github.com/pydata/xarray/pull/1252#issuecomment-385442360 | https://api.github.com/repos/pydata/xarray/issues/1252 | MDEyOklzc3VlQ29tbWVudDM4NTQ0MjM2MA== | shoyer 1217238 | 2018-04-30T15:54:33Z | 2018-04-30T15:54:33Z | MEMBER |
OK. In that case, we should probably add a temporary "pip" clause to the requirements file for windows, to install cftime from pypi instead for now. I don't want to merge this when it will break CI. |
{ "total_count": 1, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex 205473898 | |
385379125 | https://github.com/pydata/xarray/pull/1252#issuecomment-385379125 | https://api.github.com/repos/pydata/xarray/issues/1252 | MDEyOklzc3VlQ29tbWVudDM4NTM3OTEyNQ== | spencerkclark 6628425 | 2018-04-30T12:04:46Z | 2018-04-30T12:04:46Z | MEMBER | @ritviksahajpal I see what you mean regarding the version, e.g. this is what I get if I install via my suggestion above: ```
Note that |
{ "total_count": 1, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex 205473898 | |
385374160 | https://github.com/pydata/xarray/pull/1252#issuecomment-385374160 | https://api.github.com/repos/pydata/xarray/issues/1252 | MDEyOklzc3VlQ29tbWVudDM4NTM3NDE2MA== | spencerkclark 6628425 | 2018-04-30T11:39:22Z | 2018-04-30T11:39:22Z | MEMBER |
We did this already in #2054, which is why I suspect this is an upstream packaging issue. Right now on conda-forge the win-32 version of |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex 205473898 | |
385305575 | https://github.com/pydata/xarray/pull/1252#issuecomment-385305575 | https://api.github.com/repos/pydata/xarray/issues/1252 | MDEyOklzc3VlQ29tbWVudDM4NTMwNTU3NQ== | shoyer 1217238 | 2018-04-30T03:06:02Z | 2018-04-30T03:06:02Z | MEMBER | With regards to CI failures, I think it would make sense to add an explicit dependency on |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex 205473898 | |
385301911 | https://github.com/pydata/xarray/pull/1252#issuecomment-385301911 | https://api.github.com/repos/pydata/xarray/issues/1252 | MDEyOklzc3VlQ29tbWVudDM4NTMwMTkxMQ== | spencerkclark 6628425 | 2018-04-30T02:13:49Z | 2018-04-30T02:13:49Z | MEMBER | Thanks for the review @shoyer! I'll try and address your comments tomorrow.
Right, see my comment above:
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex 205473898 | |
385301210 | https://github.com/pydata/xarray/pull/1252#issuecomment-385301210 | https://api.github.com/repos/pydata/xarray/issues/1252 | MDEyOklzc3VlQ29tbWVudDM4NTMwMTIxMA== | shoyer 1217238 | 2018-04-30T02:04:23Z | 2018-04-30T02:04:23Z | MEMBER | It looks like one of the appveyor builds is failing due to something related to cftime missing -- it would be good to fix that |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex 205473898 | |
385299879 | https://github.com/pydata/xarray/pull/1252#issuecomment-385299879 | https://api.github.com/repos/pydata/xarray/issues/1252 | MDEyOklzc3VlQ29tbWVudDM4NTI5OTg3OQ== | ritviksahajpal 2277375 | 2018-04-30T01:46:13Z | 2018-04-30T01:46:13Z | NONE | @spencerkclark , one question. The xarray version from git+https://github.com/spencerkclark/xarray.git@NetCDFTimeIndex seems to be 0.8.2, because of this some things seem to be missing e.g. open_rasterio had a new argument called |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex 205473898 | |
385277222 | https://github.com/pydata/xarray/pull/1252#issuecomment-385277222 | https://api.github.com/repos/pydata/xarray/issues/1252 | MDEyOklzc3VlQ29tbWVudDM4NTI3NzIyMg== | ritviksahajpal 2277375 | 2018-04-29T19:59:46Z | 2018-04-29T19:59:46Z | NONE | works beautifully, thanks so much! |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex 205473898 | |
385267179 | https://github.com/pydata/xarray/pull/1252#issuecomment-385267179 | https://api.github.com/repos/pydata/xarray/issues/1252 | MDEyOklzc3VlQ29tbWVudDM4NTI2NzE3OQ== | ritviksahajpal 2277375 | 2018-04-29T17:28:03Z | 2018-04-29T19:01:56Z | NONE | @spencerkclark, I would like to test your changes on some netCDF files I am processing and which need to handle data in year 2300, thank you so much for enabling it! is there a github url I can get these code changes from? I understand that they might not be absolutely final. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex 205473898 | |
385269239 | https://github.com/pydata/xarray/pull/1252#issuecomment-385269239 | https://api.github.com/repos/pydata/xarray/issues/1252 | MDEyOklzc3VlQ29tbWVudDM4NTI2OTIzOQ== | spencerkclark 6628425 | 2018-04-29T17:57:23Z | 2018-04-29T17:57:23Z | MEMBER | @ritviksahajpal by all means, give it a try! You should be able to install my branch via |
{ "total_count": 1, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex 205473898 | |
385206225 | https://github.com/pydata/xarray/pull/1252#issuecomment-385206225 | https://api.github.com/repos/pydata/xarray/issues/1252 | MDEyOklzc3VlQ29tbWVudDM4NTIwNjIyNQ== | spencerkclark 6628425 | 2018-04-28T21:20:21Z | 2018-04-28T21:20:55Z | MEMBER | Thanks @jhamman, I think this should be ready for a final round of reviews. The failures in Appveyor are due to the fact that the 32-bit Python 2.7 build is not using the latest version of |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex 205473898 | |
385088915 | https://github.com/pydata/xarray/pull/1252#issuecomment-385088915 | https://api.github.com/repos/pydata/xarray/issues/1252 | MDEyOklzc3VlQ29tbWVudDM4NTA4ODkxNQ== | jhamman 2443309 | 2018-04-27T20:43:45Z | 2018-04-27T20:43:45Z | MEMBER | ping @spencerkclark to finish this up. I just released a new version of cftime so this should be ready to wrap up. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex 205473898 | |
381727586 | https://github.com/pydata/xarray/pull/1252#issuecomment-381727586 | https://api.github.com/repos/pydata/xarray/issues/1252 | MDEyOklzc3VlQ29tbWVudDM4MTcyNzU4Ng== | spencerkclark 6628425 | 2018-04-16T19:51:24Z | 2018-04-16T19:51:24Z | MEMBER | I think this is close to being ready. I've updated things for the renaming of The last piece is upstream in Unidata/cftime#39. With that we should be able to slightly modify the logic here to allow us to roundtrip all dates produced via |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex 205473898 | |
381134106 | https://github.com/pydata/xarray/pull/1252#issuecomment-381134106 | https://api.github.com/repos/pydata/xarray/issues/1252 | MDEyOklzc3VlQ29tbWVudDM4MTEzNDEwNg== | spencerkclark 6628425 | 2018-04-13T13:24:41Z | 2018-04-13T13:24:41Z | MEMBER | @jhamman great, I can handle those if you'd like. It's basically just updating what we did in #1920, #1929, and #1933, correct? I'll do that in separate PR, which we can merge before this one. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex 205473898 | |
381131366 | https://github.com/pydata/xarray/pull/1252#issuecomment-381131366 | https://api.github.com/repos/pydata/xarray/issues/1252 | MDEyOklzc3VlQ29tbWVudDM4MTEzMTM2Ng== | jhamman 2443309 | 2018-04-13T13:14:26Z | 2018-04-13T13:14:26Z | MEMBER | @spencerkclark - things are well underway fixing up |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex 205473898 | |
380844768 | https://github.com/pydata/xarray/pull/1252#issuecomment-380844768 | https://api.github.com/repos/pydata/xarray/issues/1252 | MDEyOklzc3VlQ29tbWVudDM4MDg0NDc2OA== | spencerkclark 6628425 | 2018-04-12T15:24:51Z | 2018-04-12T15:24:51Z | MEMBER |
Thanks @jhamman! Once that's done, hopefully we can sure up Unidata/netcdftime#39. I think those are the last outstanding issues here.
I will wait to implement this until the name change and Unidata/netcdftime#39 go through. With Unidata/netcdftime#39 we can make the one failing test here, |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex 205473898 | |
380833398 | https://github.com/pydata/xarray/pull/1252#issuecomment-380833398 | https://api.github.com/repos/pydata/xarray/issues/1252 | MDEyOklzc3VlQ29tbWVudDM4MDgzMzM5OA== | jhamman 2443309 | 2018-04-12T14:51:23Z | 2018-04-12T14:51:23Z | MEMBER | I can push the name change on |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex 205473898 | |
380648582 | https://github.com/pydata/xarray/pull/1252#issuecomment-380648582 | https://api.github.com/repos/pydata/xarray/issues/1252 | MDEyOklzc3VlQ29tbWVudDM4MDY0ODU4Mg== | spencerkclark 6628425 | 2018-04-12T01:47:56Z | 2018-04-12T01:47:56Z | MEMBER |
Yes, I agree we should wait until that issue is addressed so we can adapt things accordingly. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex 205473898 | |
380593243 | https://github.com/pydata/xarray/pull/1252#issuecomment-380593243 | https://api.github.com/repos/pydata/xarray/issues/1252 | MDEyOklzc3VlQ29tbWVudDM4MDU5MzI0Mw== | shoyer 1217238 | 2018-04-11T20:57:37Z | 2018-04-11T20:57:37Z | MEMBER | I think the code is in pretty good shape here. My main concern is about the stability of the As for resampling, this would indeed require custom logic for netcdf datetimes. But I think it would be relatively doable. The key thing would dividing an array of datetimes into frequency groups. Then we could reuse xarray's existing logic for resampling, e.g., https://github.com/pydata/xarray/blob/9b76f219ec314dcb0c9a310c097a34f5c751fdd6/xarray/core/groupby.py#L234-L235 For example, if using Pandas does this logic with offset classes. These are somewhat complex because pandas handles complex business day logic. For netcdftime, we could potentially start from scratch and only handle the important cases for climate science (e.g., round to start for year, quarter, month, day, hour, second). |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex 205473898 | |
380580598 | https://github.com/pydata/xarray/pull/1252#issuecomment-380580598 | https://api.github.com/repos/pydata/xarray/issues/1252 | MDEyOklzc3VlQ29tbWVudDM4MDU4MDU5OA== | agoodm 5179430 | 2018-04-11T20:11:44Z | 2018-04-11T20:14:43Z | CONTRIBUTOR | Hi all, any updates on the current status for this? This will be a big help for me as well in particular for processing daily CMIP5 netcdf files. I have been following this thread as well as the original issue and really appreciate this work. One other question: This PR doesn't allow for resampling on non-standard calendars as is, but I remember @shoyer mentioning that a workaround using pandas |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex 205473898 | |
374787602 | https://github.com/pydata/xarray/pull/1252#issuecomment-374787602 | https://api.github.com/repos/pydata/xarray/issues/1252 | MDEyOklzc3VlQ29tbWVudDM3NDc4NzYwMg== | spencerkclark 6628425 | 2018-03-20T23:07:22Z | 2018-03-20T23:07:22Z | MEMBER | Thanks @shoyer, I agree that would make our life easier here. I created an issue upstream: Unidata/netcdftime#37. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex 205473898 | |
374740025 | https://github.com/pydata/xarray/pull/1252#issuecomment-374740025 | https://api.github.com/repos/pydata/xarray/issues/1252 | MDEyOklzc3VlQ29tbWVudDM3NDc0MDAyNQ== | shoyer 1217238 | 2018-03-20T20:11:37Z | 2018-03-20T20:11:37Z | MEMBER | I think netcdftime should have a version of num2date that always returns netcdftime.datetime objects. It's really error prone to functions that turn different types dependent on input values. On Tue, Mar 20, 2018 at 11:39 AM Spencer Clark notifications@github.com wrote:
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex 205473898 | |
374711420 | https://github.com/pydata/xarray/pull/1252#issuecomment-374711420 | https://api.github.com/repos/pydata/xarray/issues/1252 | MDEyOklzc3VlQ29tbWVudDM3NDcxMTQyMA== | spencerkclark 6628425 | 2018-03-20T18:39:56Z | 2018-03-20T18:39:56Z | MEMBER | It occurred to me that One thing that makes the logic a bit messier here is that determining the calendar type for encoding The rationale behind this more complicated logic has to do with how it appears ```python
Given the fact that it does not seem possible to decode times after the start of the Gregorian calendar into dates of type
@jswhit, @jhamman -- is this behavior expected for netcdftime? Is there a recommended robust way for determining the calendar type for roundtripping between |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex 205473898 | |
374091871 | https://github.com/pydata/xarray/pull/1252#issuecomment-374091871 | https://api.github.com/repos/pydata/xarray/issues/1252 | MDEyOklzc3VlQ29tbWVudDM3NDA5MTg3MQ== | spencerahill 6200806 | 2018-03-19T03:35:05Z | 2018-03-19T03:35:05Z | CONTRIBUTOR | Just seeing this. I'm tied up the next couple days but would be happy to review it on Wednesday. Although I doubt I'll find anything you or @shoyer wouldn't, so feel free to merge if you'd rather not hold it up another few days. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex 205473898 | |
373812493 | https://github.com/pydata/xarray/pull/1252#issuecomment-373812493 | https://api.github.com/repos/pydata/xarray/issues/1252 | MDEyOklzc3VlQ29tbWVudDM3MzgxMjQ5Mw== | jhamman 2443309 | 2018-03-16T18:56:50Z | 2018-03-16T18:56:50Z | MEMBER | I'm sufficiently pleased with this that I think we can merge this in more or less its current state. Given the size of the PR though, I'd like to have one more person review it in detail before it goes in. Any takers from @pydata/xarray? Maybe @spencerahill? |
{ "total_count": 1, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex 205473898 | |
372079447 | https://github.com/pydata/xarray/pull/1252#issuecomment-372079447 | https://api.github.com/repos/pydata/xarray/issues/1252 | MDEyOklzc3VlQ29tbWVudDM3MjA3OTQ0Nw== | spencerkclark 6628425 | 2018-03-11T00:41:21Z | 2018-03-11T00:41:21Z | MEMBER | With these latest commits, I think the new behavior should now be completely behind the Note that because I wanted the convenience of using |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex 205473898 | |
372029836 | https://github.com/pydata/xarray/pull/1252#issuecomment-372029836 | https://api.github.com/repos/pydata/xarray/issues/1252 | MDEyOklzc3VlQ29tbWVudDM3MjAyOTgzNg== | spencerkclark 6628425 | 2018-03-10T13:26:01Z | 2018-03-10T13:26:01Z | MEMBER | @jhamman thanks, those are good questions.
Yes, I like @shoyer's idea here, and I'll see what I can do over the next few days.
Agreed -- I'll make sure to add these as well. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex 205473898 | |
371989308 | https://github.com/pydata/xarray/pull/1252#issuecomment-371989308 | https://api.github.com/repos/pydata/xarray/issues/1252 | MDEyOklzc3VlQ29tbWVudDM3MTk4OTMwOA== | shoyer 1217238 | 2018-03-10T01:14:36Z | 2018-03-10T01:14:36Z | MEMBER | Can we potentially merge this behind a flag for now, e.g., you only get the new behavior if you explicitly set an option, e.g., There's something to be said for getting code merged when it's ready, regardless of whether we are currently issuing a breaking release. This would also let the new index get some testing in before we turn it on by default. |
{ "total_count": 1, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex 205473898 | |
371988210 | https://github.com/pydata/xarray/pull/1252#issuecomment-371988210 | https://api.github.com/repos/pydata/xarray/issues/1252 | MDEyOklzc3VlQ29tbWVudDM3MTk4ODIxMA== | jhamman 2443309 | 2018-03-10T01:04:38Z | 2018-03-10T01:04:38Z | MEMBER |
Right. Those will be fixed once I merge #1793. |
{ "total_count": 1, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex 205473898 | |
371937200 | https://github.com/pydata/xarray/pull/1252#issuecomment-371937200 | https://api.github.com/repos/pydata/xarray/issues/1252 | MDEyOklzc3VlQ29tbWVudDM3MTkzNzIwMA== | spencerkclark 6628425 | 2018-03-09T20:31:59Z | 2018-03-09T20:31:59Z | MEMBER | @jhamman @shoyer with I've held off on writing a what's new entry for now, because I know that we'd like to wait for a major release to merge this (as this contains a breaking change for handling of dates with non-standard calendars). |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex 205473898 | |
358829484 | https://github.com/pydata/xarray/pull/1252#issuecomment-358829484 | https://api.github.com/repos/pydata/xarray/issues/1252 | MDEyOklzc3VlQ29tbWVudDM1ODgyOTQ4NA== | jhamman 2443309 | 2018-01-19T00:37:00Z | 2018-01-19T00:37:00Z | MEMBER | cc @matt-long who was interested in this. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex 205473898 | |
309539617 | https://github.com/pydata/xarray/pull/1252#issuecomment-309539617 | https://api.github.com/repos/pydata/xarray/issues/1252 | MDEyOklzc3VlQ29tbWVudDMwOTUzOTYxNw== | spencerkclark 6628425 | 2017-06-19T19:16:22Z | 2017-06-19T19:16:22Z | MEMBER | @jhamman thanks a lot for the comments and for your work towards splitting |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex 205473898 | |
307828790 | https://github.com/pydata/xarray/pull/1252#issuecomment-307828790 | https://api.github.com/repos/pydata/xarray/issues/1252 | MDEyOklzc3VlQ29tbWVudDMwNzgyODc5MA== | spencerkclark 6628425 | 2017-06-12T15:40:54Z | 2017-06-12T15:40:54Z | MEMBER | @spencerahill yes, my subsequent commits resolved the test failures associated both with the pandas update and with #1356. On a broader note it would be great to make some more progress on this. I've noted a few specific questions above, but obviously would appreciate feedback on any aspect of these changes. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex 205473898 | |
307813862 | https://github.com/pydata/xarray/pull/1252#issuecomment-307813862 | https://api.github.com/repos/pydata/xarray/issues/1252 | MDEyOklzc3VlQ29tbWVudDMwNzgxMzg2Mg== | spencerahill 6200806 | 2017-06-12T14:53:26Z | 2017-06-12T14:53:26Z | CONTRIBUTOR | Pinging folks on this. Summer is upon us and, generally speaking for the academics among us, is a good time for projects like this. @spencerkclark looks like you're still looking for guidance w/r/t the last batch of comments from May 10.
Did your subsequent commits resolve this? |
{ "total_count": 1, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex 205473898 | |
300666509 | https://github.com/pydata/xarray/pull/1252#issuecomment-300666509 | https://api.github.com/repos/pydata/xarray/issues/1252 | MDEyOklzc3VlQ29tbWVudDMwMDY2NjUwOQ== | shoyer 1217238 | 2017-05-11T02:37:43Z | 2017-05-11T02:37:43Z | MEMBER | I think your test failures may actually be related to https://github.com/pydata/xarray/pull/1356 in xarray |
{ "total_count": 1, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex 205473898 | |
300662278 | https://github.com/pydata/xarray/pull/1252#issuecomment-300662278 | https://api.github.com/repos/pydata/xarray/issues/1252 | MDEyOklzc3VlQ29tbWVudDMwMDY2MjI3OA== | spencerkclark 6628425 | 2017-05-11T02:06:11Z | 2017-05-11T02:06:11Z | MEMBER | From the CI it also looks like I need to accommodate some updates in pandas in |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex 205473898 | |
300654851 | https://github.com/pydata/xarray/pull/1252#issuecomment-300654851 | https://api.github.com/repos/pydata/xarray/issues/1252 | MDEyOklzc3VlQ29tbWVudDMwMDY1NDg1MQ== | spencerkclark 6628425 | 2017-05-11T01:12:54Z | 2017-05-11T01:12:54Z | MEMBER |
@jhamman sure thing -- I just pushed some updates to show where I'm at. I've made a first pass at the following:
- Resetting the logic for decoding datetimes such that I've added and updated some tests, but it's possible some may be redundant, and others could still be needed. Hopefully with some guidance from you and @shoyer I can clean things up. I'll add a couple comments to the latest diff to highlight a few questions that came up as I was making these changes.
I agree this would be quite useful. pandas' implementation is pretty complicated, but perhaps we could do something, possibly more limited, but simpler. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex 205473898 | |
300547434 | https://github.com/pydata/xarray/pull/1252#issuecomment-300547434 | https://api.github.com/repos/pydata/xarray/issues/1252 | MDEyOklzc3VlQ29tbWVudDMwMDU0NzQzNA== | jhamman 2443309 | 2017-05-10T17:02:17Z | 2017-05-10T17:02:17Z | MEMBER | @spencerkclark - two questions.
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex 205473898 | |
296795890 | https://github.com/pydata/xarray/pull/1252#issuecomment-296795890 | https://api.github.com/repos/pydata/xarray/issues/1252 | MDEyOklzc3VlQ29tbWVudDI5Njc5NTg5MA== | spencerkclark 6628425 | 2017-04-24T19:21:51Z | 2017-04-24T19:21:51Z | MEMBER | Thanks for jumping in @jhamman -- that is my inclination as well. I will start along this path unless anyone else has any objections. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex 205473898 | |
296787111 | https://github.com/pydata/xarray/pull/1252#issuecomment-296787111 | https://api.github.com/repos/pydata/xarray/issues/1252 | MDEyOklzc3VlQ29tbWVudDI5Njc4NzExMQ== | jhamman 2443309 | 2017-04-24T18:47:24Z | 2017-04-24T18:47:24Z | MEMBER | My two cents. I think we want:
Presumably, we can address many of the negatives with this approach with follow-on PRs. The fallback logic in xarray right now for non-standard calendars is not something we want to keep and was mostly meant as a stop-gap until this feature came along. |
{ "total_count": 2, "+1": 2, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex 205473898 | |
296497798 | https://github.com/pydata/xarray/pull/1252#issuecomment-296497798 | https://api.github.com/repos/pydata/xarray/issues/1252 | MDEyOklzc3VlQ29tbWVudDI5NjQ5Nzc5OA== | shoyer 1217238 | 2017-04-23T23:48:29Z | 2017-04-23T23:48:29Z | MEMBER | I'm happy to defer to whatever non-standard calendar users think about be most useful. Possibly @jhamman has an opinion here. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex 205473898 | |
296483716 | https://github.com/pydata/xarray/pull/1252#issuecomment-296483716 | https://api.github.com/repos/pydata/xarray/issues/1252 | MDEyOklzc3VlQ29tbWVudDI5NjQ4MzcxNg== | spencerkclark 6628425 | 2017-04-23T19:47:26Z | 2017-04-23T19:47:26Z | MEMBER |
Right. To what extent do we want to preserve the current behavior? As I understand it, what is currently done is regardless of the calendar type, every effort is made to convert decoded datetimes into
The main advantage of doing this is that it enables, wherever possible, 1D arrays of datetimes to be converted to DatetimeIndexes and all the nice things that comes with them:
This practice has one disadvantage -- the calendar type of the datetimes is not preserved. Therefore if one tries to do timedelta arithmetic between values in the array, (e.g. Mar. 1st, 2001 minus Feb. 1st, 2001) one might get an inaccurate answer depending on what the original calendar type was (as was noted when this was originally implemented, and to be fair, I don't think timedelta arithmetic was even possible on OptionsI can think of two ways to proceed in integrating
Tradeoffs
This is perhaps the the least dramatic change one could make. It would involve not modifying the decoding logic at all (i.e. continuing to be aggressive in attempting to convert
As has been discussed, the current implementation of I suppose this comes down to weighing the importance of addressing the timedelta issue (perhaps more generally preserving calendar types) versus preserving existing behavior that allows (3) and (4) for some cases with non-standard calendars. Is this an accurate summary of the considerations we should make here? What are folks' opinions on these tradeoffs? What might be the preferred route to take? |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex 205473898 | |
294380680 | https://github.com/pydata/xarray/pull/1252#issuecomment-294380680 | https://api.github.com/repos/pydata/xarray/issues/1252 | MDEyOklzc3VlQ29tbWVudDI5NDM4MDY4MA== | shoyer 1217238 | 2017-04-16T23:38:55Z | 2017-04-16T23:38:55Z | MEMBER |
Yes, this seems about right to me. We'll want to save this for a major release (v0.10), since it will be backwards incompatible. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex 205473898 | |
294360994 | https://github.com/pydata/xarray/pull/1252#issuecomment-294360994 | https://api.github.com/repos/pydata/xarray/issues/1252 | MDEyOklzc3VlQ29tbWVudDI5NDM2MDk5NA== | spencerkclark 6628425 | 2017-04-16T16:35:13Z | 2017-04-16T16:35:13Z | MEMBER | Sorry for letting this slip these last couple months — I should have time to make some more meaningful progress on this over the next few weeks. @shoyer when you get a chance, could you let me know what you think the next important steps are for this PR? Pending more cleanup on the NetCDFTimeIndex portion (both the index and its tests) are we ready to start thinking about how to include this in xarray's existing logic for decoding and encoding dates? As a side note, I have an initial attempt at addressing Unidata/netcdftime#8 and Unidata/netcdftime#9 in Unidata/netcdftime#12. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex 205473898 | |
280856640 | https://github.com/pydata/xarray/pull/1252#issuecomment-280856640 | https://api.github.com/repos/pydata/xarray/issues/1252 | MDEyOklzc3VlQ29tbWVudDI4MDg1NjY0MA== | spencerkclark 6628425 | 2017-02-18T16:31:39Z | 2017-02-18T16:31:39Z | MEMBER | @spencerahill many thanks for looking into this further. I agree that simulations of tens of thousands of years are beginning to appear on the research landscape, and shouldn't necessarily be a use-case we dismiss.
I think it's important to note that it doesn't matter how the date information is stored in the original files; what matters is what it looks like once it's decoded. If someone analyzing this simulation would like to use a NetCDFTimeIndex, it would require that they decode these floats into actual datetimes (which would need five-digit years to express). So they would need support for five digit (possibly negative) years in partial datetime string indexing. As a side note though, this decoding is currently not possible with I'll need to think more about options for date parsing; ideally I would like there to be at least one common string format that one could use to specify dates for both a NetCDFTimeIndex and a DatetimeIndex (with the ISO8601 parser we have now, supporting only 4-digit, positive years, I believe that is currently the case). If we can achieve that while adding support for five-digit and negative years, that would be great, but perhaps it's best to leave that for a future PR. |
{ "total_count": 1, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex 205473898 | |
280726382 | https://github.com/pydata/xarray/pull/1252#issuecomment-280726382 | https://api.github.com/repos/pydata/xarray/issues/1252 | MDEyOklzc3VlQ29tbWVudDI4MDcyNjM4Mg== | spencerahill 6200806 | 2017-02-17T18:18:48Z | 2017-02-17T18:18:48Z | CONTRIBUTOR | @spencerkclark @shoyer I got some more concrete information c.f. on my previous comment on negative and/or 5 digit dates. The TRACE simulation outputs netCDF files uses units of thousands of years relative to 1950, and therefore doesn't use 5 integers. But it does use negative and positive floats...negative for <1950, positive for >1950. Re: 5 digits, there is growing research interest in very long climate model integrations, e.g. http://www.longrunmip.org/, but even those for now appear <10k yr in duration. But there are also so called EMICs (Earth Models of Intermediate Complexity) that are cheap to run for 1000s of years. Although I couldn't immediately find any published results using them for >10k yr duration... So ultimately I'd say there definitely exists a use-case for negative times (albeit with odd format) and there likely exists a use-case for 5 digit years. IMHO these are not must-haves for the initial netcdftime implementation but should at least be kept in mind, i.e. code design that makes them not-overly-difficult to introduce eventually. I suspect there are xarray users with more direct experience with these cases...feel free to chime in |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex 205473898 | |
279186402 | https://github.com/pydata/xarray/pull/1252#issuecomment-279186402 | https://api.github.com/repos/pydata/xarray/issues/1252 | MDEyOklzc3VlQ29tbWVudDI3OTE4NjQwMg== | shoyer 1217238 | 2017-02-12T00:24:08Z | 2017-02-12T00:24:08Z | MEMBER | Okay this seems like a netcdftime bug. Can you report this upstream? On Sat, Feb 11, 2017 at 4:18 PM Spencer Clark notifications@github.com wrote:
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex 205473898 | |
279183739 | https://github.com/pydata/xarray/pull/1252#issuecomment-279183739 | https://api.github.com/repos/pydata/xarray/issues/1252 | MDEyOklzc3VlQ29tbWVudDI3OTE4MzczOQ== | spencerkclark 6628425 | 2017-02-11T23:30:43Z | 2017-02-11T23:30:43Z | MEMBER | @shoyer when you get a chance, things are ready for another review. I think the AppVeyor issues may be due to the version of netCDF4 used. Should we switch to the conda-forge channel to set up the environment there? |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex 205473898 | |
278190474 | https://github.com/pydata/xarray/pull/1252#issuecomment-278190474 | https://api.github.com/repos/pydata/xarray/issues/1252 | MDEyOklzc3VlQ29tbWVudDI3ODE5MDQ3NA== | spencerkclark 6628425 | 2017-02-08T00:29:41Z | 2017-02-08T00:29:41Z | MEMBER | @shoyer thanks for your initial review comments. I'll try and push an update in the next few days. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex 205473898 | |
277935033 | https://github.com/pydata/xarray/pull/1252#issuecomment-277935033 | https://api.github.com/repos/pydata/xarray/issues/1252 | MDEyOklzc3VlQ29tbWVudDI3NzkzNTAzMw== | shoyer 1217238 | 2017-02-07T08:42:21Z | 2017-02-07T08:42:21Z | MEMBER |
Yes, this would be best addressed upstream in netcdftime. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex 205473898 | |
277849999 | https://github.com/pydata/xarray/pull/1252#issuecomment-277849999 | https://api.github.com/repos/pydata/xarray/issues/1252 | MDEyOklzc3VlQ29tbWVudDI3Nzg0OTk5OQ== | max-sixty 5635139 | 2017-02-06T23:36:03Z | 2017-02-06T23:36:03Z | MEMBER | That looks awesome! Quite a turn around there. Yes, good point on the |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex 205473898 | |
277825984 | https://github.com/pydata/xarray/pull/1252#issuecomment-277825984 | https://api.github.com/repos/pydata/xarray/issues/1252 | MDEyOklzc3VlQ29tbWVudDI3NzgyNTk4NA== | spencerkclark 6628425 | 2017-02-06T21:53:00Z | 2017-02-06T21:53:00Z | MEMBER | @MaximilianR 6496458 contains an updated version of the file containing the tests, updated to use Overall pytest seems to clean things up pretty nicely. One problem that I wish I had a better solution for happens when I am testing indexing operations in DataArrays, Series, and DataFrames. There are multiple ways of getting the same answer, which makes these tests a good candidate for using For instance, it would be great if I could write something like:
But I can't use In any event, when you get a chance, please let me know if you have any comments / suggestions on my latest push. Thanks again for your help. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex 205473898 | |
277747515 | https://github.com/pydata/xarray/pull/1252#issuecomment-277747515 | https://api.github.com/repos/pydata/xarray/issues/1252 | MDEyOklzc3VlQ29tbWVudDI3Nzc0NzUxNQ== | max-sixty 5635139 | 2017-02-06T17:11:24Z | 2017-02-06T17:11:24Z | MEMBER | Not far off, although no need to use things like More than happy to offer any guidance on tests if helpful - post an example. pytest is really nice, even if it takes a bit of time to get used to |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex 205473898 | |
277729964 | https://github.com/pydata/xarray/pull/1252#issuecomment-277729964 | https://api.github.com/repos/pydata/xarray/issues/1252 | MDEyOklzc3VlQ29tbWVudDI3NzcyOTk2NA== | spencerkclark 6628425 | 2017-02-06T16:12:18Z | 2017-02-06T16:12:18Z | MEMBER | @MaximilianR I think I'm getting the hang of it; ignore the above. I'll push a new update to the PR in a bit. |
{ "total_count": 1, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex 205473898 | |
277703296 | https://github.com/pydata/xarray/pull/1252#issuecomment-277703296 | https://api.github.com/repos/pydata/xarray/issues/1252 | MDEyOklzc3VlQ29tbWVudDI3NzcwMzI5Ng== | spencerkclark 6628425 | 2017-02-06T14:46:36Z | 2017-02-06T15:09:35Z | MEMBER | Thanks for the quick feedback on the tests @MaximilianR. Is this on the right track for doing things a little more idiomatically with ```python import pytest from xarray.tests import assert_array_equal def netcdftime_date_types(): pytest.importorskip('netCDF4')
@pytest.fixture(params=[]) def index(request): from xarray.core.netcdftimeindex import NetCDFTimeIndex
@pytest.mark.parametrize('index', netcdftime_date_types(), indirect=True) @pytest.mark.parametrize(('field', 'expected'), [ ('year', [1, 1, 2, 2]), ('month', [1, 2, 1, 2]), ('day', [1, 1, 1, 1]), ('hour', [0, 0, 0, 0]), ('minute', [0, 0, 0, 0]), ('second', [0, 0, 0, 0]), ('microsecond', [0, 0, 0, 0]) ], ids=['year', 'month', 'day', 'hour', 'minute', 'second', 'microsecond']) def test_netcdftimeindex_field_accessors(index, field, expected): result = getattr(index, field) assert_array_equal(result, expected) ``` |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
CFTimeIndex 205473898 |
Advanced export
JSON shape: default, array, newline-delimited, object
CREATE TABLE [issue_comments] ( [html_url] TEXT, [issue_url] TEXT, [id] INTEGER PRIMARY KEY, [node_id] TEXT, [user] INTEGER REFERENCES [users]([id]), [created_at] TEXT, [updated_at] TEXT, [author_association] TEXT, [body] TEXT, [reactions] TEXT, [performed_via_github_app] TEXT, [issue] INTEGER REFERENCES [issues]([id]) ); CREATE INDEX [idx_issue_comments_issue] ON [issue_comments] ([issue]); CREATE INDEX [idx_issue_comments_user] ON [issue_comments] ([user]);
user 9