WMS:Repeated Use of an Equation

From XMS Wiki
Jump to: navigation, search

If the local hydrology manual requires the use of an equation not currently supported by WMS and this equation must be repeatedly used for projects, set up the equation in a text file in the same directory as WMS. It will be read in and set up as the user defined equation automatically. To do this, create a file named "wmstc.equ" and define one or more equation groups (a group may be used because sometimes the equation to compute a travel time may be a function of another equation). The following is an example wmstc.equ file.

EQGROUP Myeq1

EQ 1.49 / n * R * Sc DEF Manning's equation UNITS laghour

VAR n DEF Manning's roughness coefficient VAL .002 UNITS none WHICH -1

VAR R DEF Hydraulic Radius VAL 0.0 UNITS ft WHICH 2

EQ XA / Pw DEF Hydraulic Radius UNITS ft

VAR XA DEF Cross section area VAL 0.0 UNITS sqft WHICH -1

VAR Pw DEF Wetted Perimeter VAL 0.0 UNITS ft WHICH -1

EQGROUP Myequ2

EQ Lc / V DEF Time of travel UNITS lagmin

VAR V DEF Velocity VAL 2.5 UNITS none WHICH -1


The following describes the keywords used in the file as well as the possible values that can be entered following each keyword.

Each equation group begins with the EQGROUP card. The rest of the line is interpreted as a character string and used as the name of the equation group in the drop-down combo box allowing selection an equation.

Each equation is defined using the following three cards with their associated inputs:

EQ – The equation

DEF – A character string definition for the equation

UNITS – Units of the computed result. Possible values for units include: laghour, lagmin, tchour, tcmin, clarkr, tp. The first four identify whether the equation is intended for use in computing lag time or time of concentration (a conversion to the other is done using this equation) and whether the result is in minutes or hours. The last three are used if the equation is used to compute the Clark storage coefficient or one of the peaking parameters used in HEC-1.

If one of the WMS recognized variables are used (A, Lca, etc.) then it is not necessary to include a VAR record as it will automatically map the WMS variable for use in the equation. For variables not recognized as something WMS computes, include a VAR line that uses the following keywords:

VAR – Name of the variable

DEF – Variable definition or description

VAL – The initial default value (should be 0.0 if this will be entered separately for each basin)

UNITS – The units of the variable. The following list of keywords are recognized for units. If using a variable with units not in this list, enter "none" and then make sure that the equation is dimensionally consistent with the units defined for the equation on the EQ line.

laghour  
tcmin  
tchour  
lagmin  
mi mile
m meter
ft feet
km kilometer
hr hour
sec second
none none
acre acre
sqkm square kilometer
sqmi square mile
sqft square feet
sqm square meter
in inch
mm millimeter
hect hectare


WHICH – If a variable represents another equation that is part of the equation group then the variable should follow the WHICH keyword with the equation number. If it does not represent another equation then the variable should be followed with a -1. See the example above where the hydraulic radius variable R represents the second equation in the group (XA/Pw).

A user may define as many equations as desired in the file and each time WMS is started the equations will be read and become members in the list of equations that can be selected when defining travel times from basin data.

Related Topics