ENVVARs are values used in text substitution elsewhere in the input. DSM2 attempts to replace any text that is preceded by a "$" and wrapped in curly braces: ${EXAMPLE}. By convention, these variables are always used in upper case. The substitution will be made from either system environmental variables or pseudo-environmental variables defined in this section. For instance, the SCALAR input section might indicate that run_start_time be set to ${START_TIME}. DSM2 will then search the system environmental variables and user-specified environmental variables for START_TIME and substitute the value (or print a warning if it finds nothing).
ENVVARs can be specified in text, or set by manipulating the command environmental variables. In production runs, many of the ENVVARs are set in a special file called the "configuration" file. Such a file is often included in the main input file using the CONFIGURATION include block:
Definition and use: The following example defines an ENVVAR section and then uses the variables later in a SCALAR section.
| ENVVARS | ||
| NAME | VALUE | |
| START_DATE | 01JAN1990 | # Runtime using envvars |
| END_DATE | 01JAN2001 | |
| START_TIME | 0000 | |
| END_TIME | 0000 | |
| END |
| SCALAR | ||
| model_name | historical_hydro | |
| run_start_date | ${START_DATE} | |
| run_end_date | ${END_DATE} | |
| run_start_time | ${START_TIME} | |
| run_end_time | ${END_TIME} | |
| END |