static public String getVariableName(NetcdfDataset ds, String key, Formatter errlog) {
    Variable v = null;
    String vs = getLiteral(ds, key, errlog);
    if (vs != null) {
      v = ds.findVariable(vs);
      if ((v == null) && (errlog != null))
        errlog.format(" Cant find Variable %s from %s%n", vs, key);
    }
    return v == null ? null : v.getShortName();
  }
static public String getVariableName ( NetcdfDataset ds , String key , Formatter errlog ) { Variable v = null ; String vs = getLiteral ( ds , key , errlog ) ; if ( vs != null ) { v = ds . findVariable ( vs ) ; if ( ( v == null ) && ( errlog != null ) ) errlog . format ( " Cant find Variable %s from %s%n" , vs , key ) ; } return v == null ? null : v . getShortName ( ) ; }
Find the variable pointed to by key

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