elevation_to_storage: Convert Between Elevation and Volume for a Reservoir

View source: R/elevation_to_storage.R

elevation_to_storageR Documentation

Convert Between Elevation and Volume for a Reservoir

Description

elevation_to_storage() computes the storage (volume) for a given elevation for a particular reservoir included in CRSS.

Usage

elevation_to_storage(elevation, reservoir)

storage_to_elevation(storage, reservoir)

Arguments

elevation

The elevation (in feet) that will be converted to volume.

reservoir

The reservoir to convert between elevation and storage. Spaces are removed from the name, and case is ignored. This should be a single reservoir.

storage

The volume (in acre-feet) that will be converted to an elevation (in feet).

Details

Elevation is assumed to be in feet, and volume is assumed to be in acre-feet for both input and return values in these functions. Currently, the functions will work for Flaming Gorge, Navajo, Blue Mesa, Powell, and Mead reservoirs. The elevation-volume tables contain data for 0.5 foot increments. The data are linearly interpolated for sub 0.5 foot values.

If the input values (elevation or storage) are beyond the range of the resevoir, the function returns NA.

Value

elevation_to_storage() returns volume in acre-feet with the same length as elevation, or NA if the elevation is invalid for the reservoir.

storage_to_elevation() returns an elevation in feet with the same length as storage, or NA if the storage is invalid for the reservoir.

Examples

elevation_to_storage(1075, "mead")
elevation_to_storage(6000, "Flaming Gorge")
elevation_to_storage(c(6000, 6001, 6004.6), "flamingGorge")

storage_to_elevation(6500000, "mead")
storage_to_elevation(100000, "Flaming Gorge")
storage_to_elevation(c(100000, 101000, 125000), "flamingGorge")


BoulderCodeHub/CRSSIO documentation built on July 2, 2023, 5:15 p.m.