Replies: 3 comments 5 replies
-
I would use obs.reindex(T=cfs['T']) |
Beta Was this translation helpful? Give feedback.
1 reply
-
I think this is a good feature request for |
Beta Was this translation helpful? Give feedback.
3 replies
-
Does obs_cut = obs.isel(T=slice(0, 10))
obs_cut.sel(T=cfs['T'], method="nearest") do what you need? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am trying to align observed valid times which are 1-dimensional (T) with forecast valid times which are 2-dimensional, init (S)+ lead (L).
Using .sel yields the result I want,
However, it breaks
KeyError: "not all values found in index 'T'"
if obs doesn't have all the valid times of the forecast, so I figured I can simply interpolate.But if I want the fill values to be NaN, I have to re-mask it. Is there a more straightforward way without using where, e.g. sel(fill_value=np.nan)?
I tried using align, but it seems to have no effect (just outputting the input without change).
Beta Was this translation helpful? Give feedback.
All reactions