powered by
Conversion of SpatRaster to array and optionally save on a Netcdf File.
rast_to_netcdf(r, file, name, unit = units(r), XY = FALSE, verbose = TRUE)
numerical array
SpatRaster object
Netcdf file name
variable name on a Netcdf file
unit of the variable (set to NA to don't change unit)
set to true if MemoryOrder is XY (only if file is missing)
display additional information
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)
Run the code above in your browser using DataLab