getQuarterlyEDEN: Downloads quarterly EDEN data (from 1991 through present)

View source: R/getQuarterlyEDEN.R

getQuarterlyEDENR Documentation

Downloads quarterly EDEN data (from 1991 through present)

Description

Provides access to quarterly data covering the entire period of record. Downloads netCDF files from https://sflthredds.er.usgs.gov/thredds/catalog/eden/surfaces/catalog.html. 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

getQuarterlyEDEN(
  YYYYMMDD,
  DEM = terra::rast(system.file("extdata/edenDEM.grd", package = "fireHydro")),
  quarterly = FALSE,
  download.method = "libcurl"
)

Arguments

YYYYMMDD

EDEN date to be used for water levels. Should be an 8-digit numeric or character stirng, e.g., "20181018". By default, today's date is used; if "exact = FALSE" this returns the most recent EDEN data available.

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 in meters NAVD88. If 'DEM = NULL', output will be water surface in centimeters NAVD88.

quarterly

logical; if set to TRUE, entire quarter is downloaded.

download.method

For use in debugging or troubleshooting. Method to be used for downloading files. See options in utils::download.file

Value

eden getQuarterlyEDEN returns an 'eden' object, which is a list with two elements: (1) a vector of dates in the specified quarter, and (2) a SpatRaster with a water depth layer for each date (units = cm w.r.t. soil surface, unless 'DEM = NULL'). Geospatial data returned by this function is always a SpatRaster.

Examples


## Not run: 

edenDat <- getQuarterlyEDEN(YYYYMMDD = "19910101", quarterly = TRUE)

## End(Not run)


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