**Hydrology Lab\'s** **Research** **Modeling System (HL-RMS) User
Manual**

(Last Modified 10/25/04) \_

Modified (11/1/04) by Fekadu Moreda -- added features SNOW-17 & CONT-API

**1. INTRODUCTION**

To facilitate research into the use of distributed modeling for
hydrologic simulation and forecasting, HL has developed the Research
Modeling System (HL-RMS). Koren et al. (2003) provides a complete
description of the model and its scientific basis. Simulation results
presented by Koren et al. (2003) and results from the Distributed Model
Inter-comparison Project (DMIP)
([[http://www.nws.noaa.gov/oh/hrl/dmip/index.html)]{.underline}](../(http://hsp.nws.noaa.gov/oh/hrl/dmip/index.html))
have demonstrated the benefits of using HL-RMS or similar modeling
techniques for streamflow simulation.

This document provides all of the information required to setup and run
the model. The remainder of this user manual is organized into seven
sections:

2.  Hydrologic system structure and hydrologic models

3.  Input data requirements

4.  System configuration

5.  Running the model

    1.  How to run

    2.  Input Deck Cards

    3.  Program output

    4.  Notes for running in forecast mode

    5.  Known limitations and bugs

6.  

7.  

8.  Parameter estimation and customization

> 6.1 The connectivity file
>
> 6.1.1 Adding outlets to the connectivity file
>
> 6.1.2 Adjusting cell areas in the connectivity file to reflect USGS
> defined drainage areas
>
> 6.3 Analyze flow measurement data to determine routing parameters
>
> 6.4 Generate customized routing parameter grids

9.  References

**Appendices:**

I.  Free format rules for the input deck

**2. HYDROLOGIC SYSTEM STRUCTURE AND HYDROLOGIC MODELS**

A brief overview of the system structure and hydrologic models is
provided here. A more detailed description is provided by Koren et al.
(2003). The basic computational elements in the HL-RMS are HRAP
(Hydrologic Rainfall Analysis Project) grid cells (or pixels). Unique
snowmelt, rainfall-runoff and routing parameters may be defined for each
pixel. There are also options within the system that allow spatial
averaging of inputs or model parameters over areas larger than a single
pixel (e.g. a forecast basin), but the HRAP pixel is the finest spatial
resolution at which outputs can be generated and an hourly time step is
the finest temporal resolution for time-series outputs in version 1.0.
Each model element consists of a SNOW-17, rainfall-runoff component
(e.g. SAC-SMA or CONT-API model) and a routing component (hillslope and
channel kinematic wave model in HL-RMS, a unit hydrograph option is also
available).

The SNOW-17 model generates a rain-plus-melt which will be passed to a
rainfall-runoff model. The rainfall-runoff component generates fast
(surface) and slow (subsurface/ground) runoff. Within each element, fast
runoff is routed over a conceptual hillslope to a channel, and then
channel inflow, combined with a slow runoff component and upstream pixel
outflows, is routed through a pixel conceptual channel. A conceptual
hillslope consists of a number of uniform hillslopes (the number of
uniform hillslopes depends on the stream channel density specified for
the pixel). A conceptual channel usually represents the highest order
stream in a selected pixel. A topographically defined cell-to-cell
connectivity sequence is used to move water from upstream to downstream
cells and to basin outlets. Initially, complete HRAP cell-to-cell
connectivity files are provided to each RFC by HL. Algorithms used to
define cell flow directions used to generate the cell-to-cell
connectivity files are described by Reed (2003). An implicit numerical
scheme is used for the kinematic wave equation solution.

HL-RMS can currently be run in calibration mode and forecast mode. In
calibration mode, a likely use case is that simulations will be run for
a relatively small area (e.g. a single basin or forecast group) but for
many time steps (years). In forecast mode, the anticipated use case is
to run simulations for many basins/grid cells but for a shorter duration
(e.g. 30 days). (The forecast option is not implemented in the version
of HL-RMS delivered to MARFC. There will be future effort to include the
forecasting option by providing additional function to output to the
time series into infomix database.

**3. INPUT DATA**

A simplified data flow diagram for the HL-RMS/ programs is provided in
Figure 1. Figure 1 shows that the main inputs required by the model are:

(1) Input variables, "XMRG grid files" (precipitation, air temperature
    and PE if available)

(2) Parameter grids

(3) Model states from a previous run (optional)

(4) Cell connectivity file

(5) Input deck

**Figure 1. HL-RMS Generalized Flow Chart**

![](media/image1.wmf){width="4.356944444444444in"
height="4.928472222222222in"}

**Grid formats:** HL-RMS reads precipitation and air temperature data in
the XMRG format (<http://www.nws.noaa.gov/oh/hrl/pps/pps.htm>). The data
format for all other input grids (e.g. model parameters or saved model
states from a previous run) is similar to XMRG binary grids with a minor
difference in the header. These XMRG-like grids are binary files with
two header records. The first record is the same as the XMRG record and
consists of four integers: X- and Y-origins of HRAP, and numbers of
columns and rows in the file. The second record differs from XMRG
records. It includes two variables: an integer scale factor to convert
integer\*2 values into real values (to get the true values, divide the
value stored in the file by this factor), and number of bytes per value
(2 for integer\*2 format and 4 for real\*4 format). This allows keeping
all grids in either integer\*2 or real\*4 formats. As with the XMRG
format, data values are written to the file in row-column format, with
the southernmost row written to the file first and the northernmost row
written last.

In calibration mode, during the first run for a set of basins, the model
will read archived hourly XMRG precipitation files directly. Reading
many hourly XMRG files for long time periods (i.e. several years) is
computationally slow; therefore, during the first run for an area
separate 1-dimensional binary files are created which contain
precipitation data for only the pixels being modeled. Use of the
1-dimensional binary files as model input in subsequent runs greatly
reduces run times. Use of these 1-D binary files has been a useful
strategy for calibration scenarios when the model is run many different
times for the same model domain. More details about the 1-D binary file
format and the file naming conventions are provided in Section 5.

**(1) Input variables.** These include hourly precipitation grids in
XMRG format and climatological monthly potential evaporation (PE) and PE
adjustment factor grids in an XMRG-like format. A priori PE and PE
adjustment factor grids are provided by HL for the conterminous United
States. **NOTE:** Hourly/daily potential evaporation grids can be also
used as input if available.

**(2) Parameters.**

[Up to]{.underline} [25]{.underline} [SNOW-17 parameters:]{.underline}
Right now there are no a-priori SNOW-17 parameter grids. In our initial
application of the distributed SNOW-17 model, all parameters are defined
as a basin-specific. One exception is that the depletion curve can be
set to a straight line with SI value greater than zero. Another
alternative is to set SI=0. In the latter case the model assumes a snow
or no snow for each pixel.

[Up to 16 SAC-SMA parameters]{.underline}: Right now, 11 a-priori
SAC-SMA parameter grids are provided by HL for the conterminous United
States. In our initial applications, the other 5 SAC-SMA parameters
(PCTIM, ADIMP, RIVA, SIDE, RSERV) have been defined as basin-specific
constants in the input deck. The program can accept grids for these 5
parameters if available, but the current HL-RMS pre-processing programs
don't produce spatially variable grids for these parameters.

[Up to 37 CONT-API parameters]{.underline}: Right now, 10 a-priori
CONT-API parameter grids are provided by the HL for Susquehanna River
Basin. Other remaining parameters have been defined as basin-specific
constants in the input deck.

[Routing parameter grids:]{.underline} As described by Koren et. al.
(2003), there are two distinct routing regimes, hillslope and channel
routing. The hillslope routing method requires three input grids: (1)
slope, *S~h~*, (2) roughness coefficient, *n~h~*, and (3) stream channel
density, *D*.

The program converts hillslope parameter grids into one basic hillslope
parameter grid, a specific hillslope discharge (***q~0,h~***) per a unit
depth, based on Chezy-Manning's equation:

> $$q_{0,k} = 2k_{q}D\frac{\sqrt{S_{k}}}{n_{k}}$$

where ***k~q~*** = 10^5^ is a unit transformation coefficient. A unit of
hillslope specific discharge is

*mm^-2/3^.s^-1^* if *D* is in *km^-1^.*

There are currently two options available for defining the channel
routing parameter grids, a channel shape method and a rating curve
method. For the channel shape method, there are four channel input grids
(4) slope, *S~c~*, (5) roughness coefficient, *n~c~*, (6) shape
parameter, *b*, and (7) top width parameter, *a*. Shape and top width
parameters are defined based on the assumed relationship between channel
top width (B) and depth (H), ***B=a\*H\*\*b***. In this method, the four
channel grids are converted into two basic channel parameter grids
within the program, a specific channel discharge, ***q~0,c~***, per unit
channel cross-section, and a power value, ***m~c~***, in the
relationship between discharge and cross-section (Q = q~0,c~A^mc^) using
the following relationships:

$q_{0,c} = a^{- \frac{2}{3(b + 1)}}(b + 1)^{- \frac{2b}{3(b + 1)}}\frac{\sqrt{S_{c}}}{n_{c}}$

$m_{c} = \frac{b + \frac{5}{3}}{b + 1}$

A unit of channel specific discharge is *m^3-mc^.s^-1^* if *a* is in
meters*.*

When the rating curve method is used, grids of q~0,c~ and m~c~ are
defined explicitly by the user. Section 7 of this manual describes
methods to populate channel routing parameter grids with reasonable
values using either method.

**(3) Initial state variables.** There are 8 initial state conditions
for SNOW-17 model. For CONT-API there are 8 initial conditions. SAC-SMA
upper and lower zone states (UZTWC, UZFWC, LZTWC, LZFSC, LZFPC, ADIMPC),
a hillslope routing state (water depth of each pixel), and channel
routing states (channel cross-sectional flow area -- states are stored
at three locations along the conceptual channel of each pixel). In
calibration mode, the program will automatically save all the states for
the last time step in each run. In forecast mode, the program will
automatically save all the states at 12z for each day up to the current
time. Only the states for selected basins are saved and all values
outside the selected basin region are set to -1.0. When starting
simulations in a new basin or basins, it is often the case that no state
variable grids are initially available, therefore, there is an option to
start the model with spatially constant state variables for basins,
specified in the input deck. There is also an option in to output and
display states for user specified times.

\(4\) Connectivity file. The connectivity file stores an ordered list of
all cells in the model domain. The cells are ordered so that each time
the next cell in the list is reached, computations for all upstream
cells have already been completed. In the header of the connectivity
file, the user specifies basin outlet cells and IDs of interest for a
region. The same outlet IDs used in the connectivity file are also used
in the input deck to choose where hydrographs will be generated. Figure
2 shows a screenshot of the top of a connectivity file. More details
about the contents of connectivity files are provided in Section 7.

**(5) Input deck.** The input deck defines the model run period,
parameter values and/or parameter scale factor adjustments for each
basin, system paths to inputs and outputs, and other options. All input
deck options are described in Section 5. Using input deck
specifications, all parameter grids can be replaced by some uniform
values for each selected basin/subbasin or the grids can be adjusted by
some ratio for each selected basin/subbasin.

4\. SYSTEM CONFIGURATION

SYSTEM Configuration for ORMS (See installation documents of ORMS. These
documents are provided with the program source codes. )

  ----------------------------------- -----------------------------------
                                      

                                      

                                      

                                      

                                      

                                      

                                      

                                      

                                      

                                      

                                      

                                      

                                      

                                      

                                      

                                      

                                      

                                      

                                      

                                      

                                      

                                      
  ----------------------------------- -----------------------------------

**5. RUNNING THE MODEL**

**5.1. How to run** **(From the command line):**

To run HLRMS, issue the command 'orms ***-option \<input.deck name\>***'
where ***orms*** is the executable program, and \<***input.deck
name**\>* is a file that defines the model run period, parameter values
and/or parameter scale factor adjustments for each basin, file paths to
inputs and output, and other options.

> Run-time Options:
>
> -c By default HLRMS runs in forecast mode. When the --c option is
> given, HLRMS executes in calibration mode.
>
> -x HLRMS can read binary XMRG files created on HP machines or Linux
> machines. Without the --x option, the program assumes that files were
> created on Linux. With the --x option, the program assumes the files
> were created on an HP machine.

**5.2. Input Deck Cards:**

Each card in the input deck begins with the @ symbol followed by a
specific letter based on the type of input. The entries on each card use
free format, and the cards do not have to be defined in any particular
order. A description of the free format input rules is provided in
Appendix I. The only rule for placing input deck entries is that all
basin specific information entries preceded by a "+", have to be placed
after each basin's \@I card.

Any line in the input deck that begins with "#" is considered a comment
line.

***\@A (16 entries)***

-   start and end time (mmddyyy hh) -- Z is the default time zone code.
    In forecast mode, the start date represents the last day of observed
    data (LSTCMPDY). In calibration mode this is the start and end of
    the simulation period.

> Relative Dating -- start and end dates can be specified using the
> "\*", which denotes the current date and time, followed by a "+" or
> "-" sign and the number of days relative to the current date.
>
> For example: If the current date and time is April 2 2003 06Z
>
> \- A start date of \*-1, means the start date is April 1 2003 06Z

-   time step in hours

-   precipitation mode (1 = distributed (default), 0 =lumped
    precipitation)

-   index telling whether to conduct a runoff simulation (1= run
    simulation, 0 = only process parameters)

-   precipitation averaging scale (based on HRAP grid scale, e.g. if the
    input is 3, then the precipitation will be spatially averaged over
    3x3 HRAP pixels)

-   create XDHMS grids (1=yes, 0=no) for:

    -   SAC parameters (*sac_pname_xDHMS, where pname is one of 16 sac
        parameters*)

    -   routing parameters *(rutpix_QSH_xdms, rutpix_Q0CHN_xdms, and
        rutpix_QMCHN_xdms*)

    -   monthly PE (*sac_pe_mname_xdms, where mname is three letter
        abbreviation for month*)

    -   monthly PE adjustment (*sac_peadj_mname_xdms, where mname is
        three letter abbreviation for month*)

    -   initial SAC states \[fraction\] (*sac_name_xdms, where name is
        uzfwc, uztwc, lztwc, lzfpc, lzfsc, and adimpc*)

    -   initial routing states (*rutpix_areac1_xdms, rutpix_areac2_xdms,
        rutpix_areac3_xdms, rutpix_depth_xdms*)

> **These grids show data relevant to the current run and reflect any
> adjustments specified on the \@I card. XDMS grids only show values for
> the basins modeled. Other areas are filled with missing values
> (-9999).**

-   (Forecast Mode Only) number of days before the start time to start
    the simulation

-   (Forecast Mode Only) number of hours of QPF (6,12,18, or 24)

e.g. *\@A 06011993 0 07312000 23 1 1 1 2 0 0 0 0 0 0* 2 12

***\@O***, Path to output files

-   hydrograph (\*.hyd)

-   MAPX time series (\*.pcp and \*.mapx)

-   model states (SAC-SMA and Routing -- time stamped mmddyyyyhhz),

-   requested XDMS format grids - time stamped (see \@V)

-   This directory contains the "carry save" content grids(adimpc,
    lzfpc, uzfwc, lzfsc, lztwc, and uztwc- with the time stamp
    mmddyyyyhhz used in subsequent model runs.)

> e.g. *\@O /bulk/1/SAC_dst_data*

***\@P***, Path to parameter grid files.

e.g. *\@P /fs/home/vkoren/devl/parameters/hrap*

***\@Q***, Path to sequence file.

e.g. *\@Q /fs/home/vkoren/SEQ_FILES/abrfc.seq*

***\@X***, Path to xmrg files and the number of characters denoting

the year.

e.g. *\@X
/fs/hydro/Hydro_Data/ABRFC/PRECIPITATION/RADAR/STAGE3/RAD_97-99 4*

***\@S***, Path to QPF grid files and number of characters denoting
year. While this can be the same as the one defined for the @***X***
card, it is not recommended. Placing the QPF and Precipitation XMRG
files in the same directory greatly increases the display time of QPF
files in XDHMS.

e.g. *\@S /fs/home/vkoren/devl/MPE 4*

***\@V***, Input for creating grids viewable in xdms (1 = yes, 0 = no,
default is 0)

-   start and end time for gridded output (format is 'mmddyyy hhz' where
    hh (hour) should be between 0 - 23)

> NOTE: Dates can specified using the "\*" as described for the \@A card

-   time interval for gridded output (e.g. 6 means output every 6 hours
    between the start and end date)

-   precipitation grid (*xmrg_xdms_mmddyyyyhhz*)

```{=html}
<!-- -->
```
-   ET grid (*sac_et_xdms_mmddyyyyhhz*)

-   surface runoff grid (*sac_surf_xdms_mmddyyyyhhz*)

-   subsurface runoff grid (*sac_subf_xdms_mmddyyyyhhz*)

-   routed flow grid (*sac_rutf_xdms_mmddyyyyhhz*)

-   SAC states grids \[mm\] (*sac_name_xdms_mmddyyyyhhz, where name =
    uzfwc, uztwc, lztwc, lzfpc, lzfsc,adimpc*)

-   routing states grids (*rutpix_depth_xdms_mmddyyyyhhz,
    rutpix_areac_xdms_mmddyyyyhhz*)

> **These grids show data for the dates and interval specified. XDMS
> grids only show values for the basins modeled. Other areas are filled
> with missing values (-9999).** WARNING!!: Using the \@V card option
> can output a lot of interesting spatial information, but it can also
> potentially create a large number of output grids and fill up your
> disk, particularly if you choose a long duration and a short time
> interval. In DHMS 1.0 the grids are not compressed and although output
> values are only written for the modeled area, the grids are padded
> with NODATA values for XDMS display. Just one uncompressed file can be
> close to 1 MB. Although XDMS cannot display compressed grids directly,
> if you want to output grids and save them for later use, a compression
> utility like gzip will reduce file sizes by a factor of several
> hundred.
>
> e.g. *\@V 06081993 15 06081993 23 1 1 0 0 0 0 0 0*

***\@D***, SNOW model input

-   ID

-   number of parameter grids

-   number of model parameters

-   number of model states

> e.g. *\@F snow 25 25 19*

***\@F***, runoff model input

-   ID

-   number of parameter grids

-   number of model parameters

-   number of model states

> e.g. *\@F sac 17 17 6*
>
> e.g. *\@F api 37 37 8*

***\@G***, routing model input

-   ID

-   number of parameter grids

-   number of model parameters

-   number of states.

> e.g. *\@G rutpix 7 3 2* Or @*G rutpix 9 3 2*

***\@I***, Basin Inputs

-   basin ID (maximum of 7 characters)

-   indicator telling whether basin is nested (0 or 1if nested
    ;otherwise non-nested where the number denotes the number of nested
    basins, including itself). Basins defined with an indicator greater
    than 0 will have a 1D xmrg file created.

> e.g. *\@I BLU18 0 Means nested basin*
>
> *e.g. \@I BLUO2* *2 Non-nested basin, the 2 indicates one sub-basin
> plus the parent basin (BLUO2)*

Each \@I card may contain entries specifying model parameter and state
information. There are three ways to define states and parameters:

\(1\) Specify a constant value for all cells in a basin. This is done by
entering a **positive value** for the parameter or state on the entry
lines described below. If positive, the specified value is used instead
of a grid file, even if an input grid file exists.

\(2\) Use values from an existing grid. To do this, a value of **-1** is
entered for the state or parameter of interest.

\(3\) Use values from an existing grid and scale them by a multiplier.
To do this, a **negative value** is entered for the parameter or state
of interest. The absolute value of this number is used as the grid
multiplier.

If any parameter value entries are missing, the entries default to -1.
If either option 2 or 3 is used, the program will exit if no grid exists
for the parameter or state of interest.

> **+ISRT**, initial routing states:

-   *AREAC,* Channel cross-sectional area of flow

-   *DEPTH*, Hillslope water depth

> e.g. *+ISRT 5.0 0.*
>
> **+ISRF**, initial SAC-SMA states \[fraction\]

-   *uztwc*, upper zone tension water contents

-   *uzfwc*, upper zone free water contents

-   l*ztwc*, lower zone tension water contents

-   *lzfsc*, lower zone free supplementary water contents

-   *lzfpc*, lower zone free primary water contents

-   *adimpc*, additional impervious area water contents

    **+ISRF**, initial CONT-API states

-   *API*, Antecedent Precipitation Index

-   *SMI,* Surface Moisture Index

-   *BFI,* Base Flow Index

-   *BFSC*, Base flow

-   *AEI*, Antecedent Evaporation Index

-   *ATI,* Antecedent Temperature Index

-   *FI,* Frost Index

    *FEI*, Frost Efficiency Index

> e.g. *+ISRF 0.25* *0.25* *0.25* *0.25* *0.25* *0.25*
>
> Or *+ISRF -1 -1 -1 -1 -1 -1* (use existing initial gridded states from
> a previous model run)
>
> **+ISSN**, initial SNOW-17 states

-   *we*, snow water equivalent (mm)

-   *neghs* *Initial heat deficit ( mm),*

-   *liqw,* *liquid water equivalent*

-   *tindex*, temperature index (DEGC)

-   *accmax*, maximum water-equivalent that has occurred since snow
    began (mm)

-   *sndpt,* snow depth (cm)

-   *sntmp,* snow cover temperature (DEGC)

-   *sb*, the last highest snow water equivalent before any snow fall
    (mm).

-   e.g. *+ISSN* *0 0 0 0 0 0*

> Or *+ISSN* *-1 -1 -1 -1 -1 -1* (use existing initial gridded states
> from a previous model run)

+IPSN Snow parameters

-   *ALAT*, Altitude

-   *SCF*, Snow fall correction factor

-   *MFMAX*, Maximum melt factor /\* input as mm/hr, but \'do_snow\'
    converts to mm/dthr \*/z

-   *MFMIN*, Minimum melt factor /\* input as mm/hr, but \'do_snow\'
    converts to mm/dthr \*/

-   *NMF*, maximum negative melt factor mm/DEG/dtHR

-   *UADJ*, The average wind function during rain-on-snow periods (mm \*
    mb-1 \* 6hr-1)

-   *SI*, areal water-equivalent above which 100 percent areal snow
    cover (mm)

-   *MBASE*, base temperature for non-rain melt factor units -DEGC

-   *PXTMP*, temperature that separates rain from snow units -DEGC

-   *PLWHC*, maximum amount of liquid-water held against gravity
    drainage -- decimal fraction

-   *TIPM*, antecedent snow temperature index parameter --range is 0.1
    to 1.0

-   *PGM*, daily ground melt /\* input as mm/day, but \'do_snow\'
    converts to mm/dthr \*/

-   *ELEV*, mean elevation

-   *LAEC* Snow --rain split Temperature, usually assumed to be Zero

-   Depletion Curve (11 values)

> **+IPRF**, API parameters (see table ...)

*Table11.* API parameters.

  ---- -------- --------------------------------------------------- --------
       Symbol   Description                                         

                **Basic API parameters**                            

  1    AIXW     Intercept of wet curve (1st quadrant)               map

  2    AIXD     Intercept of dry curve (1^st^ quadrant)             map

  3    CW       curvature of wet curve                              map

  4    CD       Curvature of dry curve                              map

  5    SMIX     Maximum value of SMIX                               map

  6    PEX      Potential evaporation that occurs on July 15^th^    unique
                max for week number option)                         

  7    PEN      Potential evaporation that occurs on Jan 15^th^ min unique
                for week number option)                             

  8    FRSX     Maximum percent runoff                              0.80

  9    EFC      Effective forest fraction                           

  10   PIMPV    Fraction of watershed that acts as an impervious    unique
                area                                                

  11   RIVA     Fraction of watershed covered by riparian area      unique

  12   RVAI     Antecedent Index, AI value above which riparian     unique
                vegetation losses can occur                         

  13   APIKS    Daily API recession when snow exists                0.93

  14   BFPK     Daily primary base flow recession rate              map

  15   BFIK     Daily Base flow Index recession                     map

  16   BFIM     Weighing factor for BFI                             map

  17   AICR     Critical AIF value AIF value below which Fg=1.0     map

  18   CG       Curvature constant for groundwater inflow           unique

                **Commonly used option 1 for ET**                   

  19   AEIX     Maximum allowed Antecedent Index of Evaporation     unique
                value                                               

  20   AEIN     Minimum allowed Antecedent Index of Evaporation     unique
                value                                               

  21   APIX     Maximum value that API contains                     10 in

  22   AEIK     Daily recession rate of AEI                         unique

  23   APIK     Daily recession of API                              unique

                **Option 0 for week number**                        

  24   CS       Seasonal curvature Exponent (used only for week     unique
                number option)                                      

  25   WKW      Week number when the wettest condition exhibits     unique

  26   WKD      Week number when the driest condition exhibits      unique

                **Option 2, for temperature**                       unique

  27   ATIR     Temperature weight factor                           unique

  28   ATIX     Maximum allowed ATI                                 unique

  29   ATIN     Minimum allowed ATI                                 unique

                **Option for frozen ground**                        

  30   CSOIL    Forest coefficient for bare ground                  unique

  31   CSNOW    Accounts for insulating effect of a snow cover      unique

  32   GHC      Effect of heat transfer from below the forest layer unique

  33   FICR     Value of forest index above which soil frost has no unique
                effect                                              

  34   CF       The EFI freezing coefficient controls the increase  unique
                in FEI during cold periods                          

  35   CP       The amount of rain that must freeze to fill soil    unique
                pores FEI during cold periods                       

  36   CT       The FEI thaw coeff.controls the decrease in FEI     unique
                when thaws of the soil occurs                       

  37   EFA      Effective forest area controls the portion of       unique
                watershed affected by frozen ground                 
  ---- -------- --------------------------------------------------- --------

> **+IPRF**, SAC parameters

-   *UZTWM,* maximum upper zone tension water

```{=html}
<!-- -->
```
-   *UZFWM,* maximum upper zone free water

-   *UZK,* fractional daily upper zone free water withdrawal rate

-   *PCTIM,* percent impervious area

-   *ADIMP,* additional impervious area in percent

-   *RIVA,* riparian vegetation area in percent

-   *ZPERC,* maximum percolation rate

-   *REXP,* exponent for the percolation equation

-   *LZTWM,* maximum lower zone tension water

-   *LZFSM,* maximum lower zone supplemental free water

-   *LZFPM,* maximum lower zone primary free water

-   *LZSK,* fractional daily supplemental withdrawal rate

-   *LZPK,* fractional daily primary withdrawal rate

-   *PFREE,* percent of percolated water which always goes directly to
    lower zone free water storages

-   *SIDE,* ratio of non-channel baseflow (deep recharge) to channel
    (visible) baseflow

-   *RSERV,* percent of lower zone free water which cannot be
    transferred to lower zone tension water

-   *PXADJ, an* *mapx* *adjustment factor* *(only accepts positive
    numbers)* *-- not required*

> e.g. *+IPRF -0.442 -0.99 -1.09 0.004 0. 0.028 -0.812 -1.05 -1.04 -0.87
> -1.04 -1.302 -1. -1.11 0. 0.3* *1.5*
>
> **+IPRT**, routing parameters

-   *SLOPC,* channel slope

-   ROUGC, channel roughness coefficient,

-   *BETAC,* channel shape parameter (exponent)

-   *ALPHC,* channel shape parameter (top width at depth = 1)

-   *SLOPH,* hillslope slope

-   *DS,* channel density (1/km)

-   *ROUGH* , hillslope roughness coefficient

-   *Q0CHN,* channel specific discharge for the rating curve method

-   *QMCHN,* exponent in discharge-cross sectional area relationship for
    rating curve method

> The following line specifies spatially constant values:
>
> e.g., *+IPRT 0.0005 0.05 1.2 2.0 0.002 1.5 0.35* *0.2 1.25*
>
> **+IPE**, monthly PE entry (mm/day) (from Jan to Dec)
>
> e.g. *+IPE 1.19 1.33 1.84 2.63 3.70 4.91 5.21 4.33 3.49 2.52 1.67
> 1.25*
>
> **+IPEA**, monthly PE adjustment entry (from Jan to Dec)
>
> e.g. *+IPEA 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0*
>
> **+IUH**, unit hydrograph entry: number of UHG ordinates followed by
> UHG values
>
> e.g. +IUH 7 1.5 4.5 9.5 15.5 12.0 6.5 2.0
>
> Note: If there is no IUH entry for a basin, then distributed channel
> routing is used as default

The ***\@I*** card and all its entries are repeated for each modeled
basin.

**\@STOP**, End of input deck entries

**5.3 Program Output: Text & Grid-Based**

Several types of outputs are created by running HL-RMS.

[Text]{.underline}

**basin.info**, contains basin information, parameters and states:

Basin ID, AREA, number of PIXELS

Average API Parameters

Average API Initial States

Average monthly PE

Average PE Adjustment

Average Routing Parameters

Average Routing Hill States

Average snow Parameters

Average snow States

2\) Time series:

(\* = five letter basin ID, all files are in OH datacard format)

***\*.hyd***, simulated hydrograph

***\*.pcp***, MAPX for local area

***\*.mapx***, MAPX time series for a parent basin that contains nested
basins; for basins that do not contain nested subbasins, no \*.mapx file
is created. The data is in the \*.pcp file.

[Grid-Based]{.underline}

3\) XMRG-like Binary Grids: These grids (parameters and states) are used
as input to HL-RMS. The parameter grids are read from the directory
specified by the \@P card. State grids are either read from or written
to the directory specified by the \@O card. In forecast mode state grids
are automatically created at 12Z for each day of the modeled period. In
calibration mode state grids are created for the last time step.

\* = runoff or routing model state name

\*.*mmddyyyyhh*

4\) Binary Grids (Optional):

