home / github / issues

Menu
  • GraphQL API
  • Search all tables

issues: 607229563

This data as json

id node_id number title user state locked assignee milestone comments created_at updated_at closed_at author_association active_lock_reason draft pull_request body reactions performed_via_github_app state_reason repo type
607229563 MDU6SXNzdWU2MDcyMjk1NjM= 4008 Can Resample dim be spatial and not just datetime? 59711987 open 0     4 2020-04-27T04:47:12Z 2022-04-16T15:00:50Z   NONE      

Hi, I'll go ahead and preface that I know very little about xarray source code, but I do use xarray often in my work. I hope someone can provide insight into an answer for my question.

Essentially, I have a 2D DataArray with dimensions lat and lon that I want to spatially coarsen to a lower resolution. I have the coarsened 1D coordinates that I would want my grid to be coarsened to, and I was wanting to use the DataArray.resample function and then use .mean() to get my coarsened array. The documentation notes that the resampled dim can only be of type datetime. Is there a particular reason that this the case? Why is there not a capability to resample spatially with lat and lon coordinates? Maybe there is a good reason that is beyond my little knowledge of xarray source code, but I'm curious to know why that is the case or if there is work ongoing to get a capability of resampling how I mentioned?

If there is a specific reason why one can't resample along a dim like lat and lon, is there another type of xarray function that would work well for my needs? Would groupby_bins be something that would work better for what I'm wanting? And can anyone post or guide me to a good example of spatially coarsening an array using groupby_bins?

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/4008/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    13221727 issue

Links from other tables

  • 2 rows from issues_id in issues_labels
  • 4 rows from issue in issue_comments
Powered by Datasette · Queries took 0.712ms · About: xarray-datasette