Description Usage Arguments Value Examples
View source: R/extract_brick_files.R
Extract RasterBrick from List of Filenames
1 2 3 4 5 6 7 8 | extract_brick_files(
files,
varname,
roi,
dims = 1:3,
timeconvertfun = function(t) lubridate::as_date(as.POSIXlt(t, origin =
lubridate::origin))
)
|
files |
A character list of filenames |
varname |
Character. Variable name to extract from each file. |
roi |
The region to extract. A raster 'extent' object. |
dims |
The order of dimensions that the variable is saved in. dims = c(1, 2, 3) is longitude, latitude, time. dims = c(2, 1, 3) is latitude, longitude, time. |
timeconvertfun |
A function that converts from time values, as given in the netCDF file, to time objects |
A rasterBrick object. The extents of the brick object are snapped to the smallest region containing all cells that intersect roi.
1 2 3 4 5 6 7 8 | roi <- extent(148.0779, 148.2011, -35.26581, -35.13167)
files <- build_filename_list("http://dapds00.nci.org.au/thredds/dodsC/ub8/au/OzWALD",
"8day/GPP",
"OzWALD",
"GPP",
2000:2018,
"nc")
b <- extract_brick_files(files, "GPP", roi, dims = c(2, 1, 3))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.