cf.Data.has_calendar

Data.has_calendar()[source]

Whether a calendar has been set.

Returns
bool

True if the calendar has been set, otherwise False.

Examples

>>> d = cf.Data(1, "days since 2000-1-1", calendar="noleap")
>>> d.has_calendar()
True
>>> d = cf.Data(1, calendar="noleap")
>>> d.has_calendar()
True
>>> d = cf.Data(1, "days since 2000-1-1")
>>> d.has_calendar()
False
>>> d = cf.Data(1, "m")
>>> d.has_calendar()
False