Open kthyng opened 3 years ago
@dcherian is there an analogous function in the accessor code that would make sense to copy for this?
This may be useful: https://github.com/xarray-contrib/cf-xarray/blob/770f40cd49617c703b2aec6fa1bacf2d1b344106/cf_xarray/accessor.py#L547-L569
It rewrites things like .chunks
and .sizes
when a one-to-one mapping is possible
This came up in #234 and I want to capture the idea here:
I'd like to be able to not just ask for the "ssh" variable for example, but ask which type of variable I have. So in addition to:
returning the "ssh"-matching variable, I would like to be able to, for a DataArray da:
to return "ssh", or somehow do the inverse search, returning the custom names that match the DataArray.