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
basics
contains some basics functions.- Parameters
fmt (str, default: ‘%Y-%m-%dT%H:%M:%S’) – Time format for converting strings into
cftime.datetime
objectcalendar (str, default: ‘standard’) – Calendar type for the datetimes.
Methods
basics.str_to_date
(str[, fmt, mode, calendar])Converts string to
cftime.datetime
objectbasics.date_to_str
(date[, fmt])Converts
cftime.datetime
ordatetime.datetime
object to stringbasics.is_month_start
(cftime_range)Check whether each element of
CFTimeIndex
is first day of the monthbasics.is_month_end
(cftime_range)Check whether each element of
CFTimeIndex
is last day of the monthbasics.date_range
(start, end[, frequency, ...])Build
CFTimeIndex
Get bounds of CFTimeIndex which satisfy user-given conditions.
Attributes
basics.fmt
(fmt)Time format for converting strings into
cftime.datetime
object.basics.calendar
(calendar)Calendar type for the datetimes.
basics.frequency
(frequency)Frequency strings or list of strings can have multiples.