How to cluster data over new coords? #5885
Unanswered
loganchen39
asked this question in
Q&A
Replies: 1 comment
-
Without understanding fully what you are trying to do there is http://xarray.pydata.org/en/stable/user-guide/interpolation.html and https://pangeo-xesmf.readthedocs.io/en/latest/ |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have the initial data SST (Sea Surface Temperature) over a fine lat/lon resolution of 0.02 degree. So lat: -89.99, -89.97, ..., 89.97, 89.99, 9000 in total; lon: -179.99, -179.97, ..., 179.97, 179.99, 18000 in total.
I want to map (with nearest neighbot) the SST data to a new coarser new_lat/new_lon grid with 0.25 degree, so new_lat: -89.875, -89.625, ..., 89.625, 89.875; and new_lon: -179.875, -179.625, ..., 179.625, 179.875. So for one certain location (new_lat, new_lon), there might be several corresponding initial SST data, and I want to take the average of them to be the result data on that certain location.
Does xarray provide such functions which allows us to operate on the arrays directly to get the result? Or do we have to loop over all the grid points to calculate manually? I can do the latter, but the time efficiency is not good. Thanks,
Beta Was this translation helpful? Give feedback.
All reactions