imd_rainfall_bbox: Download and process IMD rainfall data for a bounding box

View source: R/imd_core.R

IMDRainfallBboxR Documentation

Download and process IMD rainfall data for a bounding box

Description

Downloads IMD gridded rainfall data and keeps only the data in the specified bounding box.

Usage

IMDRainfallBbox(...)

imd_rainfall_bbox(
  request_id,
  start_year,
  end_year,
  north,
  south,
  east,
  west,
  resolution = 0.25,
  frequency = "daily",
  save_raw = FALSE,
  output_dir = tempdir(),
  use_cache = TRUE
)

Arguments

...

Arguments that the aliases send to the primary function.

request_id

Unique identifier for the request.

start_year

Start year.

end_year

End year.

north

Latitude of the north boundary.

south

Latitude of the south boundary.

east

Longitude of the east boundary.

west

Longitude of the west boundary.

resolution

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

frequency

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

save_raw

If TRUE, keep the raw downloaded files (default: FALSE).

output_dir

Directory for the output files (default: tempdir()).

use_cache

If TRUE, use the cached data when it is available (default: TRUE).

Value

A data.frame with columns date, latitude, longitude and rainfall (mm), restricted to the requested region and aggregated to frequency.

Examples


data <- imd_rainfall_bbox(
  request_id = "maharashtra_rain",
  start_year = 2023,
  end_year = 2024,
  north = 22, south = 16,
  east = 80, west = 73,
  resolution = 0.25,
  frequency = "monthly"
)


varunayan documentation built on Oct. 30, 2026, 1:07 a.m.