NCDC API: an R Interface with many NOAA Data SourcesRebecca L CainNovember 4, 2015Data Category: National Oceanic and Atmospheric Administration (NOAA) Climate Data Data Description: Climate Data Online (CDO) provides free access to NCDC’s archive of global historical weather and climate data in addition to station history information. These data include quality controlled daily, monthly, seasonal, and yearly measurements of temperature, precipitation, wind, and degree days as well as radar data and 30-year Climate Normals. Use with R: National Climatic Data Center (NCDC) data can be downloaded directly for certain species by using the R package “rnoaa”, as shown below for Ingham County, Michigan. The data for this example are DSNW from the Annual Summaries Dataset and PRCP from the Monthly Summaries Dataset. To explore the numerous datasets and datatypes available, explore the Climate Data Online Interface at http://www.ncdc.noaa.gov/cdo-web/datasets. The rnoaa() package has many more functions than the ones covered here. NOTE: To gain access to NCDC CDO Web Services, you must obtain a token using this link and following the directions given. http://www.ncdc.noaa.gov/cdo-web/token
Example 1Total Monthly Precipitation for one weather station in Ingham County, Michigan (2000-2010)
Example 2Total Number of Days with Snow Depth Greater than 1 inch in Ingham County, Michigan (2000-2010) This data came from the Annual Climatological Summaries Dataset.
More Potentially Helpful References:NOAA NCDC Attributes Information: NCDC workflow vignette: https://cran.r-project.org/web/packages/rnoaa/vignettes/ncdc_workflow.html Annual Climatological Summaries Documentation: rnooa() Tutorial: Getting Started with Web Services v2:
2 Comments
Megan Barnes
7/10/2018 01:48:32 am
ncdf doesn't exist in R3.5.0 or R 3.3.3 what version does it work in?
Reply
Rebecca L Cain
2/27/2020 04:50:02 am
Great news! You do not need the ncdf() package anymore. The rnoaa() package version 0.9.5 now contains both the ncdc() and the ncdc_plot() functions. If you follow the directions and code provided (minus the line to load the ncdf package; see below), you should be able to replicate the output/plots in both examples.
Reply
Leave a Reply. |
Spatial Ecology @ MSUClick on "Category" below to search for R code compiled by the Zarnetske Spatial & Community Ecology Lab and students in MSU's Spatial Ecology graduate course (FOR870/FW870) Category
All
Archive
October 2016
|