cdms2.variable:DatasetVariable

DatasetVariable.createattribute(name, value)

Create an attribute and set its name to value.