Description Usage Arguments Details Examples
This function reads raw data from CPC, downloaded using 'cpc_get_rawdata' and outputs a matrix of values.
1 2 | cpc_read_rawdata(yr, mo, day, remove_input = TRUE,
write_output = FALSE)
|
yr |
year associated with the downloaded file, 1979 - 2012 |
mo |
month associated with the downloaded file, 1 - 12 |
day |
day associated with the downloaded file, 1 - 28/29/30/31 |
remove_input |
logical, whether or not to remove the raw CPC file after reading in |
write_output |
logical, whether or not to write the data to a binary output file |
Function checks for the existence of the raw files from CPC and only then attempts to process the data.
The output matrix has 360 rows (latitudes) and 720 columns (longitudes) of rainfall/precipitation in units of mm/day. The first data point has the lat, lon values of -89.75 and 0.25 degrees, respectively. Spatial resolution of the data is 0.5 degrees. Refer to the project home page for plotting the data with proper North-South orientation.
By default, output matrix is NOT written to a binary file and raw input files will be DELETED. Change the input function arguments as desired.
1 2 3 4 | # CPC data for Jul 11 2005
cpc_1day <- cpc_read_rawdata(2005, 7, 11)
# CPC data for Jul 12 2005
cpc_1day <- cpc_read_rawdata(2005, 7, 12)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.