cf.AuxiliaryCoordinate.asreftime

AuxiliaryCoordinate.asreftime(i=False)[source]

Convert the internal representation of data array elements to numeric reference times.

Only applicable to auxiliary coordinates with reference time units.

If the calendar has not been set then the CF default calendar will be used and the units will be updated accordingly.

See also

asdatetime

Examples 1:
>>> g = f.asreftime()
Parameters:
i: bool, optional

If True then update the auxiliary coordinate in place. By default a new auxiliary coordinate is created. In either case, a auxiliary coordinate is returned.

Returns:

out: cf.AuxiliaryCoordinate

Examples 2:
>>> t.asdatetime().dtype
dtype('O')
>>> t.asreftime().dtype
dtype('float64')