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/1449#issuecomment-786735133,https://api.github.com/repos/pydata/xarray/issues/1449,786735133,MDEyOklzc3VlQ29tbWVudDc4NjczNTEzMw==,900941,2021-02-26T16:01:15Z,2021-02-26T16:46:33Z,CONTRIBUTOR,"Hi, I have a similar problem. We have model runs starting at 0Z and 12Z so the ones starting at 0Z don't have time (only date) in the unit string, which is not consistent... Is there a workaround?","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,235224055 https://github.com/pydata/xarray/issues/1584#issuecomment-331327013,https://api.github.com/repos/pydata/xarray/issues/1584,331327013,MDEyOklzc3VlQ29tbWVudDMzMTMyNzAxMw==,900941,2017-09-22T01:40:06Z,2017-09-22T01:40:06Z,CONTRIBUTOR,"I have to mention that this test fails probably because of my ultra HD screen. Cheers","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,259606704 https://github.com/pydata/xarray/pull/1580#issuecomment-330672715,https://api.github.com/repos/pydata/xarray/issues/1580,330672715,MDEyOklzc3VlQ29tbWVudDMzMDY3MjcxNQ==,900941,2017-09-19T21:02:53Z,2017-09-19T21:02:53Z,CONTRIBUTOR,"Thanks @spencerahill py.test seems to be working Cheers","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,258884482 https://github.com/pydata/xarray/pull/1580#issuecomment-330663981,https://api.github.com/repos/pydata/xarray/issues/1580,330663981,MDEyOklzc3VlQ29tbWVudDMzMDY2Mzk4MQ==,900941,2017-09-19T20:29:58Z,2017-09-19T20:31:01Z,CONTRIBUTOR,"Thanks @spencerahill: I have run the flake8 test and modified the whats-new.rst. I think I need more guidance with the tests. I tried using nosetests and get the following exceptions (I am sure I am doing smth wrong here): ``` $ nosetests /Users/huziy/anaconda/envs/py3.6/lib/python3.6/site-packages/matplotlib/__init__.py:917: UserWarning: axes.hold is deprecated. Please remove it from your matplotlibrc and/or style files. warnings.warn(self.msg_depr_set % key) /Users/huziy/anaconda/envs/py3.6/lib/python3.6/site-packages/matplotlib/rcsetup.py:152: UserWarning: axes.hold is deprecated, will be removed in 3.0 warnings.warn(""axes.hold is deprecated, will be removed in 3.0"") E ====================================================================== ERROR: Failure: AttributeError (module 'pytest' has no attribute 'config') ---------------------------------------------------------------------- Traceback (most recent call last): File ""/Users/huziy/anaconda/envs/py3.6/lib/python3.6/site-packages/nose/failure.py"", line 39, in runTest raise self.exc_val.with_traceback(self.tb) File ""/Users/huziy/anaconda/envs/py3.6/lib/python3.6/site-packages/nose/loader.py"", line 417, in loadTestsFromName addr.filename, addr.module) File ""/Users/huziy/anaconda/envs/py3.6/lib/python3.6/site-packages/nose/importer.py"", line 47, in importFromPath return self.importFromDir(dir_path, fqname) File ""/Users/huziy/anaconda/envs/py3.6/lib/python3.6/site-packages/nose/importer.py"", line 94, in importFromDir mod = load_module(part_fqname, fh, filename, desc) File ""/Users/huziy/anaconda/envs/py3.6/lib/python3.6/imp.py"", line 244, in load_module return load_package(name, filename) File ""/Users/huziy/anaconda/envs/py3.6/lib/python3.6/imp.py"", line 216, in load_package return _load(spec) File """", line 675, in _load File """", line 655, in _load_unlocked File """", line 678, in exec_module File """", line 205, in _call_with_frames_removed File ""/Users/huziy/PythonProjects/xarray/xarray/tests/__init__.py"", line 130, in _SKIP_FLAKY = not pytest.config.getoption(""--run-flaky"") AttributeError: module 'pytest' has no attribute 'config' ---------------------------------------------------------------------- Ran 1 test in 0.582s FAILED (errors=1) ``` Cheers ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,258884482 https://github.com/pydata/xarray/issues/438#issuecomment-330592365,https://api.github.com/repos/pydata/xarray/issues/438,330592365,MDEyOklzc3VlQ29tbWVudDMzMDU5MjM2NQ==,900941,2017-09-19T16:16:57Z,2017-09-19T16:16:57Z,CONTRIBUTOR,"Thanks @shoyer: Is there a how to contribute guide? I basically look for how to write a test and run test to check if my adding this option did not break anything... Cheers ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,89268800 https://github.com/pydata/xarray/issues/438#issuecomment-330580615,https://api.github.com/repos/pydata/xarray/issues/438,330580615,MDEyOklzc3VlQ29tbWVudDMzMDU4MDYxNQ==,900941,2017-09-19T15:39:53Z,2017-09-19T15:40:40Z,CONTRIBUTOR,"This seems to be working, and no deprecation warning... (But probably I have to sort paths...) ```python In [8]: ds = xarray.concat([xarray.open_dataset(p, chunks={""time"": 100}) for p in paths], data_vars=""minimal"", dim=""time"") In [9]: ds Out[9]: Dimensions: (time: 13505, x: 782, y: 808) Coordinates: * x (x) float64 -4.556e+06 -4.546e+06 -4.536e+06 ... * y (y) float64 4.98e+06 4.97e+06 4.96e+06 4.95e+06 ... * time (time) datetime64[ns] 1993-01-01T12:00:09.140797440 ... Data variables: lon (y, x) float64 156.5 156.5 156.6 156.6 156.7 ... lat (y, x) float64 58.55 58.64 58.72 58.81 58.9 ... lambert_conformal_conic int16 -32767 tmin (time, y, x) float64 nan nan nan nan nan nan ... In [10]: lon = ds[""lon""] In [11]: lon.ndim Out[11]: 2 ``` Cheers","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,89268800 https://github.com/pydata/xarray/issues/438#issuecomment-330569786,https://api.github.com/repos/pydata/xarray/issues/438,330569786,MDEyOklzc3VlQ29tbWVudDMzMDU2OTc4Ng==,900941,2017-09-19T15:05:27Z,2017-09-19T15:05:49Z,CONTRIBUTOR,"Thanks @spencerahill : You are right, but the error message won't change, since the data_vars keyword is not known, and I am not able to change the dataset's attribute data_vars. I think I have to use concat explicitly... Cheers","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,89268800 https://github.com/pydata/xarray/issues/438#issuecomment-330567549,https://api.github.com/repos/pydata/xarray/issues/438,330567549,MDEyOklzc3VlQ29tbWVudDMzMDU2NzU0OQ==,900941,2017-09-19T14:58:55Z,2017-09-19T14:58:55Z,CONTRIBUTOR,"Hi @shoyer: where is this `data_vars='minimal'` set? or maybe I am using a wrong version of xarray? Here is what I get ```python In [10]: ds = xarray.open_mfdataset(""/snow3/huziy/Daymet_daily_derivatives/daymet_spatial_agg_tmin_10x10/daymet_v3_tmin_*.nc4"", data_vars=""minimum"") --------------------------------------------------------------------------- TypeError Traceback (most recent call last) in () ----> 1 ds = xarray.open_mfdataset(""/snow3/huziy/Daymet_daily_derivatives/daymet_spatial_agg_tmin_10x10/daymet_v3_tmin_*.nc4"", data_vars=""minimum"") /snow3/huziy/Python/python_builds/anaconda3/envs/py3.6-a3/lib/python3.6/site-packages/xarray/backends/api.py in open_mfdataset(paths, chunks, concat_dim, compat, preprocess, engine, lock, **kwargs) 503 paths = sorted(glob(paths)) 504 else: --> 505 paths = [str(p) if isinstance(p, path_type) else p for p in paths] 506 507 if not paths: /snow3/huziy/Python/python_builds/anaconda3/envs/py3.6-a3/lib/python3.6/site-packages/xarray/backends/api.py in (.0) 503 paths = sorted(glob(paths)) 504 else: --> 505 paths = [str(p) if isinstance(p, path_type) else p for p in paths] 506 507 if not paths: TypeError: open_dataset() got an unexpected keyword argument 'data_vars' In [11]: ds = xarray.open_mfdataset(""/snow3/huziy/Daymet_daily_derivatives/daymet_spatial_agg_tmin_10x10/daymet_v3_tmin_*.nc4"") In [12]: ds.data_vars = ""minimum"" --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) in () ----> 1 ds.data_vars = ""minimum"" /snow3/huziy/Python/python_builds/anaconda3/envs/py3.6-a3/lib/python3.6/site-packages/xarray/core/common.py in __setattr__(self, name, value) 180 raise AttributeError( 181 ""cannot set attribute %r on a %r object. Use __setitem__ "" --> 182 ""style assignment (e.g., `ds['name'] = ...`) instead to "" 183 ""assign variables."" % (name, type(self).__name__)) 184 object.__setattr__(self, name, value) AttributeError: can't set attribute In [13]: ds.data_vars Out[13]: Data variables: tmin (time, y, x) float64 nan nan nan nan nan nan ... lon (time, y, x) float64 156.5 156.5 156.6 156.6 ... lat (time, y, x) float64 58.55 58.64 58.72 58.81 ... lambert_conformal_conic (time) int64 -32767 -32767 -32767 -32767 -32767 ... In [16]: xarray.__version__ Out[16]: '0.9.6' ``` Cheers ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,89268800 https://github.com/pydata/xarray/issues/1132#issuecomment-268021977,https://api.github.com/repos/pydata/xarray/issues/1132,268021977,MDEyOklzc3VlQ29tbWVudDI2ODAyMTk3Nw==,900941,2016-12-19T17:15:17Z,2016-12-19T17:15:17Z,CONTRIBUTOR,"Thanks, I'll try to use the github version. Cheers","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,190683531 https://github.com/pydata/xarray/issues/1132#issuecomment-268020632,https://api.github.com/repos/pydata/xarray/issues/1132,268020632,MDEyOklzc3VlQ29tbWVudDI2ODAyMDYzMg==,900941,2016-12-19T17:10:09Z,2016-12-19T17:10:09Z,CONTRIBUTOR,"Hi: Here I have an example that have worked until recently... https://github.com/guziy/PyNotebooks/blob/master/xarray/test_grouping.ipynb Of course there is a resample function, but sometimes you want grouping... Are there any plans to add a function as a key to the groupby function? Cheers ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,190683531 https://github.com/pydata/xarray/issues/1041#issuecomment-252193599,https://api.github.com/repos/pydata/xarray/issues/1041,252193599,MDEyOklzc3VlQ29tbWVudDI1MjE5MzU5OQ==,900941,2016-10-07T09:26:28Z,2016-10-07T09:26:59Z,CONTRIBUTOR,"Hi @shoyer: > Does a2.resample(""D"", ""time"") work in your second example? with `a2.resample(""D"", ""time"")` I get the following exception: ``` ValueError: 'time' not found in array dimensions ('t',) ``` > but I think this is working as intended -- if you only supply the name of a dimension with integer labels, xarray has no way to know how what times to use for resampling. I am not sure how it is done now or whether it is possible to implement, but I feel like it searches for the coordinate with the same name as the supplied dimension. Probably searching for a coordinate containing only the dimension specified in resample could do the trick. Maybe there is a better way to do what I am trying to do?: I needed it to calculate daily means. But I have a hole in my data in the middle of the year and resample is masking this hole, by adding masked fields. So I've done it with groupby as follows, but it seems there should be an easier way to achieve this: ``` python day_dates = [datetime(d.year, d.month, d.day) for d in pd.to_datetime(snfl.coords[""t""].values)] day_dates = DataArray(day_dates, name=""time"", dims=""t"") snfl = snfl.groupby(day_dates).mean(dim=""t"") ``` ","{""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,181534708