cdm/src/main/java/ucar/nc2/dataset/EnhancementsImpl.java
public String getUnitsString() {
    String result = units;
    if ((result == null) && (forVar != null)) {
      Attribute att = forVar.findAttribute( CDM.UNITS);
      if (att == null) att = forVar.findAttributeIgnoreCase( CDM.UNITS);
      if ((att != null) && att.isString())
        result = att.getStringValue();
    }
    return (result == null) ? null : result.trim();
  }
public String getUnitsString() {
    String result = units;
    if ((result == null) && (forVar != null)) {
      Attribute att = forVar.findAttribute( CDM.UNITS);
      if (att == null) att = forVar.findAttributeIgnoreCase( CDM.UNITS);
      if ((att != null) && att.isString())
        result = att.getStringValue();
    }
    return (result == null) ? null : result.trim();
  }
Get the Unit String for the Variable. May be set explicitly, else look for attribute CDM.UNITS.
@return the Unit String for the Variable, or null if none.