cdm/src/main/java/ucar/ma2/Index.java
Index flip(int index) {
    if ((index < 0) || (index >= rank))
      throw new IllegalArgumentException();

    Index i = (Index) this.clone();
    if (shape[index] >= 0) { // !vlen case
      i.offset += stride[index] * (shape[index] - 1);
      i.stride[index] = -stride[index];
    }
    i.fastIterator = false;
    i.precalc(); // any subclass-specific optimizations
    return i;
  }
Index flip(int index) {
    if ((index < 0) || (index >= rank))
      throw new IllegalArgumentException();

    Index i = (Index) this.clone();
    if (shape[index] >= 0) { // !vlen case
      i.offset += stride[index] * (shape[index] - 1);
      i.stride[index] = -stride[index];
    }
    i.fastIterator = false;
    i.precalc(); // any subclass-specific optimizations
    return i;
  }
Create a new Index based on current one, except
flip the index so that it runs from shape[index]-1 to 0.
Leave rightmost vlen alone.

@param index dimension to flip
@return new index with flipped dimension