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/688#issuecomment-486781345,https://api.github.com/repos/pydata/xarray/issues/688,486781345,MDEyOklzc3VlQ29tbWVudDQ4Njc4MTM0NQ==,26384082,2019-04-25T18:12:43Z,2019-04-25T18:12:43Z,NONE,"In order to maintain a list of currently relevant issues, we mark issues as stale after a period of inactivity If this issue remains relevant, please comment here or remove the `stale` label; otherwise it will be marked as closed automatically ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,124154674 https://github.com/pydata/xarray/issues/688#issuecomment-304077718,https://api.github.com/repos/pydata/xarray/issues/688,304077718,MDEyOklzc3VlQ29tbWVudDMwNDA3NzcxOA==,8699967,2017-05-25T17:55:15Z,2017-05-25T17:55:15Z,CONTRIBUTOR,Strange. But I can't seem to re-produce the issue. Maybe it was on a Windows machine or maybe it is fixed now.,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,124154674 https://github.com/pydata/xarray/issues/688#issuecomment-304060814,https://api.github.com/repos/pydata/xarray/issues/688,304060814,MDEyOklzc3VlQ29tbWVudDMwNDA2MDgxNA==,1217238,2017-05-25T16:49:17Z,2017-05-25T16:49:17Z,MEMBER,@snowman2 can you print an example of what `self.data` looks like? And desired vs. actual output if you remove those lines to add in the coordinates manually?,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,124154674 https://github.com/pydata/xarray/issues/688#issuecomment-304003816,https://api.github.com/repos/pydata/xarray/issues/688,304003816,MDEyOklzc3VlQ29tbWVudDMwNDAwMzgxNg==,8699967,2017-05-25T12:57:34Z,2017-05-25T12:57:34Z,CONTRIBUTOR,"@shoyer, thanks for looking into it. I am resampling from 3hr data to 1hr data. ```python resampled_ds = ds.resample('1H', dim='time', keep_attrs=True) ``` I am using it here: https://github.com/CI-WATER/gsshapy/blob/f4e5cb13c1d528021e1953859b712553a4162311/gsshapy/grid/grid_to_gssha.py#L789-L844 I ran into the issue there and had to add code to make sure the coordinates were copied. Thanks! ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,124154674 https://github.com/pydata/xarray/issues/688#issuecomment-303900776,https://api.github.com/repos/pydata/xarray/issues/688,303900776,MDEyOklzc3VlQ29tbWVudDMwMzkwMDc3Ng==,1217238,2017-05-25T01:54:51Z,2017-05-25T01:54:51Z,MEMBER,"@snowman2 I tried to reproduce your issue, but I couldn't make `resample` drop coordinates: ```python In [21]: ds = xarray.tutorial.load_dataset('rasm') In [22]: ds.resample('AS', 'time', how=np.sum) Out[22]: Dimensions: (time: 4, x: 275, y: 205) Coordinates: yc (y, x) float64 16.53 16.78 17.02 17.27 17.51 17.76 18.0 18.25 ... xc (y, x) float64 189.2 189.4 189.6 189.7 189.9 190.1 190.2 190.4 ... * time (time) datetime64[ns] 1980-01-01 1981-01-01 1982-01-01 1983-01-01 Dimensions without coordinates: x, y Data variables: Tair (time, y, x) float64 nan nan nan nan nan nan nan nan nan nan ... ```","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,124154674 https://github.com/pydata/xarray/issues/688#issuecomment-298330381,https://api.github.com/repos/pydata/xarray/issues/688,298330381,MDEyOklzc3VlQ29tbWVudDI5ODMzMDM4MQ==,8699967,2017-05-01T13:04:16Z,2017-05-01T13:04:16Z,CONTRIBUTOR,"I need input data for a hydrology model in an hourly timestep. So, I use the `Dataset.resample` method on data from land surface models to achieve that. Then, I use a custom linear interpolation to fill in the `nan`'s. I then write out the data to a file. It is easier to write the resampled dataset to the file with the necessary information if the x,y coordinates are not removed in the `Dataset.resample` method.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,124154674 https://github.com/pydata/xarray/issues/688#issuecomment-298206446,https://api.github.com/repos/pydata/xarray/issues/688,298206446,MDEyOklzc3VlQ29tbWVudDI5ODIwNjQ0Ng==,1217238,2017-04-30T02:17:17Z,2017-04-30T02:17:17Z,MEMBER,@snowman2 Can you give a concrete example of the sort of function you would want to apply?,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,124154674 https://github.com/pydata/xarray/issues/688#issuecomment-298202905,https://api.github.com/repos/pydata/xarray/issues/688,298202905,MDEyOklzc3VlQ29tbWVudDI5ODIwMjkwNQ==,8699967,2017-04-30T00:24:48Z,2017-04-30T00:24:48Z,CONTRIBUTOR,"You could do it in the custom callable, but it requires less expertise and fewer lines of code to add that as an option. The use case I have is land surface model output with x,y coordinates that I would like to preserve.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,124154674 https://github.com/pydata/xarray/issues/688#issuecomment-297475228,https://api.github.com/repos/pydata/xarray/issues/688,297475228,MDEyOklzc3VlQ29tbWVudDI5NzQ3NTIyOA==,1217238,2017-04-26T16:58:18Z,2017-04-26T16:58:18Z,MEMBER,"@snowman2 Possibly yes, though we would want to think through the use-cases for this first. Arguably, you should explicitly preserve coordinates in your custom callable instead.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,124154674 https://github.com/pydata/xarray/issues/688#issuecomment-297431024,https://api.github.com/repos/pydata/xarray/issues/688,297431024,MDEyOklzc3VlQ29tbWVudDI5NzQzMTAyNA==,8699967,2017-04-26T14:43:40Z,2017-04-26T14:43:40Z,CONTRIBUTOR,Is there plans for a 'keep_coords' for Dataset.resample as well?,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,124154674 https://github.com/pydata/xarray/issues/688#issuecomment-182699321,https://api.github.com/repos/pydata/xarray/issues/688,182699321,MDEyOklzc3VlQ29tbWVudDE4MjY5OTMyMQ==,5635139,2016-02-11T04:31:11Z,2016-02-11T04:31:11Z,MEMBER,"Also `attrs` get cleared, which I think should be retained by default? ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,124154674 https://github.com/pydata/xarray/issues/688#issuecomment-167878323,https://api.github.com/repos/pydata/xarray/issues/688,167878323,MDEyOklzc3VlQ29tbWVudDE2Nzg3ODMyMw==,5635139,2015-12-29T21:12:50Z,2015-12-29T21:13:42Z,MEMBER,"Great @shoyer, agreed ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,124154674 https://github.com/pydata/xarray/issues/688#issuecomment-167832185,https://api.github.com/repos/pydata/xarray/issues/688,167832185,MDEyOklzc3VlQ29tbWVudDE2NzgzMjE4NQ==,1217238,2015-12-29T17:08:57Z,2015-12-29T17:08:57Z,MEMBER,"I would be fine with a `keep_coords` argument. I'm wary of always keeping coordinates, because some applied operations could make existing coordinates no longer valid. For example, suppose you want to use pandas's faster time-resampling, i.e., `ds.apply(lambda x: x.to_pandas().resample('24H'))`. Any coordinates along the `time` would no longer be valid. We could automatically align the coordinates, but that starts to get increasingly magical... ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,124154674