Skip to content

StateDMI / Command / FillStreamGageStationsFromHydroBase


Overview

The FillStreamGageStationsFromHydroBase command (for StateMod) fills missing data in existing stream gage stations, using HydroBase for data.

Command Editor

The following dialog is used to edit the command and illustrates the command syntax.

FillStreamGageStationsFromHydroBase

FillStreamGageStationsFromHydroBase Command Editor (see also the full-size image)

Command Syntax

The command syntax is as follows:

FillStreamGageStationsFromHydroBase(Parameter="Value",...)

Command Parameters

Parameter               Description Default          
ID A single stream gage station identifier to match or a pattern using wildcards (e.g., 20*). None – must be specified.
NameFormat The format to use when setting the name, one of:
  • StationName – use the station name from HydroBase
  • StationName_NodeType – use the first 20 characters of the name from Hydrobase + “_” + the node type.
StationName
CheckStructures The old convention in StateMod was to combine stream gage and stream estimate stations in the stream gage station file. A new convention that is being evaluated is to have separate stream gage and estimate station files. Because stream estimate stations are often at HydroBase structures, filling names requires checking HydroBase structures. Since this step is not needed in the new convention, it is included as an option. Specify True to check structures when filling data from HydroBase. False
IfNotFound Used for error handling, one of the following:
  • Fail – generate a failure message if the ID is not matched
  • Ignore – ignore (don’t add and don’t generate a message) if the ID is not matched
  • Warn – generate a warning message if the ID is not matched
Warn

Examples

See the automated tests.

The following example command file illustrates the commands used to read stream gage stations from the network and create a StateMod file:

StartLog(LogFile="ris.commands.StateDMI.log")
# ris.commands.StateDMI
#
# StateDMI command file to create streamflow station file for the Colorado River
#
#  Step 1 - read streamgages and baseflows ids from the network file
#
ReadStreamGageStationsFromNetwork(InputFile="..\Network\cm2005.net",IncludeStreamEstimateStations="True")
#
#  Step 2 - read baseflow nodes names from HydroBase,
#           fill in missing names from the network file
#
FillStreamGageStationsFromHydroBase(ID="*",NameFormat=StationName,CheckStructures=True)
FillStreamGageStationsFromNetwork(ID="*",NameFormat="StationName")
#
#  Step 3 - set streamgage station to use to disaggregate monthly baseflows to daily
#
#  add set daily pattern gages for WD 36
SetStreamGageStation(ID="36*",DailyID="09047500",IfNotFound=Warn)
...many similar commands omitted...
#
#  Step 4 - create streamflow station file
#
WriteStreamGageStationsToStateMod(OutputFile="..\StateMod\cm2005.ris")
#
# Check the results
CheckStreamGageStations(ID="*")
WriteCheckFile(OutputFile="ris.commands.StateDMI.check.html")

Troubleshooting

See Also