cpc_prcp: Precipitation data from NOAA Climate Prediction Center (CPC)

Description Usage Arguments Details Value Data processing in this function Note References Examples

View source: R/cpc.R

Description

Precipitation data from NOAA Climate Prediction Center (CPC)

Usage

1
cpc_prcp(date, us = FALSE, drop_undefined = FALSE, ...)

Arguments

date

(date/character) date in YYYY-MM-DD format

us

(logical) US data only? default: FALSE

drop_undefined

(logical) drop undefined precipitation values (values in the precip column in the output data.frame). default: FALSE

...

curl options passed on to crul::verb-GET

Details

Rainfall data for the world (1979-present, resolution 50 km), and the US (1948-present, resolution 25 km).

Value

a data.frame, with columns:

Data processing in this function

Internally we multiply all precipitation measurements by 0.1 as per the CPC documentation.

Values of -99.0 are classified as "undefined". These values can be removed by setting drop_undefined = TRUE in the cpc_prcp function call. These undefined values are not dropped by default - so do remember to set drop_undefined = TRUE to drop them; or you can easily do it yourself by e.g., subset(x, precip >= 0)

Note

See cpc_cache for managing cached files

References

http://www.cpc.ncep.noaa.gov/ ftp://ftp.cpc.ncep.noaa.gov/precip/CPC_UNI_PRCP ftp://ftp.cpc.ncep.noaa.gov/precip/CPC_UNI_PRCP/GAUGE_CONUS/DOCU/PRCP_CU_GAUGE_V1.0CONUS_0.25deg.README ftp://ftp.cpc.ncep.noaa.gov/precip/CPC_UNI_PRCP/GAUGE_GLB/DOCU/PRCP_CU_GAUGE_V1.0GLB_0.50deg_README.txt https://www.esrl.noaa.gov/psd/data/gridded/data.unified.daily.conus.html

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## Not run: 
x = cpc_prcp(date = "2017-01-15")
cpc_prcp(date = "2015-06-05")
cpc_prcp(date = "2017-01-15")
cpc_prcp(date = "2005-07-09")
cpc_prcp(date = "1979-07-19")

# United States data only
cpc_prcp(date = "2005-07-09", us = TRUE)
cpc_prcp(date = "2009-08-03", us = TRUE)
cpc_prcp(date = "1998-04-23", us = TRUE)

# drop undefined values (those given as -99.0)
cpc_prcp(date = "1998-04-23", drop_undefined = TRUE)

## End(Not run)

rnoaa documentation built on May 19, 2021, 9:13 a.m.