Helper functions to treat a NetCDF variable as an R array
nchelper(file, varname = NULL)
file | NetCDF file |
---|---|
varname | NetCDF variable to access |
nchelper object
Create an object to represent a NetCDF variable, primarily to access slices from it with R's Extract syntax for arrays.
f <- system.file("extdata", "avhrr-only-v2.20180126.nc", package = "nchelper") a <- nchelper(f, "sst") plot(a[,360,,] * 0.01, ylim = c(20, 32), type = "l")