| IMDRainfallPoint | R Documentation |
Extracts the daily rainfall series for the IMD grid cell that is nearest to a (lat, lon) point. For each year, the function reads only that one cell from the disk. Thus, this function is the method with the lowest cost to get a long series for one location.
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 that the aliases send to the primary function. |
request_id |
Unique identifier for the request. |
start_year |
Start year (1901-2024). |
end_year |
End year (1901-2024). |
latitude |
Latitude of the point. |
longitude |
Longitude of the point. |
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). |
data.frame with the rainfall series of the nearest cell.
powai <- tryCatch(
imd_rainfall_point("powai", 2023, 2023, 19.1277, 72.9047,
resolution = 1, use_cache = FALSE
),
error = function(e) message("IMD server unavailable: ", conditionMessage(e))
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.