readNWMdata: NWM Reanalysis Extraction

View source: R/readNWM.R

readNWMdataR Documentation

NWM Reanalysis Extraction

Description

Download hourly flow values for an NHD COMID from the National Water Model version 1.2 or 2.0. Returned data is available between "1993-01-01 00" and "2017-12-31 23" but can be subset using a startDate and endDate.

Usage

readNWMdata(
  AOI = NULL,
  comid = NULL,
  siteID = NULL,
  startDate = NULL,
  endDate = NULL,
  tz = "UTC",
  version = 2.1,
  addObs = FALSE,
  add_nhd = FALSE
)

Arguments

AOI

spatial polygon or point to extract data for

comid

a NHD common identifier

siteID

a USGS NWIS site identifier (eight digits)

startDate

a start date (YYYY-MM-DD) or (YYYY-MM-DD HH)

endDate

an end date (YYYY-MM-DD) or (YYYY-MM-DD HH)

tz

the desired timezone of the data. Can be found with OlsonNames

version

the NWM version to extract (current = 1.2 or 2 (default))

addObs

should observation data be added? Only available when !is.null(siteID)

add_nhd

should the NHD spatial features be added to the output

Value

data.frame or sf object

Examples

## Not run: 
readNWMdata(comid = 101)
readNWMdata(comid = 101, version = 1.2)
readNWMdata(comid = 101, tz = "US/Pacific")

## End(Not run)

mikejohnson51/nwmTools documentation built on Dec. 4, 2024, 12:25 p.m.