cdm/src/main/java/ucar/nc2/ft/point/standard/Evaluator.java
static public Dimension getDimension(NetcdfDataset ds, String key, Formatter errlog) {
    Dimension d = null;
    String s = getLiteral(ds, key, errlog);
    if (s != null) {
      d = ds.findDimension(s); // LOOK use group
      if ((d == null) && (errlog != null))
        errlog.format(" Cant find Variable %s from %s%n", s, key);
    }
    return d;
  }
static public Dimension getDimension(NetcdfDataset ds, String key, Formatter errlog) {
    Dimension d = null;
    String s = getLiteral(ds, key, errlog);
    if (s != null) {
      d = ds.findDimension(s); // LOOK use group
      if ((d == null) && (errlog != null))
        errlog.format(" Cant find Variable %s from %s%n", s, key);
    }
    return d;
  }
Find the dimension pointed to by key

@param ds     in this dataset
@param key    may be dimension name or ":gatt" where gatt is local attribute whose value is the dimension name
@param errlog error messages here
@return dimension or null if not exist