How can I find the indices equivalent to a specific selection of xarray?
I have an xarray dataset. <xarray.Dataset> Dimensions: (lat: 92, lon: 172, time: 183) Coordinates: * lat (lat) float32 4.125001 4.375 4.625 ... 26.624994 26.874996 * lon (lon) float32 nan nan nan ... 24.374996 24.624998 24.875 * time (time) datetime64[ns] 2003-09-01 2003-09-02 ... 2004-03-01 Data variables: swnet (time, lat, lon) float32 dask.array<shape=(183, 92, 172), chunksize=(1, 92, 172)> Find the nearest lat-long df.sel(time='2003-09-01', lon=6.374997, lat=16.375006, method='nearest') Need to find The indices of this particular location. Basically, the row-column in the grid. What would
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.