These grids, also in XMRG-like binary format, are created by executing
HL-RMS. They are meant for viewing in XDMS. XDMS grids are requested on
the \@A and \@V cards of the input deck Grids requested on the \@V card
have names in the format *name_xdms.mmddyyyyhhz*.

Grids requested on the \@A card are not date and time stamped and have
the format *name_xdms.*

**The output files described in items 1-4 are created by executing
HL-RMS and saved in the directory specified on the \@O card.**

5\) Other:

***\*.xmrg* (calibration mode only)**, a binary file containing rainfall
data only for those grids within the selected basin. \* represents a
basin's ID. The new xmrg data is only created for basins with a non-zero
entry for the \@I card (non-nested). The file is created to speed up
calibration runs and thus is not used in forecast mode. It duplicates
data in the hourly XMRG files produced by StageIII/MPE. For lack of a
better term, we\'ve been calling this a \'1d XMRG\' file even though it
has a totally different file format from the hourly XMRG files.

Two WARNINGS when using 1D XMRG files: (1) Do not run multiple basins
with a positive value on the \@I card in the same deck and create
multiple 1D XMRG files in the same run. This creates the potential for
erroneous reading and writing of data to the '1D XMRG files. (2) Only
reuse a 1D XMRG file as input to a subsequent run if you are simulating
the exact same basin or set of nested basins used to create the file. In
calibration mode, the program automatically looks for a 1D XMRG file
based on the name of the outlet defined with a non-zero entry for the
\@I card.

