cdm/src/main/java/ucar/nc2/dataset/transform/AbstractTransformBuilder.java
protected double readAttributeDouble(AttributeContainer v, String attname, double defValue) {
    Attribute att = v.findAttributeIgnoreCase(attname);
    if (att == null) return defValue;
    if (att.isString())
      return Double.parseDouble(att.getStringValue());
    else
      return att.getNumericValue().doubleValue();
  }
protected double readAttributeDouble(AttributeContainer v, String attname, double defValue) {
    Attribute att = v.findAttributeIgnoreCase(attname);
    if (att == null) return defValue;
    if (att.isString())
      return Double.parseDouble(att.getStringValue());
    else
      return att.getNumericValue().doubleValue();
  }
protected double readAttributeDouble ( AttributeContainer v , String attname , double defValue ) { Attribute att = v . findAttributeIgnoreCase ( attname ) ; if ( att == null ) return defValue ; if ( att . isString ( ) ) return Double . parseDouble ( att . getStringValue ( ) ) ; else return att . getNumericValue ( ) . doubleValue ( ) ; }
Read a variable attribute as a double.

@param v        the variable
@param attname  name of variable
@param defValue default value if attribute is not found
@return attribute value as a double, else NaN if not found
Read a variable attribute as a double .