View source: R/elevation_to_storage.R
| elevation_to_storage | R Documentation |
elevation_to_storage() computes the storage (volume) for a given elevation
for a particular reservoir included in CRSS.
elevation_to_storage(elevation, reservoir)
storage_to_elevation(storage, reservoir)
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). |
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.
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.
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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.