New data will automatically be appended to the file if the end time of
simulation is later than the end time defined in an existing 1d xmrg
file. For other periods, the original xmrg data is read. If any of the
modeled basins does not have a 1d xmrg data, the program will read the
original xmrg data. The program does not read mixed xmrg data; it either
reads original xmrg files or 1d-xmrg files. Since the program may append
new data to the 1d xmrg files, users need to make sure the file and
directory permissions to the \*.xrmg files are set as writable for all
model users. You can use use the executable *chk_1dxmrg* to get a
summary of information related to the 1d xmrg data file. Chk_1dxrmg is
executed using the following syntax:

*chk_1dxmrg* ATIT2.xmrg

In this example, ATIT2.xrmg is located in the same directory as the
executable. Alternatively, the program will accept a full file path name

The following is an example of the information *chk_1dxrmg* returns.

**This 1D xmrg binary file contains data**

**between 841512 (1/1/1996 0:00) to 902879 (12/31/2002 23:00) for 60
grids.**

**It contains total 61367 hours of data.**

**XMRGTOASCLX**

***xmrgtoasclx*** is a stand-alone utility used to convert binary
xmrg-like grids to their ascii representation. This utility is useful
for viewing parameter, state and xmrg data created by executing HL-RMS.
Executing xmrgtoasclx with the -merge option creates an ascii and binary
version of two merged xmrg-like binary grids. Executing xmrgtoasclx
without the --merge option requires 3 arguments, with the merge option
it needs 4 in addition to the flag --merge.

**Creating an ascii version of a xmrg-like binary grid**

The syntax for executing *xmrgtoasclx* to create an ascii version of the
xmrg-like grid is:

***xmrgtoasclx*** *grid.file1* output.file \[hrap/ster\],

where grid.file1 is the name of a binary grid output from HL-RMS,
output.file (with the extension .asc) is the name of the ascii file
representing the xmrg-like grid. This ascii file has a header defining
the portion of the grid represented in the file. The coordinates used to
define x and y coordinates are determined by choosing hrap (HRAP) or
ster (Polar Sterographic).

**Merging xmrg-like binary grids**

The syntax for executing *xmrgtoasclx* to merge xmrg-like grids is:

***xmrgtoasclx*** **--merge** *grid.file1* *grid.file2* output.file
\[hrap/ster\]

where *grid.file1* and *grid.file2*are the names of two binary grids
output from hlrms, output.file is the name of the binary and ascii files
containing the merged grids, and hrap or ster are used to define the
coordinate system. Running xmrgtoasclx with the --merge option creates
an ascii text file named output.file. with the extension .asc. In
addition to the ascii file, the --merge option creates an xmrg-like
binary file named output.file with the extension .bin. This binary file
is in a format HL-RMS can recognize as input. When merging grids
grid.file2 is superimposed onto grid1 (grid2 has precedence).

The following example takes the upper zone tension water binary state
grids for wtto2 (*sac_uztwc.0630200323z.wtto2)* and knso2
*(sac_uztwc.0630200323z.knso2)* and creates the ascii file
merge.output.asc and a binary version named merge.output.bin.

***xmrgtoasclx*** **--merge** *sac_uztwc.0630200323z.wtto2*
*sac_uztwc.0630200323z.knso2* merge.output hrap

Future runs of xmrgtoasclx for the purpose of merging uztwc grids can
use the merge.output.bin file as one of the input grids and join it with
the sac_uztwc.0630200323z for another basin (e.g.
sac_uztwc.0630200323z.eldo2).

**5.5** **Known limitations and bugs**

> 1). Length of each line in input deck should not exceed 128 characters
>
> 2). Basin name in input deck should not exceed 8 characters
>
> 3). Maximum number of selected pixels for all basins should not exceed
> 50000
>
> 4). Maximum number of columns in modeling domain should not exceed
> 7000
>
> 5). Maximum number of basins/subbasins should not exceed 500
>
> 6). Default maximum length of channel routing subreach is 2000m, and
> maximum number of subreaches in one pixel should not exceed 4.
>
> 7). Cumulative flow comparison after the simulation incorrect for
> parent basins of nested basins.
>
> 8\) New data can be appended to 1D xmrg files, they cannot be
> inserted.

1.  
2.  
3.  

-   
-   
-   

```{=html}
<!-- -->
```
-   
-   
-   
-   
-   

```{=html}
<!-- -->
```
-   
-   
-   
-   

**6. PARAMETER ESTIMATION AND CUSTOMIZATION**

6.1 The connectivity file

6.1.1. Adding outlets to the connectivity file

The connectivity file contains 9 lines of general header information,
followed by a list of basin outlets defined for the model, followed by
an ordered list of pixels covering the entire modeling domain. The top
portion of an RMS connectivity file is shown here.

> *TEXT_SEQ*
>
> *NUM_HEADER_REC 13 24467*
>
> *COL 1060*
>
> *ROW 821*
>
> *LLX 1*
>
> *LLY 1*
>
> *URX 1060*
>
> *URY 821*
>
> *DATA_HRAP*
>
> *TEST1 1 5 5.0000 375 419*
>
> *TEST2 1 9 5.0000 375 418*
>
> *7099970 1 2232 5.6344 409 390*
>
> *7124000 1 4879 6.4376 439 386*
>
> *7130500 1 5370 6.6532 445 386*
>
> *7139500 1 10177 6.7819 507 381*
>
> *7146500 1 16856 6.6443 572 369*
>
> *7164500 1 21425 6.5671 599 348*
>
> *ELDO2 1 22439 6.1420 626 347*
>
> *7249455 1 23316 6.4687 637 334*
>
> *7263450 1 24466 6.4589 686 327*
>
> *BLKO2 1 17407 6.2633 568 362*
>
> *CBNK1 1 16559 6.2633 560 370*
>
> *0 1 Rv 1 376 402 6.4589 377 419*
>
> *1 5 Rv 1 375 401 6.4589 376 420*
>
> *2 5 Rv 1 375 402 6.4589 376 419*
>
> *3 5 Rv 1 374 401 6.4589 375 420*
>
> *4 9 Rv 1 375 403 6.4589 376 418*
>
> *5 9 Rv 1 374 402 6.4589 375 419*
>
> *6 12 Rv 1 369 408 6.4589 370 413*
>
> *7 12 Rv 1 369 406 6.4589 370 415*
>
> *8 13 Rv 1 375 404 6.4589 376 417*
>
> *. . .*
>
> *. . .*
>
> *. . .*

Line 2: Lists the number of outlets identified in this file (13) and the
total number of cells listed in the file (24467)

Lines 3, 4: Number of columns and rows in the input grids.

Lines 5, 6: Lower-left X and Y coordinates.

Lines 7, 8: Upper-right X and Y coordinates.

Lines 10-22: Basin outlet specifications. Information included in each
line:

