cf.Data.has_units

Data.has_units()[source]

Whether units have been set.

Returns
bool

True if units have been set, otherwise False.

Examples

>>> d = cf.Data(1, "")
>>> d.has_units()
True
>>> d = cf.Data(1, "m")
>>> d.has_units()
True
>>> d = cf.Data(1)
>>> d.has_units()
False
>>> d = cf.Data(1, calendar='noleap')
>>> d.has_units()
False