home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 123305768

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/486#issuecomment-123305768 https://api.github.com/repos/pydata/xarray/issues/486 123305768 MDEyOklzc3VlQ29tbWVudDEyMzMwNTc2OA== 1197350 2015-07-21T13:35:29Z 2015-07-21T13:36:32Z MEMBER

Pyresample is probably overkill for that case. Aggregating / decimating regular lat-lon grids could probably be done much more simply. For example

python N = 10 fac = 2 x = np.arange(N, dtype=np.float64) np.add.reduceat(x, np.arange(0,N,fac)) / fac

This gives array([ 0.5, 2.5, 4.5, 6.5, 8.5])

This type of resampling has the advantage of preserving certain integral invariants, as opposed to the nearest neighbor resampling in the example above. (Imagine if there had been lots of spatial variance below the 5 degree scale in that example--it would have been aliased horribly. That was only avoided because the original field was very smooth.) It is also very fast.

Pyresample seems best for complicated transformations from one map projection to another. I'm not sure I fully understand how xray handles grids where the coordinates are themselves 2d fields, as in this example.

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