daymetr
Allows for easy downloads of Daymet climate data directly to your R workspace or your computer.
https://github.com/bluegreen-labs/daymetr
Category: Climate Change
Sub Category: Climate Data Processing and Analysis
Keywords
climate-data data-science daymet gridded-data netcdf ornl-daac r-package rstats
Keywords from Contributors
phenology-modelling phenocam phenocam-data data-retrieval model-calibration vegetation-phenology camera phenocam-installation phenocam-network
Last synced: about 14 hours ago
JSON representation
Repository metadata
An R Interface to the Daymet Web Services
- Host: GitHub
- URL: https://github.com/bluegreen-labs/daymetr
- Owner: bluegreen-labs
- License: other
- Created: 2016-05-25T18:21:27.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2025-03-29T17:19:25.000Z (28 days ago)
- Last Synced: 2025-04-10T03:33:35.653Z (17 days ago)
- Topics: climate-data, data-science, daymet, gridded-data, netcdf, ornl-daac, r-package, rstats
- Language: R
- Homepage: http://bluegreen-labs.github.io/daymetr/
- Size: 4.69 MB
- Stars: 32
- Watchers: 3
- Forks: 17
- Open Issues: 0
- Releases: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
README.md
daymetr
A programmatic interface to the Daymet web
services. Allows for easy downloads of Daymet
climate data directly to your R workspace or your computer. Routines for
both single pixel data downloads and gridded (netCDF) data are provided.
Please use the below citation when using the package.
We received news from Dr. Michele Thornton at the Oak Ridge National Laboratory (ORNL) that the DAYMET API they host will be decommissioned. This change will be effective within weeks (late March 2025) and affect first and foremost the spatial (gridded/tiled) data products, before most likely covering the whole THREDDS data server setup including point based data by the end of the year. We suggest that users of our {daymetr} R package migrate to the NASA EarthData Appeears based API as covered by our {appeears} R package.
How to cite this package
Hufkens K., Basler J. D., Milliman T. Melaas E., Richardson A.D. 2018
An integrated phenology modelling framework in R: Phenology modelling
with phenor. Methods in Ecology &
Evolution, 9: 1-10. https://doi.org/10.1111/2041-210X.12970
Installation
stable release
To install the current stable release use a CRAN repository:
install.packages("daymetr")
library("daymetr")
development release
To install the development releases of the package run the following
commands:
if(!require(remotes)){install.packages("remotes")}
remotes::install_github("bluegreen-labs/daymetr")
library("daymetr")
Vignettes are not rendered by default, if you want to include additional
documentation please use:
if(!require(remotes)){install.packages("remotes")}
remotes::install_github("bluegreen-labs/daymetr", build_vignettes = TRUE)
library("daymetr")
Use
Single pixel location download
For a single site use the following format
download_daymet(site = "Oak Ridge National Laboratories",
lat = 36.0133,
lon = -84.2625,
start = 1980,
end = 2010,
internal = TRUE)
Parameter | Description |
---|---|
site | site name |
lat | latitude of the site |
lon | longitude of the site |
start | start year of the time series (data start in 1980) |
end | end year of the time series (current year - 2 years, use force = TRUE to override) |
internal | logical, TRUE or FALSE, if true data is imported into R workspace otherwise it is downloaded into the current working directory |
path | path where to store the data when not used internally, defaults to tempdir() |
force | force “out of temporal range” downloads |
silent | suppress the verbose output |
Batch mode uses similar parameters but you provide a comma separated
file with site names and latitude longitude which are sequentially
downloaded. The format of the comma separated file is: site name,
latitude, longitude.
download_daymet_batch(file_location = 'my_sites.csv',
start = 1980,
end = 2010,
internal = TRUE)
Gridded data downloads
For gridded data use either download_daymet_tiles() for individual
tiles or download_daymet_ncss() for a netCDF subset which is not bound
by tile limits (but restricted to a 6GB query size).
Tiled data
download_daymet_tiles(location = c(36.0133,-84.2625),
tiles = NULL,
start = 1980,
end = 2012,
param = "ALL")
Parameter | Description |
---|---|
location | vector with a point location c(lat,lon) or top left / bottom right pair c(lat,lon,lat,lon) |
tiles | vector with tile numbers if location point or top left / bottom right pair is not provided |
start | start year of the time series (data start in 1980) |
end | end year of the time series (current year - 2 years, use force = TRUE to override) |
param | climate variable you want to download vapour pressure (vp), minimum and maximum temperature (tmin,tmax), snow water equivalent (swe), solar radiation (srad), precipitation (prcp) , day length (dayl). The default setting is ALL, this will download all the previously mentioned climate variables. |
path | path where to store the data, defaults to tempdir() |
silent | suppress the verbose output |
If only the first set of coordinates is provided the tile in which these
reside is downloaded. If your region of interest falls outside the scope
of the DAYMET data coverage a warning is issued. If both top left and
bottom right coordinates are provided all tiles covering the region of
interst are downloaded. I would caution against downloading too much
data, as file sizes do add up. So be careful how you specify your region
of interest.
netCDF subset (ncss) data
download_daymet_ncss(location = c(36.61,-85.37,33.57,-81.29),
start = 1980,
end = 1980,
param = "tmin")
Parameter | Description |
---|---|
location | bounding box extent defined as top left / bottom right pair c(lat,lon,lat,lon) |
start | start year of the time series (data start in 1980) |
end | end year of the time series (current year - 2 years, use force = TRUE to override) |
param | climate variable you want to download vapour pressure (vp), minimum and maximum temperature (tmin,tmax), snow water equivalent (swe), solar radiation (srad), precipitation (prcp) , day length (dayl). The default setting is ALL, this will download all the previously mentioned climate variables. |
mosaic | tile mosaic to use, defaults to “na” for North America (use “pr” for Puerto Rico and “hi” for Hawaii) |
path | path where to store the data, defaults to tempdir() |
silent | suppress the verbose output |
Keep in mind that the bounding box is defined by the minimum (square)
bounding box in a Lambert Conformal Conic (LCC) projection as defined by
the provided geographic coordinates. In general the query area will be
larger than the requested location. For more information I refer to
Daymet documentation on the
web service.
Acknowledgements
This project was supported by the National Science Foundation’s
Macro-system Biology Program (awards EF-1065029 and EF-1702697) and the Marie Skłodowska-Curie Action (H2020 grant 797668). Logo design elements are taken from the FontAwesome library according to these terms, where the globe element was inverted and intersected.
Owner metadata
- Name: BlueGreen Labs
- Login: bluegreen-labs
- Email: [email protected]
- Kind: organization
- Description: BlueGreen open science labs & consulting, providing environmental research infrastructure and editorial solutions.
- Website: http://bluegreenlabs.org
- Location: Melsele, Belgium
- Twitter:
- Company:
- Icon url: https://avatars.githubusercontent.com/u/65854203?v=4
- Repositories: 17
- Last ynced at: 2023-03-09T08:10:34.683Z
- Profile URL: https://github.com/bluegreen-labs
GitHub Events
Total
- Issues event: 4
- Watch event: 2
- Issue comment event: 4
- Push event: 2
Last Year
- Issues event: 4
- Watch event: 2
- Issue comment event: 4
- Push event: 2
Committers metadata
Last synced: 5 days ago
Total Commits: 510
Total Committers: 7
Avg Commits per committer: 72.857
Development Distribution Score (DDS): 0.071
Commits in past year: 1
Committers in past year: 1
Avg Commits per committer in past year: 1.0
Development Distribution Score (DDS) in past year: 0.0
Name | Commits | |
---|---|---|
Koen Hufkens | k****s@g****m | 474 |
mastefan | 3****n | 15 |
Koen Hufkens | k****s@P****l | 13 |
Koen Hufkens | k****s@P****l | 4 |
Aaron | a****d@w****m | 2 |
Stefan Verhoeven | s****n@e****l | 1 |
Alexander Hurley | t****l | 1 |
Committer domains:
Issue and Pull Request metadata
Last synced: 1 day ago
Total issues: 55
Total pull requests: 12
Average time to close issues: 4 months
Average time to close pull requests: 1 day
Total issue authors: 27
Total pull request authors: 5
Average comments per issue: 2.2
Average comments per pull request: 1.42
Merged pull request: 7
Bot issues: 0
Bot pull requests: 0
Past year issues: 3
Past year pull requests: 0
Past year average time to close issues: 10 days
Past year average time to close pull requests: N/A
Past year issue authors: 3
Past year pull request authors: 0
Past year average comments per issue: 2.0
Past year average comments per pull request: 0
Past year merged pull request: 0
Past year bot issues: 0
Past year bot pull requests: 0
Top Issue Authors
- khufkens (26)
- mastefan (2)
- spencer-tassone (2)
- j-baldock (2)
- bradleytbush (1)
- adriancorrendo (1)
- alvaroparedesl (1)
- jungej62 (1)
- cohenab2 (1)
- vishalm1975 (1)
- dylanbeaudette (1)
- dabasler (1)
- kkyong77 (1)
- tmieno2 (1)
- dschlaep (1)
Top Pull Request Authors
- mastefan (7)
- khufkens (2)
- the-Hull (1)
- sverhoeven (1)
- aaronspringford (1)
Top Issue Labels
- enhancement (13)
- bug (6)
- question (2)
- help wanted (2)
Top Pull Request Labels
Package metadata
- Total packages: 1
-
Total downloads:
- cran: 788 last-month
- Total dependent packages: 3
- Total dependent repositories: 6
- Total versions: 9
- Total maintainers: 1
cran.r-project.org: daymetr
Interface to the 'Daymet' Web Services
- Homepage: https://github.com/bluegreen-labs/daymetr
- Documentation: http://cran.r-project.org/web/packages/daymetr/daymetr.pdf
- Licenses: AGPL-3
- Latest release: 1.7.1 (published over 1 year ago)
- Last Synced: 2025-04-25T12:04:42.051Z (1 day ago)
- Versions: 9
- Dependent Packages: 3
- Dependent Repositories: 6
- Downloads: 788 Last month
-
Rankings:
- Forks count: 4.385%
- Average: 9.682%
- Stargazers count: 10.016%
- Dependent packages count: 10.637%
- Downloads: 11.272%
- Dependent repos count: 12.1%
- Maintainers (1)
Dependencies
- R >= 3.6 depends
- httr * imports
- raster * imports
- sf * imports
- tibble * imports
- tidyr * imports
- tools * imports
- utils * imports
- covr * suggests
- dplyr * suggests
- ggplot2 * suggests
- knitr * suggests
- markdown * suggests
- ncdf4 * suggests
- rgdal * suggests
- rmarkdown * suggests
- testthat * suggests
- actions/cache v2 composite
- actions/checkout v2 composite
- actions/upload-artifact main composite
- r-lib/actions/setup-pandoc v2 composite
- r-lib/actions/setup-r v2 composite
- actions/cache v2 composite
- actions/checkout v2 composite
- r-lib/actions/setup-pandoc v2 composite
- r-lib/actions/setup-r v2 composite
- JamesIves/github-pages-deploy-action v4.4.1 composite
- actions/checkout v3 composite
- r-lib/actions/setup-pandoc v2 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite
Score: 12.093754649304849