Description Usage Arguments Details Value Examples
This function downloads a PRISM weather data
grid to disk or the R-environment. A .RData
file containing download info is also provided.
If downloading
to disk, .bil files are downloaded; if downloading
to the R-environment, a SpatialGridDataFrame
is downloaded.
1 | getPRISMGrid(date, type, range = "daily", spGrid = TRUE)
|
date |
An 8 character date string 'yyyymmdd' for daily or a 6 character date string 'yyyymm' for monthly. |
type |
A string denoting the datatype to be downloaded. "tmax", "tmin", "ppt". |
range |
String "daily" or "monthly". |
spGrid |
|
The data these scripts use are subject to the PRISM Gridded Climate Data - Terms of Use. As of 07/06/2014, these are available at http://www.prism.oregonstate.edu/documents/PRISM_terms_of_use.pdf NOTE in particular the Data section: 'All data (gridded, polygon, tabular, graphical) retrieved from the website or otherwise provided on the website may be freely reproduced and distributed for non-commercial purposes.
When referring to the data, the source must be clearly and prominently stated and include, at a minimum, our name, URL, and the date of data creation. For example: PRISM Climate Group, Oregon State University, http://prism.oregonstate.edu, created 4 Feb 2004.
Sale or other commercial use of the data must be arranged by contacting the PRISM Climate Group.'
Either a SpatialGridDataFrame from the sp package (spGrid==TRUE) or the bil and associated files are stored in the working directory and the function returns TRUE/FALSE depending on the success of the unzipping. The current naming convention for the bil files (as of 12/13/2013) are for daily: "PRISM_type_stable_4kmD1_yyyymmdd_bil.bil" e.g. "PRISM_tmax_stable_4kmD1_19990101_bil.bil" and monthly: "PRISM_type_stable_4kmM2_yyyymm_bil.bil"
1 2 3 4 5 6 7 8 9 10 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.