skip to main content
DSS Datasets
In general, all of the DSS dataset configuration can (and should) be performed from the Database DMI Editor. The DSS Dataset editor shows the results of configuration but the Database DMI has much more functionality. This section describes the functionality of the Database DMI Editor with respect to DSS datasets.
Note:  A DSS dataset must be selected for this area to become active.
DSS File
Specify the DSS file either by typing in the file path or selecting it using the open file icon . If not already created, an export DMI will create the specified DSS file.
The DSS File name may contain user parameters as %ParamName% (the same as for the DSS part information). The DSS file name may contain multiple parameters but the parameters must be typed in; they are not available from a context menu. See DSS DMI User Parameters for details.
The DSS file name text shows the user parameters while a tooltip shows the substituted values.The user parameters can be all or part of the DSS file name and can be used in conjunction with environment variables, for example:
• A single parameter: %DssFile%
• A path and a parameter: C:\model\data\%DssFile%
• Multiple parameters: %ModelDir%\data\%DssFile% or %DataDir%\%DssFile%.dss
• Environment variable and a parameter: $(DATA_DIR)\%DssFile%.dss
Note:  You can set the file path for multiple DSS Datasets in one action using the Configure DSS Datasets dialog; see Setting Multiple DSS Dataset Files for details.
Name Map
Optionally, select the desired Name Map from the Name Map menu. The selections are based on the Name Maps configured in the Name Map Manager. See Name Mapping for details on Name Maps. If you have no name map selected, select the Name Map Mgr button to open the Name Map Manager. If you do have a Name Map selected, the button says Open to open that Name Map.
Missing Values
Specify how missing values are represented in the database. The choices are
• NaN. RiverWare default, missing values are NaN in the database
• Unchanged. The DMI will not change missing values on import, uses NaNs on export
• Replace With. Provides a user input value that is substituted on import and export.
Output Precision
For Output DMIs, specify the precision of values that are sent to the database, that is, the number of digits to the right of the decimal point. The options are:
• Full. Output all available digits of precision. This is the default.
• Slot. Use the slot's display precision from the active unit scheme. Note, changing the active unit scheme could affect values sent out via the DMI.
• Specified. Use the specified precision.
Values are converted to the specified units, as described in Units, before rounding.
The rounding algorithm is: round(value * 10^N) / 10^N where value is after unit conversion, N is the number of digits of precision, and round() is a standard function which rounds its argument to the nearest integer value, rounding halfway cases away from zero.
Caution:  With this approach you could potentially see misleading results. For example, if a slot shows 1.23cfs, you export it using specified dataset units of cms, it becomes 0.0348cms. If you then reduce the precision to 2 digits, it will send 0.03cms as the output. If you then show the value in your database viewer using cfs and 2 digits of precision, it shows it as 1.06cfs. The value in the database does not match the value in RiverWare due to conversions and rounding. Be careful!
Also, to be clear, all values exported from a Database DMI are floating point numbers regardless of precision. For example, an expression slot might compute a value of 7538.21. Exported with 0 digits of precision, this would appear to be 7538, but technically, it was exported as a floating point number, 7537.9999999974 to 15 significant digits. This fact is really only important if you database displays 15-17 digits.
Table Slot Data
The user specifies how paired data should be imported to table slots in terms of overwriting existing data or leaving extra data unchanged.
This option is only enabled for Input DMIs. The options are:
• Import and Resize - a DSS DMI will import paired data by resizing the table to match the imported table. This is the default option. For example if the table slot currently has 20 rows, but the DSS data only contains 14 rows, then after import, the table slot will now have 14 rows. The 6 rows at the bottom of the table slot will be removed.
• Import Available - a DSS DMI will expand a table to accommodate the imported table but it won’t contract a table. This leaves any extra data in the table without change. For example if the table slot currently has 20 rows, but the DSS data only contains 14 rows, then 6 rows at the bottom of the table slot will remain unchanged. Only the first 14 rows will have the newly imported data.
The units that are used in the DSS database are specified in the Dataset dialog. A pull-down menu allows the user to specify that the Database DMI should Use Database Units, Prefer Database Units, or Use Dataset Units. Figure 4.18 shows an example.
• Use Database Units. The database contains all units (This option is not applicable to DSS because units are not required to be defined in DSS files, so can’t be fully depended on)
• Prefer Database Units. Use the units in the database, if missing, use the specified Units
• Use Dataset Units. No units are specified in the database, use the specified units.
If you chooses either of the second two options, you must specify the units in the window below the pull-down menu. Select the icon to add a new unit type:
This adds an entry to the list. Double-click the word NONE under the Type to change the type. Figure 4.18 illustrates. Change the Scale and Units in a similar manner. These units are used to specify the units that will be written to the database if an Output DMI is used and the units that the database contains if an Input DMI is used.
Figure 4.18   
Figure 4.19 shows an example of specified units.
Figure 4.19   
Data Types
Select the Edit Data Types button to edit the data types. In the resulting dialog, you can specify that a selection of slots should have a certain data type. The DSS data types are: PER-VAL, PER-AVER, INST-VAL, INST-CUM. The selection is similar to other slot selections as it is dynamic and can make full use of wildcarding.
Revised: 01/05/2024