lair.clock#

Times and time zones.

convert_timezones() moves times between zones (a time without a zone needs fromtz), and UTC2MTN() and its siblings are its common cases. The remaining functions turn times into decimal years (dt2decimalDate()), intervals, and diurnal and seasonal aggregates. Average a time series by local hour and by season shows the time-zone rules and the afternoon mean.

Attributes

AFTERNOON

The afternoon hours, 12 to 16 local standard time, when the boundary layer is deep and a site sees regional air.

SEASONS

The meteorological season of each month (1 to 12), as 'DJF', 'MAM', 'JJA' or 'SON'.

Functions

MST2UTC

Convert times from Mountain Standard Time ('Etc/GMT+7') to UTC.

MTN2UTC

Convert times from Salt Lake City time ('America/Denver') to UTC.

UTC2

Convert times from UTC to the time zone totz.

UTC2MST

Convert times from UTC to Mountain Standard Time ('Etc/GMT+7').

UTC2MTN

Convert times from UTC to Salt Lake City time ('America/Denver').

convert_timezones

Convert the times from one timezone to another.

datetime_accessor

Return the datetime accessor of the object.

decimalDate2dt

Convert a decimal date to a datetime object.

diurnal

Aggregate the data to the specified frequency and compute the statistic for each group.

dt2decimalDate

Convert a datetime object to a decimal date.

regular_times_to_intervals

Convert an array of regular times to intervals of the specified length.

seasonal

Aggregate data by season and year.

Classes

Timer

Time your code using a class, context manager, or decorator