Skip to content

Time-Series Gages

Creating and managing precipitation and discharge gages in HEC-HMS (.gage files).

Overview

The HmsGage class provides methods for working with time-series gage files, which link HMS models to DSS time-series data.

Quick Examples

List Gages

from hms_commander import HmsGage

# Get all gages
gages_df = HmsGage.get_gages("gages.gage")
print(gages_df)

# List by type
precip_gages = HmsGage.list_precip_gages("gages.gage")
discharge_gages = HmsGage.list_discharge_gages("gages.gage")

Get Gage Information

# Get specific gage details
gage_info = HmsGage.get_gage_info("Gage1", "gages.gage")
print(gage_info)

Create New Gage

# Create precipitation gage
HmsGage.create_gage(
    path="gages.gage",
    name="Precip_Gage_1",
    dss_file="timeseries.dss",
    pathname="/BASIN/LOCATION/PRECIP/01JAN2020/1HOUR/OBS/"
)

Update Gage DSS Reference

# Update DSS file reference
HmsGage.update_gage(
    "gages.gage",
    name="Precip_Gage_1",
    dss_file="updated_data.dss"
)

DSS Pathname Format

HMS gages reference DSS data using standard pathnames:

/A-Part/B-Part/C-Part/D-Part/E-Part/F-Part/

Example:

/BASIN/SUBBASIN1/PRECIP/01JAN2020/15MIN/OBS/

Key Operations

  • List gages - get_gages(), list_precip_gages(), list_discharge_gages()
  • Get details - get_gage_info()
  • Create/modify - create_gage(), update_gage()
  • Delete - delete_gage()

For complete API documentation, see HmsGage API Reference

CLB Engineering Corporation  ·  LLM Forward Engineering
HMS Commander is a free and open-source project maintained by CLB Engineering Corporation. For agencies and firms seeking to modernize H&H workflows with LLM Forward approaches, contact CLB to partner with the engineers who wrote the automation.