You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Part of the workflow here is: Given a specific (lon,lat) location, how do we find the nearest cell to extract the time series from?
If lon,lat are 1D arrays, xarray already can do this for us. But if lon,lat are 2d arrays, currently xarray cannot.
Currently we are just calculating the distance between all the grid points and the specified point, and doing this again for each point selected. This works okay for small grids, but is inefficient and will be slow on large grids.
Instead, we should generate a tree (e.g. kdtree), and use the tree each time we need to extract a time series.
There are numerous ways approaches/tools that could be used. One of the more promising is to use pyresample.
Of course it would be nice if xarray could just handle this case natively. There has been some discussion on: pydata/xarray#475 (comment), and it was mentioned on a recent Pangeo.io call that work was underway on xarray to make coordinates more flexible. @rabernat, is this issue what you were referring to? Do you have any suggestions for @hdsingh on how to engage?
The text was updated successfully, but these errors were encountered:
Part of the workflow here is: Given a specific (lon,lat) location, how do we find the nearest cell to extract the time series from?
If lon,lat are 1D arrays, xarray already can do this for us. But if lon,lat are 2d arrays, currently xarray cannot.
Currently we are just calculating the distance between all the grid points and the specified point, and doing this again for each point selected. This works okay for small grids, but is inefficient and will be slow on large grids.
Instead, we should generate a tree (e.g. kdtree), and use the tree each time we need to extract a time series.
There are numerous ways approaches/tools that could be used. One of the more promising is to use pyresample.
Of course it would be nice if xarray could just handle this case natively. There has been some discussion on: pydata/xarray#475 (comment), and it was mentioned on a recent Pangeo.io call that work was underway on xarray to make coordinates more flexible. @rabernat, is this issue what you were referring to? Do you have any suggestions for @hdsingh on how to engage?
The text was updated successfully, but these errors were encountered: