SeasonalRF_raster {CLimd} | R Documentation |
Generating Seasonal rainfall rasters from IMD NetCDF file
Description
Generating Seasonal rainfall rasters from IMD NetCDF file
Usage
SeasonalRF_raster(nc_data, output_dir = NULL, fun = "sum", year)
Arguments
nc_data |
Path to the IMD rainfall NetCDF file |
output_dir |
Directory to save the generated seasonal rainfall rasters (Optional) |
fun |
Aggregation function ("sum", "min", "max", "mean", "sd")(Default is "sum") |
year |
Year for which to generate seasonal rainfall raster |
Value
Returns a list containing the four seasonal rasters in GeoTIFF format
References
1. Pai et al. (2014). Development of a new high spatial resolution (0.25° X 0.25°)Long period (1901-2010) daily gridded rainfall data set over India and its comparison with existing data sets over the region, MAUSAM, 65(1),1-18. 2. Hijmans, R. J. (2022). raster: Geographic Data Analysis and Modeling. R package version 3.5-13. 3. Kumar et al. (2023). SpatGRID:Spatial Grid Generation from Longitude and Latitude List. R package version 0.1.0.
Examples
library(CLimd)
# Example usage:
nc_data <- system.file("extdata", "imd_RF_2022.nc", package = "CLimd")
output_dir <- NULL
fun<-"sum"
year<-2022
# Calculate seasonal rainfall sum for 2022
seasonal_rainfall <-SeasonalRF_raster(nc_data, output_dir=NULL, fun="sum", year)