View source: R/getAnnualEDEN.R
getAnnualEDEN | R Documentation |
Downloads and combines netCDF files from https://sofia.usgs.gov/eden/models/watersurfacemod_download.php, unzips and loads them into the workspace. Zip files are deleted after loading. This function makes 'fireHydro' able to operate with complete independence from Department of Interior servers. This code generates a water depth map using the USGS water surface data and the USGS EDEN digital elevation map (present in this R package as raster layer "edenDEM").
getAnnualEDEN( years, DEM = terra::rast(system.file("extdata/edenDEM.grd", package = "fireHydro")), download.method = "curl" )
years |
a vector specifying which years of EDEN data should be downloaded. Please consider RAM limitations - a year of data can be ~ 300 Mb of RAM. If this is an issue, consider using getAnnualEDEN() and do analysis/extraction incrementally in a loop. |
DEM |
raster digital elevation model for south Florida. Used to subtract land elevations from water surface to get water depths. The default DEM is a USGS/EDEN product. If 'DEM = NULL', output will be water surface in centimeters NAVD88. |
download.method |
Method to be used for downloading files. See options in utils::download.file |
eden getAnnualEDEN
returns an 'eden' object, which is a list with two elements: (1) the dates used, and (2) a SpatRaster object with a layer for each day, containing water level data for the EDEN grid (units = cm rel. to soil surface).
## Not run: edenDat <- getAnnualEDEN(years = 2019:2020) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.