Skip to main content

Crate lake_elevation

Crate lake_elevation 

Source
Expand description

§lake-elevation

Reservoir and lake elevation math: percent-of-pool, storage (acre-foot / cubic-meter) conversions, datum conversions (feet <-> meters), and the full-pool / conservation-pool calculations used by USACE, USGS, and Bureau of Reclamation reservoir operations.

The same math behind the LakeLevelNow water-level tracker.

Key conventions:

  • Elevations are in feet or meters above a datum (e.g. NGVD29 / NAVD88).
  • A reservoir’s conservation pool is the normal operating range between a minimum (dead/inactive pool) elevation and the full-pool (top of conservation) elevation.
  • Percent of pool is the fraction of that usable range currently filled.
  • Storage is measured in acre-feet (1 acre-foot = the volume covering 1 acre 1 ft deep, exactly 43,560 ft^3) or cubic meters (1 ft^3 = 0.028316846592 m^3, exact per 1959 international yard agreement: 1 ft = 0.3048 m exactly).
use lake_elevation::{percent_of_pool, feet_to_meters};
assert!((percent_of_pool(100.0, 0.0, 100.0) - 100.0).abs() < 1e-9); // at full pool
assert!((feet_to_meters(1.0) - 0.3048).abs() < 1e-12);             // exact by definition

Constants§

ACRE_FEET_PER_CUBIC_METER
Acre-feet per cubic meter (1 / (43,560 * 0.028316846592)).
CUBIC_FEET_PER_ACRE_FOOT
Cubic feet in one acre-foot (43,560 exactly: 1 acre x 1 ft = 43,560 ft^2 x 1 ft).
CUBIC_METERS_PER_CUBIC_FOOT
Cubic meters in one cubic foot (0.3048^3 = 0.028316846592 exactly, per 1959 yard agreement).
FEET_PER_METER
Exact feet per meter (1 / 0.3048).
METERS_PER_FOOT
Exact meters per foot under the 1959 international yard agreement (1 ft = 0.3048 m exactly).

Functions§

acre_feet_to_cubic_meters
Convert acre-feet to cubic meters.
conservation_pool_storage_acre_feet
Total conservation-pool storage (acre-feet) under the prismatic approximation.
cubic_meters_to_acre_feet
Convert cubic meters to acre-feet.
feet_below_full
Deficit to full pool in feet. Negative means the lake is above full (flood pool).
feet_to_meters
Convert an elevation in feet to meters (exact: 1 ft = 0.3048 m).
is_below_min_pool
Whether the lake is below its minimum (inactive / dead) pool elevation.
is_in_flood_pool
Whether the lake is in its flood pool (above full / top of conservation).
meters_to_feet
Convert an elevation in meters to feet (exact inverse).
percent_of_pool
Percent of the conservation pool currently filled.
shift_datum_feet
Apply a datum shift expressed in feet. A positive offset_ft raises the elevation; e.g. converting NGVD29 -> NAVD88 on the US west coast often subtracts ~2-3 ft (negative offset).
shift_datum_meters
Apply a datum shift expressed in meters.
storage_in_pool_acre_feet
Linear storage estimate within the conservation pool assuming a prismatic (constant surface-area) approximation. Returns the approximate volume in acre-feet between min and current, capped at full so a positive number never exceeds total storage.