Reads IMD NetCDF rainfall data and converts to data.frame.
Usage
read_imd_rainfall(file_path, resolution, year, bbox = NULL)
Arguments
- file_path
Path to IMD NetCDF file (.nc).
- resolution
Spatial resolution: 0.25 or 1.0.
- year
Year of the data.
- bbox
Optional named list/vector (north, south, east, west). When set,
only that spatial slab is read off disk (fast path); NULL reads the full grid.
Value
data.frame with columns: date, latitude, longitude, rainfall
Examples
if (FALSE) { # \dontrun{
rain_data <- read_imd_rainfall("imd_rainfall_0.25_2023.nc", 0.25, 2023)
} # }