Skip to content

Main content

River Stage Rising Falling Flag Tool

Calculate river stage rising falling flag from explicit caller-supplied inputs.

Loading tool…

Description

Subtract previousStage from currentStage, divide by positive elapsedHours, and label steady when absolute change is within nonnegative tolerance; otherwise label rising or falling.

A level reading is measured relative to an origin or datum. Adding an offset can express the same supplied observation in another compatible coordinate, while changing the reference label alone does not transform a datum.

Subtract previousStage from currentStage, divide by positive elapsedHours, and label steady when absolute change is within nonnegative tolerance; otherwise label rising or falling.

When to use this tool

Use River Stage Rising Falling Flag when you need one signed level, datum, or reference comparison.

How to use the tool and how it works

  1. Enter previousStage, currentStage, elapsedHours, tolerance. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read change, ratePerHour, trend. Use the output convention below.

Subtract previousStage from currentStage, divide by positive elapsedHours, and label steady when absolute change is within nonnegative tolerance; otherwise label rising or falling.1

Input fieldMeaning and unitsAccepted input
previousStagePrevious StageRequired. Finite number.
currentStageCurrent StageRequired. Finite number.
elapsedHoursElapsed HoursRequired. Finite number; strictly above 0.
toleranceToleranceRequired. Finite number; minimum 0.
Output fieldInterpretationReturned shape
changeChangeRequired. Finite number.
ratePerHourRate Per HourRequired. Finite number.
trendTrendRequired. Text; maximum UTF-16 length 8192.
json
{
  "input": {
    "previousStage": 2,
    "currentStage": 2.5,
    "elapsedHours": 2,
    "tolerance": 0.1
  },
  "output": {
    "change": 0.5,
    "ratePerHour": 0.25,
    "trend": "rising"
  }
}

Limitations and assumptions

  • Stages and tolerance share a length unit and datum; tolerance applies to total stage change rather than hourly rate, and the result is not a flood forecast.
  • Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
  • Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.

Alternative or Complementary methods

Verify the survey references, measurement direction, and calibration before using levels in an operational decision.

References

  1. Calculation and input contract: hydrology/river-stage-rising-falling-flag — tool.io

Similar or alternative tools