Replies: 1 comment 2 replies
-
This sounds like a groupby problem assuming you can appropriately define the variable to group by Can you write it the for loop version for a simple example? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello!
I have a data that looks like:
I would like to use the 'onset_date' and 'demise_date' together in a slice to select data (daily precipitation) from an xarray dataset and then apply a reducing function (such as mean). Onset_date and demise_date differ for each lat/lon/year combo. Selecting the time slices results in different length data arrays but then applying mean to them should output a single value for every lat/lon.
Is there an efficient way to do this? I have to run this type of analysis on large datasets, so using apply_ufunc/dask would be ideal. Worst case scenario, I loop through every combination, but I'd like to avoid loops as best I can.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions