skip to main content
DIT Datasets
The DIT Dataset allows direct connections to import data from the Demand Input Tool (DIT) SQLite database. For more information on this tool, see the DIT web site.
Double-clicking a DIT dataset in the Dataset Manager opens the DIT Dataset editor. In this dialog, the dataset can be renamed and configured. It has two tabs, one for general configuration and one specific to the DIT implementation.
General Tab
This section describes the general tab for the DIT dataset dialog box.
Name Map
Mappings of RiverWare names to DIT is typically not necessary for particular slots. See Slots Typically Imported for more information on the default mapping. If you want to map other slots to values in the DIT, the following are the names of values in the database and would be the text to use in the name map:
• DiversionValue - Diversion requests or schedules in the DIT.
• DepletionValue - Depletion requests or schedules in the DIT.
• AggDivSalinityValue - Salinity mass or concentration in the DIT.
Missing Values
Specify how missing values are handled when importing data from the DIT. In general, a NaN/NULL in the DIT is represented as a NaN in RiverWare. The current choices are as follows:
• NaN. On import, missing values in the DIT are made NaNs in RiverWare.
• Unchanged. On import, RiverWare data is left unchanged for a missing value in DIT.
• Replaced With. Provide a value that is substituted for NaNs or a missing values on import.
 
Units
A menu in the Dataset dialog allows you to specify how units should be handled for a dataset. The options are as follows:
• Use Database Units
• Prefer Database Units
• Use Dataset Units
Units are currently not represented or read from the DIT. Use Dataset Units or the default Prefer Database Units are the most applicable selections.
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.20 illustrates. Change the Scale and Units in a similar manner. These units are the units that the database contains
Figure 4.20   
Figure 4.21 shows an example of specified units.
Figure 4.21   
Configuration specific to the DIT database is specified in the DIT tab of the DIT Dataset editor.
DIT Tab
The following is a screenshot of the DIT tab of a DIT dataset:
DIT File Path
First, specify the path to the database. Select the “...” button next to the DIT File Path field to open a standard file selector dialog and then locate the database file. Common SQLite file extensions are db, sqlite, sqlite3. Environment variable are also supported in the file path. Use the $VARIABLE, $(VARIABLE) or ${VARIABLE} syntax.
Scenario:
Once a valid DIT file is specified, select the "..." button next to the Scenario field to open the dialog below. Then, select which scenario's data should be imported. This dialog only opens if a valid DIT database file has been selected.
Slots Typically Imported
As described in Name Map, name maps can be used. The DIT dataset provides automatic mapping from certain slots to variables in the database. The table below shows the default slots in RiverWare and how they are mapped to data in the DIT. Importing to any other slot, without a name map, will result in an error.
 
Table 4.3  Default mapping of slot names to data in the DIT
Object.Slot in RiverWare
Data in the DIT
Unit type
WaterUser.Diversion Requested
DiversionValue
Flow
WaterUser.Diversion Schedule
DiversionValue
Flow
WaterUser.Depletion Requested
DepletionValue
Flow
WaterUser.Depletion Schedule
DepletionValue
Flow
AggDiversionSite.Return Flow Salinity Pickup Mass
AggDivSalinityValue
Mass
AggDiversionSite.Return Flow Salinity Pickup Conc
AggDivSalinityValue
Concentration
AggDiversionSite.Diversion Salt Concentration
AggDivSalinityValue
Concentration
AggDiversionSite.Salt Mass Removal
AggDivSalinityValue
Mass
For the last four items, the DMI and dataset checks that the slot and unit type matches the computation used in the DMI. This helps to ensure that mass/concentration data in the DIT gets imported to mass/concentration slots in RiverWare.
If you need to import DIT to other slots, use a name map to map the slot in RiverWare to the data in DIT. See Name Map for more information.
Revised: 01/05/2024