Core class for the Daymet functions.
- class pydaymet.core.Daymet(variables=None, pet=None, snow=False, time_scale='daily', region='na')#
Base class for Daymet requests.
tuple, optional) – List of variables to be downloaded. The acceptable variables are:
daylDescriptions can be found here. Defaults to None i.e., all the variables are downloaded.
str, optional) – Method for computing PET. Supported methods are
hargreaves_samani, and None (don’t compute PET). The
penman_monteithmethod is based on Allen et al. assuming that soil heat flux density is zero. The
priestley_taylormethod is based on Priestley and TAYLOR assuming that soil heat flux density is zero. The
hargreaves_samanimethod is based on Hargreaves and Samani. Defaults to
bool, optional) – Compute snowfall from precipitation and minimum temperature. Defaults to
str, optional) – Data time scale which can be daily, monthly (monthly summaries), or annual (annual summaries). Defaults to daily.
str, optional) – Region in the US, defaults to na. Acceptable values are:
na: Continental North America
pr: Puerto Rico
- static check_dates(dates)#
Check if input dates are in correct format and valid.
Set dates by start and end dates as a tuple, (start, end).
Correct dates for Daymet accounting for leap years.
Daymet doesn’t account for leap years and removes Dec 31 when it’s leap year.
- separate_snow(clm, t_rain=T_RAIN, t_snow=T_SNOW)#
Separate snow based on Martinez and Gupta.
xarray.Dataset) – Climate data that should include
float, optional) – Threshold for temperature for considering rain, defaults to 2.5 degrees C.
float, optional) – Threshold for temperature for considering snow, defaults to 0.6 degrees C.
xarray.Dataset– Input data with
snow (mm/day)column if input is a
snowvariable if input is an
Set date by list of year(s).