cf-xarray
cf-xarray copied to clipboard
Support query
This is kind of inspired by the way we handle weights.
The weights must be DataArrays for xarray, but cf_xarray allows strings so we can do cf.weighted('volume').
How about introducing boolean expressions in cf.where similarly to pandas query?
That would allow to do ds.cf.where('longitude > 0') or ds.cf.where('sea_binary_mask').
Xarray now has query so we could support standard_name in those strings. Also see #199
Oh nice, I'll give it a go after the next xarray release.