getCHIRPS: Download CHIRPS data

Description Usage Arguments Value Author(s) See Also Examples

View source: R/getCHIRPS.R

Description

Download Climate Hazards Group InfraRed Precipitation with Station (CHIRPS) data for a given time span from Climate Hazards Group's (CHG) FTP server (ftp://chg-ftpout.geog.ucsb.edu/pub/org/chg/products/CHIRPS-2.0/).

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
getCHIRPS(
  region = c("global", "whem", "africa", "camer-carib"),
  format = c("tifs", "netcdf", "bils", "pngs"),
  tres = c("6-hourly", "daily", "pentad", "dekad", "monthly"),
  sres = c(0.05, 0.25),
  begin = NULL,
  end = NULL,
  dsn = getwd(),
  overwrite = FALSE,
  cores = 1L,
  ...
)

Arguments

region

'character'. Region of interest; one of 'global', 'whem' (western hemisphere), 'africa' or 'camer-carib' (Central America and the Caribbean). See the official CHIRPS README (available online at ftp://chg-ftpout.geog.ucsb.edu/pub/org/chg/products/CHIRPS-2.0/README-CHIRPS.txt) for further information.

format

'character'. Desired file format; one of 'tifs' (default), 'netcdf', 'bils' or 'pngs'.

tres

'character'. Desired temporal resolution; one of '6-hourly' (default), 'daily', 'pentad', 'dekad' or 'monthly'.

sres

'numeric'. Desired spatial resolution; one of c(0.05, 0.25).

begin, end

'date'. If not supplied, data download starts (stops) with the first (last) record available.

dsn

'character'. Destination folder for file download, defaults to the current working directory.

overwrite

Logical. If TRUE, already downloaded files in 'dsn' will be overwritten.

cores

'integer'. The number of cores used for parallel downloads.

...

Further arguments passed to download.file.

Value

A character vector of file paths.

Author(s)

Florian Detsch

See Also

download.file

Examples

1
2
3
4
5
6
7
8
## Not run: 
## Download CHIRPS monthly data over Africa from 1982-1983
gzs <- getCHIRPS("africa", tres = "monthly"
                 , begin = as.Date("1982-01-01"), end = as.Date("1983-12-31")
                 , dsn = file.path(getwd(), "data"))
gzs[1:10]

## End(Not run)

environmentalinformatics-marburg/heavyRain documentation built on Sept. 1, 2020, 9:53 a.m.