Alternate Run Modes:Simulation Setup for Alternate Run Modes

From Gsshawiki
Jump to: navigation, search

Setting up for Alternate Run Methods in GSSHA™

In addition to the standard simulation mode, GSSHA™ may be run in alternate modes that facilitate batch runs, sensitivity analysis, and calibration. All of these alternate methods utilize the value replacement functionality in GSSHA. The basics of value replacement are described below. Specific directions for using batch mode, automated calibration, and Monte Carlo simulations are provided in subsequent sections. Consult the section describing the particular simulation type before attempting to use value replacment for any of these alternate simulation modes.

Value Replacement

In value replacement you target specific GSSHA™ inputs that will replaced with values specified in a value replacement file. This allows you to specify different inputs in multiple files without having to edit each of the files directly. Any parameter in any GSSHA™ input file can be targeted for replacement, be the parameter integer, floating-point, or a string value. This means that almost every line in every file could be changed using this methodology. To utilize the replacement functionality the user provides two additional input files, a parameter list file that describes the format of the parameters and a parameter value file that describes the values to be used. In addition to these two input files the user must also change the project file to indicate that replacement is being utlized and must indicate where in the input files the replacement values should be.

Project File

When using value replacement you must place the REPLACE_PARAMS and REPLACE_VALS cards in your project file. The input for REPLACE_PARAMS is the name of the file that contains the parameter list, as described below. The input for the REPLACE_VALS card is the name of the file that contains the value list, also described below.

Targeting Values to Replace

To indicate anywhere in the input files where a change is desired the user simply replaces the standard input with a user-defined name for that input. The variable name must be enclosed in square brackets. For example, if it is desired to make the time step in the project file changeable by some method, the line in the project file would look like:

TIME_STEP  [ts]

Where ts is the parameter name (any name is allowable but shorter is usually better). Note the square brackets around the parameter name. The square brackets are the key that GSSHA™ uses to know that something should be replaced. The variable name will be used in the REPLACE_PARAMS file as the link to the format and value.


REPLACE_PARAMS File

In the REPLACE_PARAMS file the C-style format of each variable targeted for replacement in the input files is specfied. The first line of the file is the number of parameters. This is followed by a list of parameter names, encluded in brackets, and the C-style format specifier. Each parameter is listed on a separate line.

Only integer (%d), double width floating point (%lf), and character string (%s) formats are allowed. The type of input is preceeded by the size. For integers a single value is given, such as %4d, meaning a integer with four or fewer digits. For real numbers the overall size is given, followed by a decimal point and the number of digits behind the decimal point, such as %6.2lf, meaning 6 digits overall, with 2 places behind the decimal point. For a character string, %4s could be used for a character value, such as KSAT. For additional help on C-style format specifiers, please consult any C reference manual. For addional illustration an example is shown below.

4	
[ts] "%d"
[silty_loam_HydCond] "%6.2lf"
[ov_type] "%s"
[residential_albedo] "%6.2lf"

In this example the timestep, located in the project file, is being replaced with an integer number of unspecified size. The overland flow calculation method is being replaced with a string of unspecified size in the project file. The saturated hydraulic conductivity of silty loam and the albedo value for residential land use are being replaced with real values in 6.2 format in the mapping table files.

The REPLACE_PARAMS file may contain variables that are not used in the input files. Variables can be listed in any order but the order in the REPLACE_PARAMS file but coincide with the values provided in the REPLACE_VALUES file. The REPLACE_PARAMS file is used for all alternate run modes of GSSHA™.

REPLACE_VALS file

The REPLACE_VALS file provides the values for the parameters listed in the REPLACE_PARAMS file. The order and format of the parameters in the REPLACE_VALS file must be the same as listed in REPLACE_PARAMS file. In the REPLACE_VALS file all of the variables are listed on one line with spaces separating the values. For the example above the following inputs could be specified in the REPLACE_VALS file:

10 0.10 ADE 100.00

which would result in a simulation with a 10s timestep, a saturated hydrualic conductivity for all silty loam soils of 0.1 cm h-1, an albedo for all residential land use of 100.0, and the alternating direction explicit method of calculating overland flow.


GSSHA User's Manual

18 Alternate Run Modes
18.1     MPI and OpenMP Parallelization
18.2     Simulation Setup for Alternate Run Modes
18.3     Batch Mode Runs
18.4     Automated Calibration with Shuffled Complex Evolution
18.5     Monte Carlo Runs
18.6     ERDC Automated Model Calibration Software
   18.6.1     Efficient Local Search
   18.6.2     Multistart
   18.6.3     Trajectory Repulsion
   18.6.4     Effective and Efficient Stochastic Global Optimization
18.7     Inset Models