Conversion of SpatRaster to array and optionally save on a Netcdf File.
Usage
rast_to_netcdf(r, file, name, unit = units(r), XY = FALSE, verbose = TRUE)
Note
eva3dm::wrf_rast support 3d SpatRaster, in case of a 4d variable use other approach to save on file.
Examples
folder <- system.file("extdata",package="eva3dm")
wrf_file <- paste0(folder,"/wrf.day1.o3.nc")
Rast <- wrf_rast(wrf_file,'o3')
A <- rast_to_netcdf(Rast)