getAnnualEDEN: Downloads and imports archived EDEN data at annual or...

View source: R/getAnnualEDEN.R

getAnnualEDENR Documentation

Downloads and imports archived EDEN data at annual or multi-annual time steps

Description

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").

Usage

getAnnualEDEN(
  years,
  DEM = terra::rast(system.file("extdata/edenDEM.grd", package = "fireHydro")),
  download.method = "curl"
)

Arguments

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

Value

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).

Examples


## Not run: 

edenDat <- getAnnualEDEN(years = 2019:2020)

## End(Not run)


troyhill/fireHydro documentation built on Feb. 2, 2023, 12:09 p.m.