cpc_read_rawdata: Read downloaded raw rainfall data from CPC

Description Usage Arguments Details Examples

Description

This function reads raw data from CPC, downloaded using 'cpc_get_rawdata' and outputs a matrix of values.

Usage

1
2
  cpc_read_rawdata(yr, mo, day, remove_input = TRUE,
    write_output = FALSE)

Arguments

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

Details

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.

Examples

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)

epijim/raincpc documentation built on May 16, 2019, 8:18 a.m.