writeNC | R Documentation |
Save data to a NetCDF file
writeNC(data, res, ext, date, vars, varunit, contact, institute, filename)
data |
|
res |
|
ext |
|
date |
|
vars |
|
varunit |
|
contact |
|
institute |
|
filename |
|
A raster stack with monthly layers of aggregated data over the specified time period and area.
files <- list.files(paste0(system.file(package="processNC"), "/extdata"),
pattern="tas.*\\.nc", full.names=TRUE)
data <- subsetNC(files, ext=c(8.5, 14, 47, 51), startdate=1990, enddate=1999)
data <- as.data.frame(data, xy=TRUE)
outfile <- tempfile(fileext=".nc4")
writeNC(data=data, res=0.5, ext=c(8.5, 14, 47, 51),
date=seq(as.Date("1990-01-01"), as.Date("1999-01-01"), by="day"),
vars="tas", varunit="in degree Celsius", contact="RS-eco <rs-eco@posteo.de>",
institute="Github", filename=outfile)
raster::stack(outfile)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.