How to check if an xarray coordinate is a scalar vs dimensional?