fixed inheritance of attributes_with_dimension
omit writing dimension attribute if it is dimensionless