cdm/src/main/java/ucar/nc2/dataset/DatasetConstructor.java
static public void transferVariableAttributes(Variable src, Variable target) {
    for (Attribute a : src.getAttributes()) {
      if (null == target.findAttribute(a.getShortName()))
        target.addAttribute(a);
    }
  }
static public void transferVariableAttributes(Variable src, Variable target) {
    for (Attribute a : src.getAttributes()) {
      if (null == target.findAttribute(a.getShortName()))
        target.addAttribute(a);
    }
  }
Copy attributes from src to target, skip ones that already exist (by name)
@param src copy from here
@param target copy to here