home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 441034802

This data as json

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/1844#issuecomment-441034802 https://api.github.com/repos/pydata/xarray/issues/1844 441034802 MDEyOklzc3VlQ29tbWVudDQ0MTAzNDgwMg== 33062222 2018-11-22T13:43:23Z 2018-11-22T13:44:48Z NONE

For anyone stumbling upon this thread in the future, I would like to mention that I used the above grouping approach suggested by @spencerkclark for my dataset to calculate climatology with calendar day and it works smoothly. The only thing one should be careful is that you can't directly plot the data using

In[1]: da.groupby(month_day_str).mean('time').plot() Out[1]: TypeError: Plotting requires coordinates to be numeric or dates of type np.datetime64 or datetime.datetime.

To get around it, either use group by the

modified_ordinal _day

Or convert back the grouped coordinate month_day_str to numeric. However, after doing all this I found out that the CDO function also calculates climatology by the ordinal day of the year. So, to be consistent I would stick to that method but it's anyway good to know that there is a way around to group by day and month if required in Xarray.

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  290023410
Powered by Datasette · Queries took 0.556ms · About: xarray-datasette