Description Usage Arguments Value Note Examples
Code to build a raster stack from AWAP grids for use in further analyses.
1 2 3 4 5 6 7 8 | stack_awap(
bbox = NULL,
stack_proj = c("+init=epsg:4283"),
start_date = "20120131",
variable = "FWDis",
sequence = "monthly",
stat = "raw"
)
|
bbox |
A list of coordinates defining a subregion for the raster stack |
stack_proj |
A projection definition for the final projected raster stack |
start_date |
The first month in the AWAP series to inlcude in the stack. If only interested in recent years, this will greatly improve the efficiciency. |
variable |
The AWAP variable to extract data for. |
sequence |
Monthly or Annual series |
stat |
Build a stack of the raw data or the percentile sequence (by monthly only). |
A raster stack of CSIRO AWAP files, stacked by date.
The function assumes the awap data files are in the directory raw_awap_data, which is a subdirectory of the working directory from which the function is being run (see download_awap for more details).
1 2 3 4 5 6 7 8 9 10 | #Define a bounding box for the city of Melbourne, Australia and surrounds
melb <- list(x = c(144.0000, 146.5000), y = c(-39.0000, -37.0000))
stack_awap(bbox=melb, start_date='20130131', seq="monthly")
#South-east Queensland
seqld <- list(x = c(149, 154.000), y = c(-21.0000, -29.0000))
seq_awap <- stack_awap(bbox=seqld, start_date='20130131')
writeRaster(seq_awap, filename='seq_awap.grd', bandorder='BIL', overwrite=TRUE)
vic <- list(x = c(141.0, 150.2), y = c(-34.0, -39.2))
vic_awap <- stack_awap(bbox=vic, start_date='19900131')
writeRaster(vic_awap, filename='vic_awap_1990_2014.grd', bandorder='BIL', overwrite=TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.