hec_two allows you query a time series from a hec-ras model result using one more coordinates and an optional time stamp.

hec_two(hc, xy, ts_type = "Water Surface", time_stamp = NULL)

Arguments

xy

a coordinate or set of coordinates either in a dataframe or matrix structure. See details below for more information.

ts_type

the time series to extract, option defaults to Water Surface

time_stamp

return only values with this timestamp

f

an hdf file read in with the hec_file() function

Details

You can supply coordinates in as a matrix. The matrix must have two columns, the first corresponding to the x the second to y. You can supply a dataframe with two columns, the first for x and the second for y.

Examples

# NOT RUN {
## first read in file
f <- hec_file("examples/ArdenwoodCreek.p50.hdf")

## water surface time series at the coordinate 4567654.0, 2167453.0
ws <- hec_two(f, xy=c(4567654.0, 2167453.0), "Water Surface")

## water surface time series at multiple coordinates
coords <- c(4567654.0, 2167453.0, 3456124.0, 7856124.0)
ws <- hec_two(f, xy=coords, "Water Surface")

## water surface for a fixed timestamp, useful when querying for large amounts of coordinates. 
ws <- hec_two(f, xy=c(4567654.0, 2167453.0), "Water Surface", timestamp="2005-09-12 00:00:00")
# }