Skip Navigation

Daymet

AIforEarth Daymet Weather

Daymet provides estimates of daily weather parameters in North America on a one-kilometer grid, based on meteorological observations. The motivation for Daymet is to provide measurements of near-surface meteorological conditions where no instrumentation exists.

This dataset provides Daymet Version 3 data for North America; the island areas of Hawaii and Puerto Rico are available as files separate from the continental land mass. Daymet output variables include minimum temperature, maximum temperature, precipitation, shortwave radiation, vapor pressure, snow water equivalent, and day length. The dataset covers the period from January 1, 1980 to the present. Each year is processed individually at the close of a calendar year. Daymet variables are continuous surfaces provided as individual files, by variable and year, at e-kilometer spatial resolution and daily temporal resolution. Data are in a Lambert Conformal Conic projection for North America and are distributed in netCDF format compliant with Climate and Forecast (CF) metadata conventions (version 1.6).

Storage resources

Data are stored in blobs (one blob per image) in the East US data center, in the following blob container:

https://daymet.blob.core.windows.net/daymetv3-raw

Within that container, data are named as:

davymet_v3_dayl_[year]_[region].nc4

  • year is a four-digit year
  • region is a region code, one of “na” (North American continental mass), “hawaii”, or “puertorico”

For example, data from 1982 for the continental mass is available at:

https://daymet.blob.core.windows.net/daymetv3-raw/daymet_v3_dayl_1982_na.nc4

We also provide a read-only SAS (shared access signature) token to allow access to Daymet data via, e.g., BlobFuse, which allows you to mount blob containers as drives:

st=2020-01-03T00%3A12%3A06Z&se=2031-01-04T00%3A12%3A00Z&sp=rl&sv=2018-03-28&sr=c&sig=ca0OY7h4J6j0JxQiiTcM9PeZ%2FCWmX5wC5sjKUPqq0mk%3D

Mounting instructions for Linux are here.

Large-scale processing using this dataset is best performed in the East US Azure data center, where the data is stored. If you are using Daymet data for environmental science applications, consider applying for an AI for Earth grant to support your compute requirements.

Citation

If you use this data in a publication, please cite:

Thornton, P.E., M.M. Thornton, B.W. Mayer, Y. Wei, R. Devarakonda, R.S. Vose, and R.B. Cook. 2016. Daymet: Daily Surface Weather Data on a 1-km Grid for North America, Version 3. ORNL DAAC, Oak Ridge, Tennessee, USA.

See the Oak Ridge National Laboratory Distributed Active Archive Center (ORNL DAAC)’s Data Citations and Acknowledgments policy for more information.

Resources

The following resources and references may be helpful when working with the Daymet dataset:

Notices

MICROSOFT PROVIDES AZURE OPEN DATASETS ON AN “AS IS” BASIS. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, GUARANTEES OR CONDITIONS WITH RESPECT TO YOUR USE OF THE DATASETS. TO THE EXTENT PERMITTED UNDER YOUR LOCAL LAW, MICROSOFT DISCLAIMS ALL LIABILITY FOR ANY DAMAGES OR LOSSES, INCLUDING DIRECT, CONSEQUENTIAL, SPECIAL, INDIRECT, INCIDENTAL OR PUNITIVE, RESULTING FROM YOUR USE OF THE DATASETS.

This dataset is provided under the original terms that Microsoft received source data. The dataset may include data sourced from Microsoft.

Access

Available inWhen to use
Azure Notebooks

Quickly explore the dataset with Jupyter notebooks hosted on Azure or your local machine.

Select your preferred service:

Azure Notebooks

Azure Notebooks

Package: Language: Python

Accessing Daymet data

The Daymet dataset contains daily minimum temperature, maximum temperature, precipitation, shortwave radiation, vapor pressure, snow water equivalent, and day length at 1km-resolution for North America. The dataset covers the period from January 1, 1980 to December 31, 2018.

The Daymet dataset is maintained at https://daac.ornl.gov/cgi-bin/dsviewer.pl?ds_id=1328 and mirrored on Azure Open Datasets at https://azure.microsoft.com/services/open-datasets/catalog/daymet.

In [1]:
import numpy as np  
import netCDF4 as nc 
from netCDF4 import Dataset
import matplotlib.pyplot as plt
from azure.storage.blob import BlockBlobService, PublicAccess
import urllib.request

container_name = 'daymetv3-raw'
daymet_azure_storage_URL = 'https://daymet.blob.core.windows.net/'

Listing the files available in Azure blob storage

The Daymet dataset is available for anonymous public download on Azure. The following code shows how to list all data files that are currently available, trimmed to a specific region (hawaii, na, puertorico) and year for brevity.

In [2]:
block_blob_service = BlockBlobService(connection_string='BlobEndpoint=' + daymet_azure_storage_URL + ';')

# Hawaii sounds nice...
state_of_interest = 'hawaii'
year_of_interest = '1988'

# List the blobs in the container
iterator = block_blob_service.list_blobs(container_name)
for blob in iterator:
    if state_of_interest in blob.name and year_of_interest in blob.name:
        print('Blob name: ' + blob.name)
Blob name: daymet_v3_dayl_1988_hawaii.nc4
Blob name: daymet_v3_prcp_1988_hawaii.nc4
Blob name: daymet_v3_srad_1988_hawaii.nc4
Blob name: daymet_v3_swe_1988_hawaii.nc4
Blob name: daymet_v3_tmax_1988_hawaii.nc4
Blob name: daymet_v3_tmin_1988_hawaii.nc4
Blob name: daymet_v3_vp_1988_hawaii.nc4

Download a specific file from Azure blob storage

This code shows how to download a specific file from Azure blob storage into the current directory. It uses the example file daymet_v3_tmax_1980_hawaii.nc4, but you can change this as described below.

The following types of data are available: minimum temperature (tmin), maximum temperature (tmax), precipitation (prcp), shortwave radiation (srad), vapor pressure (vp), snow water equivalent (swe), and day length (dayl).

In [3]:
variable = 'tmax'
year = '2017'

# Choose your location.  The following are available: hawaii, na, puertorico.  The value 'na' stands for North America.
location = 'hawaii'

filename = 'daymet_v3_' + variable + '_' + year + '_' + location + '.nc4'
url = 'https://daymet.blob.core.windows.net/daymetv3-raw/' + filename

print('Downloading from {}'.format(url))
urllib.request.urlretrieve(url, filename)
Downloading from https://daymet.blob.core.windows.net/daymetv3-raw/daymet_v3_tmax_2017_hawaii.nc4
Out[3]:
('daymet_v3_tmax_2017_hawaii.nc4', <http.client.HTTPMessage at 0x2b2b522f8d0>)

Exploring the NetCDF file format

In [4]:
daymet_ds = Dataset(filename, 'r') # reads the netCDF file
print('netCDF file format:' + ' ' + daymet_ds.file_format)  # displays the netCDF file format

print('netCDF dimensions:')
print(daymet_ds.dimensions.keys())
print('\ntime dimension:')
print(daymet_ds.dimensions['time'])
print('x dimension:')
print(daymet_ds.dimensions['x'])
print('y dimension:')
print(daymet_ds.dimensions['y'])
print('netCDF variables:')
print(daymet_ds.variables.keys())
print('\n' + variable + ' variable and attributes:')
print(daymet_ds.variables[variable])
netCDF file format: NETCDF4_CLASSIC
netCDF dimensions:
odict_keys(['x', 'y', 'time', 'nv'])

time dimension:
<class 'netCDF4._netCDF4.Dimension'> (unlimited): name = 'time', size = 365

x dimension:
<class 'netCDF4._netCDF4.Dimension'>: name = 'x', size = 284

y dimension:
<class 'netCDF4._netCDF4.Dimension'>: name = 'y', size = 584

netCDF variables:
odict_keys(['x', 'y', 'lat', 'lon', 'time', 'yearday', 'time_bnds', 'lambert_conformal_conic', 'tmax'])

tmax variable and attributes:
<class 'netCDF4._netCDF4.Variable'>
float32 tmax(time, y, x)
    _FillValue: -9999.0
    long_name: daily maximum temperature
    units: degrees C
    missing_value: -9999.0
    coordinates: lat lon
    grid_mapping: lambert_conformal_conic
    cell_methods: area: mean time: maximum
unlimited dimensions: time
current shape = (365, 584, 284)
filling on

Using the data

Let's calculate the mean value for the variable that we care about, and then visualize this on a map. If you have kept the defaults above, this is the maximum temperature.

In [5]:
# Read the whole array
factor = daymet_ds.variables[variable][:]

# Calculate mean
factor_mean_comp = np.mean(factor, axis=0, keepdims=True)

# Decrease a dimension in order to plot
x_size = daymet_ds.dimensions['x'].size
y_size = daymet_ds.dimensions['y'].size
factor_mean_comp.shape=(y_size,x_size)

# Plot
%matplotlib inline
plt.rcParams['figure.figsize'] = (25,9)
plt.imshow(factor_mean_comp, cmap='rainbow')
plt.colorbar()
Out[5]:
<matplotlib.colorbar.Colorbar at 0x2b2b5150908>

Time Conversion

Here is an example of how to do time conversion to a more human-readable format.

In [6]:
time = daymet_ds.variables['time'][:] # read time variable
time_unit = daymet_ds.variables['time'].getncattr('units') #read the 'units' attributes from the variable 'time'
time_cal = daymet_ds.variables['time'].getncattr('calendar') # read calendar type
local_time = nc.num2date(time, units=time_unit, calendar=time_cal) # convert time

print('Original time {} is now converted as {}'.format(time[0], local_time[0]))
Original time 13515.5 is now converted as 2017-01-01 12:00:00

Cleanup

In [7]:
daymet_ds.close()