Skip to content


Functionality to retrieve Daymet Daily Surface Weather Data for North America, Version 4 R1.


Fetches data from

Requires daymetr. Install with


  • Temporal coverage: 1950-01-01 to 2021-12-31
  • Spatial coverage (1 km grid):
North South East West
Hawaii (hi) 23.52 17.95 -154.77 -160.31
North America (na) 82.91 14.07 -53.06 -178.13
Puearto Rico (pr) 19.94 16.84 -64.12 -67.99

Example: Example: Download data for 3 points

from springtime.datasets import Daymet

source = Daymet(
        [-84.2625, 36.0133],
        [-86, 39.6],
        [-85, 40],
df = source.load()

Example: Example: Download daily data

from springtime.datasets import Daymet

source = Daymet(
    variables = ["tmin", "tmax"],
    area = {
        "name": "indianapolis",
        "bbox": [-86.5, 39.5, -86, 40.1]
    years=[2000, 2002]
df = source.load()

Example: Example: download monthly data

from springtime.datasets import Daymet

source = Daymet(
    variables = ["tmin", "tmax"],
    area = {
        "name": "indianapolis",
        "bbox": [-86.5, 39.5, -86, 40.1]
    years=[2000, 2002],
    frequency = "monthly",
df = source.load()

DaymetVariables = Literal['dayl', 'prcp', 'srad', 'swe', 'tmax', 'tmin', 'vp'] module-attribute

Daymet variables.

DaymetFrequencies = Literal['daily', 'monthly', 'annual'] module-attribute

Daymet frequencies


Bases: Dataset

Base class for common Daymet attributes.


Name Type Description
years YearRange

timerange. For example years=[2000, 2002] downloads data for three years.

variables Sequence[DaymetVariables]

List of variable you want to download. Options:

  • dayl: Duration of the daylight period (seconds/day)
  • prcp: Daily total precipitation (mm/day)
  • srad: Incident shortwave radiation flux density(W/m2)
  • swe: Snow water equivalent (kg/m2)
  • tmax: Daily maximum 2-meter air temperature (°C)
  • tmin: Daily minimum 2-meter air temperature (°C)
  • vp: Water vapor pressure (Pa)

When empty will download all the previously mentioned climate variables.

points Point | Points | None

(Sequence of) point(s) as (longitude, latitude) in WGS84 projection.

area NamedArea | None

A dictionary of the form {"name": "yourname", "bbox": [xmin, ymin, xmax, ymax]}. If both area and points are defined, will first crop the area before extracting points, so points outside area will be lost. If points is None, will return the full dataset as xarray object; this cannot be joined with other datasets.

mosaic Literal['na', 'hi', 'pr']

Daymet tile mosaic; required when using area. Defaults to “na” for North America. Use “pr” for Puerto Rico and “hi” for Hawaii.

frequency DaymetFrequencies

required when using area. Choose from "daily", "monthly", or "annual"

resample Optional[ResampleConfig]

Resample the dataset to a different time resolution. If None, no resampling. Else, should be a dictonary of the form {frequency: 'M', operator: 'mean', **other_options}. Currently supported operators are 'mean', 'min', 'max', 'sum', 'median'. For valid frequencies see [1]. Other options will be passed directly to xr.resample [2]


Print out a recipe to reproduce this dataset.


Download data for dataset.


Download data for a single point.


Download data for area in bbox as netcdf subset.


Load raw data.


Read csv file for a single daymet data point.

Lat/lon is in csv headers. Add geometry column instead.