Basic functions for controlling netCDF CF standard time axis
- class pyhomogenize.basics(fmt='%Y-%m-%dT%H:%M:%S', calendar='standard', frequency='D')[source]
Class for controlling netCDF CF standard time axis.
The
basicscontains some basics functions.- Parameters
fmt (str, default: ‘%Y-%m-%dT%H:%M:%S’) – Time format for converting strings into
cftime.datetimeobjectcalendar (str, default: ‘standard’) – Calendar type for the datetimes.
Methods
basics.str_to_date(str[, fmt, mode, calendar])Converts string to
cftime.datetimeobjectbasics.date_to_str(date[, fmt])Converts
cftime.datetimeordatetime.datetimeobject to stringbasics.is_month_start(cftime_range)Check whether each element of
CFTimeIndexis first day of the monthbasics.is_month_end(cftime_range)Check whether each element of
CFTimeIndexis last day of the monthbasics.date_range(start, end[, frequency, ...])Build
CFTimeIndexGet bounds of CFTimeIndex which satisfy user-given conditions.
Attributes
basics.fmt(fmt)Time format for converting strings into
cftime.datetimeobject.basics.calendar(calendar)Calendar type for the datetimes.
basics.frequency(frequency)Frequency strings or list of strings can have multiples.