The R codes process the PRISM weather data and generate county-level growing season variables (i.e., degree days and precipitation). It takes two steps to complete the process.
The raw weather data are from the PRISM Climate Group of the Oregon State University. You can follow the instructions provided at the PRISM webiste (here) and use the FTP service to download the historical daily weather data from PRISM. You need to download data for three variables: precipitation ("ppt"), maximum temperature ("tmax"), and minimum temperature ("tmin").
Caution: The PRISM updated the precipitation data on June 30, 2015 (see the announcement here ). The "ppt" folder contains the updated precipitation data, and these are the data that you should download. You might also see the "ppt_old_method" folder, which contains the out-dated precipitation data.
Note: You can expected to download the data on your own. No R codes are needed.
The original PRISM data are at daily basis and are at 800m resolution (see here). The downloaded data (from the PRISM database via FTP) should be zipped file, and each zipped file contains data for temperature/precipitation in a day. What the R codes are doing here is to unzip the data (so you do not have to unzip them manually) and then aggregate the grid-cell level data to the county level. The aggregation follow the procedures described in Seong and Gramig (2019).
To obtain the aggregated precipitation data, you should run the codes in precipitation_daily_extract.r
(in the codes folder). To obtain the aggregated degree day data, you should run the codes in temperature_daily_extract.r
(in the codes folder). These codes will apply parallel computing and perform the aggregation efficiently.