Skip to contents

The IMERG dataset provides near-real time global observations of rainfall at 10km resolution, which can be used to estimate total rainfall accumulation from storm systems and quantify the intensity of rainfall and flood impacts from tropical cyclones and other storm systems. IMERG is a daily precipitation dataset available from 2015 to present within the latitudes 70 and -70 degrees.

Usage

get_imerg(object, dates, operation = 5, ...)

# Default S3 method
get_imerg(object, dates, operation = 5, ...)

# S3 method for class 'sf'
get_imerg(object, dates, operation = 5, as.sf = FALSE, ...)

# S3 method for class 'geojson'
get_imerg(object, dates, operation = 5, as.geojson = FALSE, ...)

Arguments

object

input, an object of class data.frame (or any other object that can be coerced to data.frame) with longitude and latitude in the first two columns, SpatVector, SpatRaster, SpatExtent, sf, sfc or geojson

dates

a character or Date vector "YYYY-MM-DD", with one date for a single day or two dates for the start and end of the period

operation

optional, an integer that represents which type of statistical operation to perform on the dataset

...

additional arguments passed to get_chirps_raw and extract. See details

as.sf

logical, returns an object of class sf

as.geojson

logical, returns an object of class geojson

Value

A data frame of imerg data:

id

the index for the rows in object

dates

the dates from which imerg was requested

lon

the longitude as provided in object

lat

the latitude as provided in object

imerg

the IMERG value

Details

operation: supported operations are:

operationvalue
max=0
min=1
median=2
sum=4
average=5 (default value)

dist: numeric, buffer distance for each object coordinate

nQuadSegs: integer, number of segments per buffer quadrant

Future deprecation

get_imerg() reads from the ClimateSERV API, which chirps no longer recommends. get_imerg() will be deprecated in a future release, and a notice says so once per session. CHIRPS rainfall is available from the CHC server with get_chirps().

Examples

if (FALSE) { # interactive()
lonlat = data.frame(lon = c(-55.0281,-54.9857),
                     lat = c(-2.8094, -2.8756))

dates = c("2017-12-15", "2017-12-31")

dt = get_imerg(lonlat, dates)

dt
}