Skip to main content

Module time

Module time 

Source
Expand description

CF time coordinates and time labels for resampling.

decode_cf_time turns numbers with units = "<unit> since <reference>" into an Arrow Timestamp(Microsecond) without time zone, like xarray. The microsecond unit covers ±292,000 years. Only the standard, gregorian and proleptic_gregorian calendars are supported, all as proleptic Gregorian.

Structs§

CfTimeUnits
A parsed CF time unit: microseconds per step and the reference instant.

Enums§

DatePart
Valid parts to extract from date/time/timestamp arrays.
TimePeriod
Calendar periods for floor_time and Frequency.

Constants§

CALENDAR
CF attribute: the calendar of the time values.
UNITS
CF attribute: the time unit and reference, for example days since 1950-01-01.

Functions§

decode_cf_time
Decode a CF time variable into Timestamp(Microsecond).
encode_cf_time
Encode timestamps as Float64 numbers of units, the inverse of decode_cf_time. Adds the units attribute.
floor_time
Round timestamps down to the start of their period, like pandas floor. For regular bins with a reduction, see resample.
time_component
A calendar component of timestamps as Int32, for example the month.
timestamp_type
The decoded Timestamp type.