synoptic.services.Precipitation#
- class synoptic.services.Precipitation(**params)[source]#
Request derived precipitation total or intervals.
Refer to the official documentation: https://docs.synopticdata.com/services/precipitation
- Parameters:
start (datetime or str, optional) – The start time of the desired time range as a datetime.datetime or a string in the form
'YYYYMMDDHHMM'or'YYYY-MM-DD HH:MM'. Required ifrecentis not provided.end (datetime or str, optional) – The end time of the desired time range as a datetime.datetime or a string in the form
'YYYYMMDDHHMM'or'YYYY-MM-DD HH:MM'. Required if recent is not provided.recent (timedelta, int, or str, optional) – A datetime.timedelta, integer (representing minutes), or a duration string (e.g., ‘3h’) that specifies the period of data to retrieve prior to the current time. Required if
startandendare not provided.**station_selection – Station selection parameters such as
stid,state,county,radius,bbox,vars,varsoperator, etc. Refer to the Synoptic API documentation for details.token (str, optional) – Synoptic API token. Required if the
SYNOPTIC_TOKENenvironment variable and the config file entry are not set.pmode ({'totals', 'intervals', 'last'}) – Precipitation mode. Default is “totals”.
interval (int | {'hour', 'day', 'week', 'month', 'year'}) – Integer hours, or string interval. Default is “day”.
interval_window (int) – Time window in hours
**optional_parameters – units, precip, qc, etc.
Methods