| ck_from_netcdf | R Documentation |
Convenience wrapper that delegates to terra::rast(). Reads the
file at path and returns a SpatRaster, optionally restricted to a
single variable. terra and ncdf4 must be installed (both are listed
in Suggests:).
ck_from_netcdf(path, var = NULL)
path |
Character. Path to a netCDF file. |
var |
Character or |
A SpatRaster (one layer per time step in the netCDF file).
## Not run:
r <- ck_from_netcdf("tas_day.nc", var = "tas")
terra::nlyr(r) # number of daily layers
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.