cdm/src/main/java/ucar/nc2/Variable.java
public Dimension getDimension(int i) {
    if ((i < 0) || (i >= getRank())) return null;
    return dimensions.get(i);
  }
public Dimension getDimension(int i) {
    if ((i < 0) || (i >= getRank())) return null;
    return dimensions.get(i);
  }
Get the ith dimension.

@param i index of the dimension.
@return requested Dimension, or null if i is out of bounds.