Skip to contents

Extracts the daily rainfall series for the IMD grid cell nearest to a (lat, lon). Reads only that one cell off disk per year, so it is the cheapest way to get a long series for a location.

Usage

IMDRainfallPoint(...)

imd_rainfall_point(
  request_id,
  start_year,
  end_year,
  latitude,
  longitude,
  resolution = 0.25,
  frequency = "daily",
  save_raw = FALSE,
  output_dir = tempdir(),
  use_cache = TRUE
)

Arguments

...

Arguments passed to the main function (used by aliases).

request_id

Unique identifier for the request.

start_year

Start year (1901-2024).

end_year

End year (1901-2024).

latitude

Point latitude.

longitude

Point longitude.

resolution

Spatial resolution: 0.25 or 1.0 degrees (default: 0.25).

frequency

Temporal frequency: "daily", "monthly", "yearly" (default: "daily").

save_raw

Whether to save raw downloaded files (default: FALSE).

output_dir

Directory to save files (default: tempdir()).

use_cache

Whether to use cached data if available (default: TRUE).

Value

data.frame with the nearest cell's rainfall series.

Examples

if (FALSE) { # \dontrun{
powai <- imd_rainfall_point("powai", 1901, 2024, 19.1277, 72.9047)
} # }