diff --git a/cf_xarray/helpers.py b/cf_xarray/helpers.py index 1053a55b..1fe34471 100644 --- a/cf_xarray/helpers.py +++ b/cf_xarray/helpers.py @@ -338,6 +338,12 @@ def _get_ordered_vertices( elif order == "descending": endpoints = np.maximum(bounds[..., :, 0], bounds[..., :, 1]) last_endpoint = np.minimum(bounds[..., -1, 0], bounds[..., -1, 1]) + else: + raise NotImplementedError( + f"Cannot determine vertices for non-monotonic bounds with {order} core " + "dimension orders. Try normalizing the coordinates to a monotonic " + "convention and try again." + ) vertices = np.concatenate( [endpoints, np.expand_dims(last_endpoint, axis=-1)], axis=-1