> Col. 1: ASCII identifier. Must be the same as identifier used in
> HL-RMS Input Deck on the \@I card (See HL-RMS User's Manual).
>
> Col. 2: ignore
>
> Col. 3: Cell line number of this outlet
>
> Col. 4: Representative area (mi^2^) of cells in this basin. Computed
> as the USGS area divided by the number of HRAP cells in the basin.
> (program does not currently use this value)
>
> Col. 5: hrapx coordinate of outlet cell
>
> Col. 6: hrapy coordinate of outlet cell

Lines 23-24489: Cell List

Col. 1: Cell line number

Col. 2: Cell line number of the next downstream cell

Col. 3: ignore

Col. 4: ignore

Cols. 5-6: Local reference coordinates used internally by the program
(ignore)

Col. 7: Area represented by the cell in mi^2^

Cols. 8-9: Globally referenced Hrapx and Hrapy (the true hrapx, hrapy
coordinates)

To add a new outlet point, a new basin outlet specification line must be
added (e.g. lines 10 -- 22 in the example) and the value defining the
number of outlets in line 2 (13 in this example) must be incremented
by 1. As defined above, the information required for the added line
includes 6 values: a basin identifier of eight characters or less, a
dummy value of 1, **the cell line number in the connectivity file
corresponding to the basin outlet**, a representative cell area, and the
HRAP x and y coordinates of the outlet cell for this point. These values
should all be entered on one line in free format, separated by at least
one space.

To determine the cell line number corresponding to a new outlet point,
do a text string search on the connectivity file for the true hrapx and
hrapy coordinates of the point you are adding (separated by a single
space). For example, search for "568 362" to identify the outlet line
number for BLKO2 in the above example. The search should find "568 362"
in Columns 8-9 somewhere in the Cell List (lines 23-24489). The value in
Column 1 of the cell line number is the third number in your basin
specification line (e.g. 17407 for BLKO2 in the example). The fourth
number, a representative cell area, can be taken from column 7 of the
cell line number found in your search.

**6.1.2 Adjusting cell areas in the connectivity file to reflect USGS
defined drainage areas**

The HL-RMS algorithms use the drainage areas defined for each cell in
the connectivity file (cell list lines, Column 7) to convert
rainfall-runoff depths to volumes. The program sums the individual cell
areas to get basin area estimates. When the basic connectivity files are
first generated, the drainage areas for each cell are computed based on
the definition of the HRAP coordinate system. Cell area estimates vary
depending on the latitude of the cell center point. Because of the
coarse resolution of the HRAP cell network, it is sometimes possible
that the total area estimate for basins from the raw connectivity file
can be significantly different from the USGS estimate of the drainage
area (on the order of 10% or more in some cases, particularly for basins
smaller than 1000 km^2^) (see Reed (2003) for more details). The reason
for this is not just that curves in the basin boundaries cannot be
precisely captured by a fixed origin, coarse resolution grid, but also
that a single HRAP cell may contain the confluence of multiple stream
tributaries. If one of these tributaries is downstream of the gage and
another upstream, then it is not possible to select an HRAP cell in the
cell connectivity network that includes one tributary but not the other.

For situations when significant discrepancies between the USGS drainage
area and the drainage area derived from the raw connectivity file exist,
a separate utility program called *cellareas* is provided with DHMS 1.0
that will create adjust the cell areas in the connectivity file. In this
initial release, the *cellareas* utility is a rather inflexible program
and uses an input file with strict formatting requirements; however, it
serves its purpose. Hopefully, the basin area adjustment functionality
can be more smoothly incorporated into the main HL-RMS program in future
releases. The syntax for running the program is simply:

*cellareas* \<control_file_name\>

The control file must contain the following lines with no extra
characters or comments:

> Line 1: Number of basins for which area adjustment is to be made (n)
>
> Line 2: Existing control file name
>
> Line 3: New control file name (the program adjusts areas for selected
> basins and copies the rest of the information from the original
> control file into the new control file)
>
> Lines 4 through n+3: A basin identifier (must be from 5 to 8
> characters in length in this initial version) and the USGS area for
> the basin **in km2**.
>
> Example control file contents:
>
> 2
>
> wgrfc_var.con
>
> wgrfc_var.con.adjust
>
> ATIT2 831.34
>
> KNLT2 896.1
>
> \*\* This example assumes *cellareas* is executed from the directory
> with the existing connectivity file. Alternatively, lines 2 and 3 can
> be the entire file path, so *cellareas* can be executed from any
> directory \*\*
>
> IMPORTANT NOTE: For basins containing subbasins, only the local area
> should be entered into the control file if the subbasins are also
> included in the same control file. In other words, rather than
> entering the total area (km2) reported by the USGS for a large basin
> with nested/interior forecast points, the sum of all nested subbasins
> should be subtracted from the total basin area and that value should
> be entered in the *cellareas* control file. (Yes, *cellareas* should
> be able to figure this out automatically, but it doesn't yet.) If your
> control file includes a parent basin but not the subbasin, then the
> areas for cells in the subbasin will be overwritten. If you want the
> subbasin area to be overwritten, you should enter the total area for
> the parent basin. If you add a new basin to the control file that is a
> subbasin of an existing parent basin, the area of the existing parent
> basin in the control file should be changed to reflect only the local
> area. It is a good idea to keep all defined basins in one control
> file.

6.2 Analyze flow measurement data to determine routing parameters

6.2.1 Overview

The steps to estimate at-a-station routing parameters from flow
measurement data could be done manually with a spreadsheet or similar
tools. However, because the procedure involves many steps, we offer an
Excel Spreadsheet Add-in written with Visual Basic for Applications
(VBA) to simplify this analysis process. The Macros have not been tested
on all versions of Excel. They were originally developed using Excel
2000 and most recently used on Excel 2002. Using the most recent version
of Excel is recommended.

In this section, text describing required user actions is labeled with
the word "Step" to distinguish it from additional explanatory text. Some
of the steps are optional as indicated in the explanation.

# 6.2.2 Download Flow Measurement Data

> **Step 1:** Go to http://water.usgs.gov/nwis
>
> **Step 2:** From the main page: Click Surface Water. Click
> Measurements. At this point there are many search options to identify
> the stations you are interested in. Choose whichever option you
> prefer. The final product that you need to download is a Text file in
> **Tab-Separated** format. Also, the date format is YYYY-MM-DD. The top
> of the file that you obtain should look something like the following
> (Note: Data lines are cut-off on this example. Actual data lines
> contain many more columns.). Although it is possible to download data
> for multiple stations to a single file, the VBA Macros will only work
> if a separate data file is downloaded for each station.

*\#*

*\# Surface water measurements*

*\#*

*\# Further descriptions of the columns and codes used can be found at:*

*\# http://waterdata.usgs.gov/nwis/help?output_formats_help#streamflow*

*\#*

*\# Stations in this file include:*

*\# USGS 07337000 Red River at Index, AR*

*\#*

*\#*

*site_no agency_cd measurement_nu measurement_dt party_nm*

*15s 5s 5s 19d 12s 12s 12s 12s 12s 12s 12s*

*07337000 USGS 62 1952-07-11 k/m 5.40 1.03 0.43 1.68*

*07337000 USGS 63 1952-07-23 w 5.80 1.33 0.72 1.70*

*07337000 USGS 64 1952-08-06 w 35.0 38.5 0.79 2.07*

*07337000 USGS 65 1952-08-19 w 9.50 2.96 0.39 1.70*

*07337000 USGS 66 1952-09-03 g 7.60 2.14 0.34 1.69*

[6.2.3 SpreadSheet Instructions]{.underline}

As currently written, the VBA macros rely on a specific Workbook
organization. Sheets (Worksheets or Charts) with specific names are
created. A user may add his or her own Worksheets or Charts and the
order of the Sheets may be changed, but **do not change any of the Chart
or Worksheet names that are used by the programs!**

A significant amount of introductory material describing the Worksheets
created by the rmsmaster.xla Add-in is included here. You may want to
skip to instruction **Step 3** and refer back to the Worksheet
descriptions provided here as needed.

[Default Worksheet Names and Explanation:]{.underline}

*S_SelectData*: Selected columns of data are copied to this Sheet from
the raw data file and sorted by Cross-section area (Area (m2)). Columns
with data in metric units are added to this sheet by the "Process Data"
routines described below.

*S_AvgdQAData*: Typically, there are many more observations at low flows
than at high flows. The "Process Data" routines average of observations
with similar magnitudes to prevent excessive weighting at the low end of
the Q vs. A curve in regression calculations. These averaged values are
stored in this Sheet. This Sheet also contains numerous columns of
predicted Q ("pred_Q") as a function of A for different parameter sets
(Defined in Columns A and B), and columns containing the differences
between predicted and observed values. Each of the predicted Q columns
is computed based on intercept and slope parameters specified in Column
B. For Q = *a*A\^*b*, *a* = exp(intercept) and *b* = slope. Several
different types of regression fits are computed by default for
consideration.

In the two ln\[Q\]cases, parameters (*a, b("slope")*) are derived by
minimizing either the "squared error" differences or the "absolute
error" differences between predicted and observed ln\[Q\]. Both
intercept (int) and slope are optimized in these cases. The labels for
these cases are ln\[Q\] (squared error) and ln\[Q\] (absolute error). A
non-linear optimization fit is also done in arithmetic space. Here
residuals are computed based directly on the difference between
predicted and observed Q values (rather than the log of the values).
These two cases (one minimizing the squared error and one minimizing the
absolute error) are labeled "Q (squared error)" and "Q (absolute
error)". In these four cases, parameter optimization is done
automatically using the Excel solver (see steps below). There are also
two slots set up to allow for manual optimization (labeled "Manual Q
Squared Error" and "Manual Q Absolute Error")

The macros compute several different types of regression fits for the
user because it is difficult to say with our current experience which
fitting procedure is the best one to use. In fact, so far, we have found
that a manual option for specifying one parameter (say slope in log
space) and then using the Excel Solver manually (explained more below)
to optimize the other parameter produces the most satisfactory results
based on our desired emphasis on high flow modeling in flood
forecasting.

*S_AvgdABData*: Same setup as the AvgdQAData Sheet except the variable
relationship considered is cross-section area (A) as a function of width
(B) as opposed to Q vs. A. In this case, the parameters of interest (
and ) are both computed in Column D for various scenarios. and in
B=H\^are computed as a function of the intercept and slope terms in
Column B. Column B terms are optimized using the Solver.

*S_Control*: Contains user input describing the basin or derived from
other Sheets.

*S_PredictedQA*: Contains Q and A data computed using the channel shape
method.

[Default Chart Names and Explanations :]{.underline}

C_QfA: Observed data of Q vs A plus additional fitted lines; Data from
S_AvgdQAData are displayed. Notation stands for "Q as a function of A."

*C_Ln(QfA):* Plots of Ln(Q) vs. Ln(A) (observed data and fitted lines);
Data from S_AvgdQAData

*C_Ln(AfB):* Plots of Ln(A) vs. Ln(B) (observed data and fitted lines)
using data from S_AvgdABData

*C_AfB:* Plots of A vs B (observed data and fitted lines) using data
from S_AvgdABData

*C_n Graph:* Estimated Manning's n vs. Q

[Processing Steps:]{.underline}

> **Step 3:** You will need to load the "Rmsmaster" (provided by HL) and
> the "Solver" Add-ins. To do this, put the file "rmsmaster.xla"
> anywhere on your PC. With a blank Worksheet active, Select **Tools --
> Add-ins** and then click the "Browse. . ." button to locate the
> "Rmsmaster" Add-in. Place a check mark next to this Add-in. For the
> Solver, if the "Solver Add-in" is not listed as an option in your
> setup, you probably need to do a custom installation of Microsoft
> Excel to get the correct file off from your original CD-ROM. Although
> you can benefit from rmsmaster.xla without the Solver, use of the
> Solver is recommended.
>
> **Step 4:** The first step is to load the USGS measurements file into
> Excel. This can be done using standard Excel functions. Select **File
> \--\> Open** (list all files \*.\*) and select your measurements file.
> The "Text Import Wizard" should come up (Figure 3).
>
> \- Modify the "Start Import Row" to be the first non-comment row
> (comment rows start with #). This is the row starting with the word
> "site_no".
>
> \- Pick the "Delimited" option and click Next. Use of the default
> "Tab" delimiters is correct. Click Next again and then Finish.
>
> **Step 5**: With the data sheet that you just opened active, click
> **Ctl-Shift-L** and a new menu called "RMS Parameters" will appear.
> (**Ctl-Shift-U** will unload this menu.)
>
> **Step 6**: Making sure that your raw data sheet is the active Sheet,
> Select the menu item: **RMS Parameters \--\> Process Data**. You will
> be prompted to enter a representative slope value for the basin
> outlet. If you plan to use the rating curve routing parameter method
> you will not need a slope estimate. If you don't know the slope, you
> can always guess and enter the value later. If you click Cancel, the
> value will default to 0.002. The slope is used for calculating
> Manning's n estimates. This step creates the Charts and Worksheets
> described above and populates them with data.
>
> ![](media/image3.wmf)

### Figure 3. Text Import Wizard

> **Step 7:** Populate the Charts with observed data by selecting any
> chart (e.g. C_QfA) and choosing the menu item **Add/Subtract Series
> \--\> Plot Observed**
>
> **Step 8:** Compute default regression fits. Make the Worksheet
> S_AvgdQAData active and select **RMS Parameters \--\> Run Solver All**

This should only take a few seconds; however, if the program appears to
finish instantaneously there might be something wrong. Some messages
like "Trial Solution" should flash by at the bottom of the Excel Window.
The macro runs the Solver many times to get the optimal fits for
parameters for the different regression cases on Sheets S_AvgdQAData and
S_AvgdABData.

##### Estimate outlet Parameters for the "Channel Shape Method" or "Rating Curve Method"

> At this point you can examine results and identify model parameters.
> There are two methods currently available in RMS for defining channel
> parameters. One method is referred to as the "Channel Shape Method"
> for which estimates of and in the relationship B=H\^are required. H is
> depth and B is width. The second method is the "Rating Curve Method"
> for which estimates of *a* and *b* in the relationship Q = *a*A\^*b*
> are required. In general, it is easier to infer parameters for the
> Rating Curve Method than the Channel Shape Method from the flow
> measurement data. For the DMIP basins our simulation results have
> shown little difference in the hydrographs simulated with the two
> different methods. The expected advantage of the Channel Shape Method
> is in basins where there is significant variability in channel slopes
> because this method accounts for channel slope. For more description
> of these two methods see Koren et al. (2003) or Reed et al. (2002). We
> have not really worked enough with basins of this type to prove or
> disprove this advantage.
>
> The menu "Add/Subtract Series" is available when a Chart Sheet is
> active. Items under this menu will add a specified series to the graph
> if it is not there or remove the graph if it is there. The item
> "Remove All Series" will remove all series from the graphs except the
> observed data. Selecting an item under the "Add/Subtract Series" menu
> simultaneously updates all charts except C_n Graph, which is only
> affected by the "Plot Observed" option.
>
> [Channel Shape Method:]{.underline}
>
> **Step 9:** Look at \"n Graph\" Chart and pick a representative
> Manning\'s n value for high flows. Enter the Manning\'s n value you
> select in the \"S_Control\" Sheet B8. You may want to adjust the
> y-axis scale when looking at this Chart (e.g. set the y-max value to
> 0.1). Manning's *n* values tend to approach a constant value as flows
> get bigger although the scatter in the data tends to be large. There
> is much more scatter in these estimates at low flows but we are
> interested in values for higher flows so this is not a major concern.
> Don't worry too much about getting an exact value as this parameter
> can be adjusted later.
>
> **Step 10:** Examine the \"C_Ln(AfB)\" (area as a function of width)
> and \"C_AfB" Charts. Look at the default regression line fits. For
> example, selecting the **Add/Subtract Series \--\> ln\[Q\] (squared
> error)** {Note that the series and menu item labels here are all
> ln\[Q\] or Q when they should be ln\[A\] or A. The data are correct,
> just mislabeled -- this can be fixed in a later version.} item will
> add the regression fit that minimizes the squared error differences
> between predicted and observed ln\[A\]. Predicted values are based on
> the intercept (B3) and line slope (B4) in the worksheet S_AvgdABData.
> The corresponding and values are in cells D3 and D4 for this case.
>
> The simple channel shape model cannot fit Area-Width data for all flow
> ranges, particularly since the flow characteristics are often markedly
> different when the flow exceeds bankfull conditions. When fitting
> values of and parameters in the single parabola channel shape model to
> data, locations where a single large flow has been measured can
> significantly affect the values of these parameters. We are currently
> planning to research a model with separate relationships for
> in-channel and out of channel flow but this has not yet been
> implemented.
>
> **Since we are more concerned with the flow velocity at high flows, we
> have tended to put more weight on the fit of regression lines at
> higher width and area values for initial HL-RMS testing.** To meet
> this criterion, we have been using a fairly subjective approach and we
> sometimes find it beneficial to using the automatically fitted lines
> for reference while also attempting semi-manual fits.
>
> **Step 11**: A semi-manual approach: For example, looking at the
> optimized fits to the Ln(AfB) Chart, it is sometimes true that the
> fits in log space give much weight to low flow values while the fits
> in arithmetic space may ignore the low flow values a bit too much. One
> thing that can be done is to compare the fitted slopes from the log
> and arithmetic cases in cells (S_AvgdABData) B8 and B16 (for example),
> and pick a slope somewhere in between these values, enter this value
> into cell B24, and then manually run the Excel solver to find the
> optimal intercept corresponding to that slope. This type of fit may
> provide a reasonable representation of high flows while not completely
> ignoring middle and low flows. Figure 4 shows an example of a
> subjectively fit line. To manually run the Excel solver, run **Tools
> \--\> Solver** to optimize the intercept corresponding to a manually
> selected slope. Figure 5 shows an example Solver dialog. In this
> example the solver is used to minimize the residual values by changing
> the intercept value (S_AvgdABData!B18 by changing Cell B19).
>
> The results from manual optimizations can also be plotted easily in
> the Charts using the option **Add/Subtract Series \--\> Q (manual,
> absolute error)** (for example).
>
> NOTE again that the values of and needed for HL-RMS are computed in
> column D of S_AvgdABData: DO NOT CHANGE THE FORMULAS IN COLUMN D.

![](media/image4.wmf)

Figure 4. Example of a subjective fit to ln\[A\] vs. ln\[Width(m)\] for
TALO2 in ABRFC ( = 6.46 and = 1.66)

![](media/image5.png){width="5.40625in" height="2.96875in"}

#### Figure 5. Example Solver Dialog

> **Step 12:** Choose your best set of and parameters and enter the
> values in S_Control!B9 and S_Control!B10. Keep in mind that this is a
> very subjective procedure. I wouldn't agonize much over the choice of
> these values at this point since they can always be changed and may
> need adjustment when the simulation model is run.
>
> **Step 13:** Now you can plot the Q-A relationship predicted by your
> selected shape parameters and Manning's n value. Make the C_QfA Chart
> active and select **Add/Subtract Series \--\> Plot Channel Shape
> Method QA**. The result is a dashed line on the Q vs. A plot. You can
> now adjust your choice of Manning's *n* in cell B8 on the control
> sheet to try to get a better match to the Q-A curve.
>
> **Step 14:** The genpar.exe program used to generate gridded parameter
> values (described in Section 2.3) requires one more piece of
> information: a representative cross section area at the outlet. We
> usually select a value corresponding to relatively high flows that
> also corresponds to the selected Manning's n value. To get this value,
> go to the "S_SelectData" Worksheet and pick a value from Column G.
> Manning's n values are in Column n. Don't agonize too much over the
> choice of this value.
>
> You now have all of the information you need to generate custom
> parameter grids using the Channel Shape Method: , , n, slope, and A~o~
> (representative x-section area at the outlet).

IF YOU HAVEN'T DONE SO, IT IS A GOOD IDEA TO SAVE YOUR WORK USING THE
**File \--\> Save As Microsoft Excel Workbook** option.

> [Rating Curve Method:]{.underline}
>
> **Step 15:** Examine the \"C_Ln(QfA)\" and \"C_QfA\" Charts. Look at
> the default regression line fits. For example, selecting the
> **Add/Subtract Series \--\> ln\[Q\] (squared error)** item will add
> the regression fit that minimizes the squared error differences
> between predicted and observed ln\[Q\]. Predicted values are based on
> the intercept (B3) and line slope (B4) in the worksheet S_AvgdQAData.
> The corresponding "a" value in the Q = aA\^b relationship is in cell
> D3 for this case and the "b" value is equal to the line slope (cell
> B4).
>
> The automatic regression fits tend to be more satisfactory for Q-A
> relationships than for A-B relationships; however, taking the
> semi-manual approach described in S11 seems reasonable for the Q-A fit
> also. As with the A-B fits, the optimized fits in log space give more
> weight to lower flows and the optimized fits in arithmetic space give
> much less weight to lower flows. An intermediate weighting can be
> achieved with the semi-manual fit: (1) compare the fitted slopes from
> the log and arithmetic cases in cells (S_AvgdQAData) B4 and B12 (for
> example), (2) pick a slope somewhere in between these values, (3)
> enter this value into cell B20, and (4) then manually run the Excel
> solver to find the optimal intercept corresponding to that slope. To
> manually run the Excel solver, run **Tools \--\> Solver** to optimize
> the intercept corresponding to a manually selected slope. Figure 5
> shows an example Solver dialog. In the Figure 5 example the solver is
> used to minimize the residual values by changing the intercept value
> (S_AvgdABData!B18 by changing Cell B19).
>
> The results from manual optimizations can also be plotted easily in
> the Charts using the option **Add/Subtract Series \--\> Q (manual,
> squared error)** (for example).

Figure 6 shows example results for a Q-A fitted relationship. In this
case, date information is also displayed for selected points. Looking at
dates in the raw data file may be useful if there has been a distinct
change in the hydraulic behavior at a station. Seeing distinct groupings
of points. At this point no tools have yet been developed to assist with
this step.

![](media/image6.wmf){width="4.916666666666667in"
height="2.826388888888889in"}Figure 6. Example of a subjective fit to Q
vs. A for TALO2 in ABRFC (a = 0.16, b = 1.283)

> You can now use your *a* and *b* estimates to generate routing
> parameter grids as described in the next section. Again, values of *a*
> are shown in S_AvgdQAData Column D and b values are the "slopes" in
> Column B.

**6.3. Generate customized routing parameter grids**

**Overview**

The genpar program is used to update values in existing HL-RMS parameter
grids. The program assumes that all required parameter grid files
already exist; however, the values in these grids may all be negative or
NODATA.

Genpar can be used to update only one type of parameter at a time.
Multiple runs of genpar are required to update multiple parameters.
However, values in multiple basins can be updated in one run. The input
deck that specifies the basins for which parameters will be updated is
very similar to that used for the main HL-RMS program. The file
genpar.card provided is an example input deck used to generate routing
parameter grids.

**Inputs**

Values in the following parameter grids can be updated using genpar:

> **Table 2. Routing parameter grids.**

  --------- ------------------------ ---------------------------------------
  **No.**   **Grid Name**            **Description**

  1         rutpix_SLOPC             channel slope

  2         rutpix_ROUGC             channel roughness (Manning's n)

  3         rutpix_BETAC             channel shape parameter (b in B =
                                     aH^b^)

  4         rutpix_ALPHC             channel width parameter (a in B =
                                     aH^b^)

  5         rutpix_SLOPH             hillslope slope

  6         rutpix_DS                drainage density

  7         rutpix_ROUGH             hillslope roughness

  8         rutpix_Q0CHN             q~0,c~ in Q = q~0,c~A^mc^

  9         rutpix_QMCHN             m~c~ in Q = q~0,c~A^mc^
  --------- ------------------------ ---------------------------------------

The first seven grids are required to run HL-RMS using the channel shape
method. Only the last two grids are required for the rating curve
method.

The genpar functionality for populating grids with parameter values
depends on the type of parameter selected for a given run. Currently
there are 5 different parameter assignment algorithms implemented in
genpar. These algorithms are discussed briefly here with more
explanation available in Koren et al. (2003).

1.  Constant value assignment. This method assigns a constant value to
    all cells in a basin. Different constants can be assigned for
    different basins. Constant value assignment is possible for
    rutpix_BETAC, rutpix_SLOPH, rutpix_DS, rutpix_ROUGH, and
    rutpix_QMCHN. In our applications, we have used constant values for
    all of these parameters except rutpix_SLOPH for which values can
    easily be computed from the DEM. A pre-computed grid of rutpix_SLOPH
    is delivered with the HL-RMS software. Rutpix_DS and rutpix_ROUGH
    grids are initially assigned default values of 2.5 and 0.15. Default
    values for BETAC and QMCHN in the grids provided are 1 and 1.333
    respectively; however, these values should be overwritten using
    locally derived values.

2.  Rutpix_SLOPC. Default grids of channel slope are pre-computed at HL
    and provided to each RFC. In the grids delivered, there are
    inaccuracies in computing channel slopes, particularly for low order
    channel cells. Two reasons for inaccuracies are (1) the coarse
    resolution of the input DEM (400-m resolution in this case) and (2)
    the difficulty in precisely defining where lower order channels
    initiate. Genpar can be used to make adjustments to slopes for low
    order channels based on an empirical relationship (Strahler, 1964)
    between hillslope slopes and channel slopes. In the genpar routine,
    the relationship is only applied if the value predicted by the
    relationship is significantly different from the value computed from
    the DEM.

3.  Rutpix_ROUGC. Spatially distributed values of channel roughness are
    estimated using an empirical relationship that is a function of
    drainage area, slope, and a representative channel roughness (n~o~)
    at the outlet:

$n_{i} = n_{o}S^{0\text{.}\text{272}}F^{- 0\text{.}\text{00011}}$ (Tokar
and Johnson, 1995)

no and the two constants 0.272 and -0.00011 are specified on the
**+IPRG** card described below.

4.  Rutpix_ALPHC values are estimated as a function of drainage area,
    slope, and ROUGC.

5.  Rutpix_Q0CHN values are estimated as a function of drainage area.

**How to run**

> Execution syntax is simply:
>
> genpar \<input_deck_file\>

**Alternatively, instead of the genpar program,** **use** **HL-RMS to
generate the routing parameters. In the HL-RMS case,** **modify the
input card:** **the \@G option and** **the** **\@IPRG option as
described below. Then,** **run HL-RMS** **(orms)** **with the modified
input.**

> orms \<input_deck_file\>

**If parameter generation is specified,** **HL-RMS will skip all other
calculation and perform parameter generation. The generated parameter
map will be saved** **in** **to a temp.gz file.** **The output file is
placed** **in the** **output directory specified** **by** **\@O.**
**Note that parameters of multiple basins including nested are
handled.** **However, as in the case of genapr, only one parameter map
is generated** **per one run.**

**Input Deck Specifications**

As shown in the example genpar.card file, the input deck cards that must
be specified to run genpar include \@O, \@P, \@Q, \@G, and \@I. These
cards are described in Section 5.2. The output file specified on the \@O
card is not actually used by the program but a valid directory must be
specified in order for the program to run properly.

The first entry on \@G card must be 7 (channel shape method) to generate
any of the grids 1-7 in Table 2. The first entry should be 9 to generate
either parameters 8 or 9, i.e.

> \@G rutpix 7 3 2 {for parameters 1 -- 7, channel shape method}
>
> \@G rutpix 9 3 2 {for parameter 8 or 9, for the rating curve method}

Genpar will support the use of multiple \@I cards (multiple basins) for
a given run. Only one +IPRG card should be specified for each \@I card.

**The +IPRG card**: The **+IPRG** line is used to specify parameter
information. The contents of the **+IPRG** card are:

> **+IPRG** *\<n_values\> \<parameter #\> \<variable_1, variable_2,\...,
> variable\_(n_value-2)\>*
>
> *\<n_values\>* is a number of entries in the input line including the
> \<n_values\> item.
>
> *\<parameter #\>* is the number used to refer to a parameter (see
> Table 2)
>
> *\<variable_i\>* input variables required to generate selected grid
> type
>
> Example +IPRG cards:
>
> **+IPRG** 3 *3 \<value\>*
>
> Generates a constant value for rutpix_BETAC where \<value\> is the
> BETAC value
>
> **+IPRG** 5 2 *n~o~* 0.272 -0.00011
>
> Generates distributed *ROUGC* parameters using the user defined n~o~
> value (a representative roughness coefficient at outlet) and two
> constants in an empirical relationship. Note that these constants are
> not counted in the \<n_values\> entry which is 2 for this case.
>
> **+IPRG** 5 4 *Q~o~ A~o~ ~o~*
>
> Generates distributed ALPHC grid. Inputs are a 'representative'
> discharge (Qo) (This value is no longer used so really any value is
> o.k., but some value must be present), cross-section (Ao), and the
> parameter at the outlet (deriving these values is discussed in Section
> 7.2).
>
> **+IPRG** 3 9 *\<value\>*
>
> Generates a constant value for rutpix_QMCHN
>
> **+IPRG** 4 8 *\<q0chn_value\> \<qmchn_value\>*
>
> Generates rutpix_Q0CHN
>
> **Example steps for "Rating Curve Method" (numbers are only for this
> example)**
>
> Specify the \@G card appropriately
>
> \@G rutpix 9 3 2
>
> Specify a rutpix_QMCHN value
>
> **+IPRG** 3 9 1.2333
>
> Run genpar
>
> \$genpar genpar.card
>
> Copy TEMP
>
> \$ cp TEMP rutpix_QMCHN
>
> Comment the rutpix_QMCHN line and specify the rutpix_Q0CHN line:
>
> **+IPRG** 4 8 0.382 1.2333
>
> Run genpar
>
> \$genpar genpar.card
>
> Copy TEMP
>
> \$ cp TEMP rutpix_Q0CHN
>
> **Example steps for "Channel Shape Method"**
>
> Specify the \@G card appropriately
>
> \@G rutpix 7 3 2
>
> \# Correct slope of small channels (SLOPC)
>
> \# Parameters 0.178 & 1.25 are default values and could be excluded
>
> Specify to correct rutpix_SLOPC
>
> +IPRG 4 1 0.178 1.25
>
> Run genpar
>
> \$genpar genpar.card
>
> Copy TEMP
>
> \$ cp TEMP rutpix_SLOPC
>
> Comment the rutpix_SLOPC line and specify a rutpix_BETAC value
>
> **+IPRG** 3 3 2.12
>
> Run genpar
>
> \$genpar genpar.card
>
> Copy TEMP
>
> \$ cp TEMP rutpix_BETAC
>
> Comment the rutpix_BETAC line and specify the rutpix_ROUGC line:
>
> **+IPRG** 5 2 0.051 0.272 -0.00011
>
> Run genpar
>
> \$genpar genpar.card
>
> Copy TEMP
>
> \$ cp TEMP rutpix_ROUGC
>
> Comment the rutpix_ROUGC line and specify the rutpix_ALPHC line:
>
> **+IPRG** 5 4 665. 614. 0.43
>
> Run genpar
>
> \$genpar genpar.card
>
> Copy TEMP
>
> \$ cp TEMP rutpix_ALPHC

**Output**

Genpar reads existing parameter grid files, computes new values for
specified cells, and copies any unchanged values and the new values to a
new file named 'TEMP' in the directory where the program is run. This
output file overwrites any existing file named 'TEMP.' TEMP is a binary
parameter grid file. After running genpar, the UNIX 'cp' command must be
used to replace the corresponding binary grid in the HL-RMS parameter
directory in order for HL-RMS to access the parameter updates, e.g.

> cp TEMP rutpix_ALPHC

Note, again, that the TEMP file will be overwritten if genpar is
executed again, so it is good idea to copy or rename the TEMP file after
each 'genpar' run.

**Rules and limitations**

1.  The order in which parameter grids are generated is important! The
    rutpix_ROUGC grid and rutpix_BETAC grids must be generated before
    the rutpix_ALPHC grid because the rutpix_ALPHC grid depends on ROUGC
    and BETAC. For the same reason, the rutpix_QMCHN grid should be
    created before the rutpix_Q0CHN grid.

2.  Each time 'genpar' is executed for a basin, values for all cells
    upstream of basin outlets specified in the input deck are modified.
    If a downstream outlet and a nested basin outlet are specified in
    the same input deck, the inter-basin area between the two gages will
    be assigned values depending on the downstream outlet parameters and
    cells upstream of the nested outlet will depend only on parameters
    specified for the nested outlet. If in a subsequent run, only
    parameters for a downstream outlet are specified, values for cells
    inside the nested basin will be overwritten in the TEMP file.

3.  Genpar only updates parameter grid files. Basic template files must
    exist in order for the program to work. These template grids are
    provided by HL.

**7. REFERENCES**

Koren, V., Reed, S., Smith, M., Zhang, Z., Seo, D.J., 2003, in press,
Hydrology Laboratory Research Modeling System (HL-RMS) of the National
Weather Service, Journal of Hydrology..

Reed, S., 2003, in press, Deriving Flow Directions for Coarse Resolution
(1 - 4 km) Gridded Hydrologic Modeling, Water Resources Research.

Strahler, A.N., 1964. Part II. Quantitative Geomorphology of Drainage
Basins and Channel Networks, Handbook of Applied Hydrology, Section
4-II, V.T. Chow Editor, McGraw-Hill. **Appendix I:** **Free format rules
for the input deck**

The program uses free format input for all cards. Free format input
rules are: The @ in the first position of the line denotes a card label.
Card labels can be on the same line or the line above the fields of the
card. For example:

\@A 05021999 05311999 2

can be specified as

\@A

05021999 05311999 2

1.  If a card is not needed for particular run, its label and all fields
    must be omitted.

2.  Only columns 1-128 can be used for input. All columns beyond 128 are
    ignored.

3.  One comma or at least one blank can be used as a delimiter between
    fields.

4.  Blanks or commas are not allowed in character fields.

5.  All fields are required. A null field (double commas) must be used
    to denote single fields for which default values are to be used. If
    N consecutive fields use default values, N+1 commas must be used.
    The following input implies that defaults are to be used for the
    first two fields on card C:

    \@C , , ,

6.  Not all fields have valid defaults. If the documentation does not
    specify a default, the input must be specified.

7.  Consecutive commas at the end of a card can be omitted. For example,

    \@E 1, , ,

    Can be specified as

    \@E 1

8.  Any number of comment lines can be used in input card order. Each
    comment line should have the \# character in the first position of
    the comment line.