Analysis: SCT Custom Slot/Timestep Flag Colors / RiverWare 6.8
Funding: BOR UC, about one week of development time.
Phil Weinstein, CADSWES, 9-15-2015
Allow the user to apply a predefined set of special Foreground/Background colors to an arbitrary set of slot/timestep cells within an SCT's series tab.
A set of "Custom Slot/Timestep Flags" is first defined by the user. In the initial implementation, each custom flag has these properties:
- Label (single line of text)
- Text (foreground) Color
- Background Color
These can be applied to an arbitrary selection of slot/timestep cells through context menu operations. If an SCT has Custom Slot/Timestep Flag specifications defined, a new submenu will appear in the SCT's series data context menu. The submenu starts with a "Clear" item; subsequent items are the configured custom flag labels.
Both the definition of the custom flags and their association with specific timesteps of specific slots will be stored in the SCT Configuration (i.e. the persistent data associated with an SCT).
Architecture
This is the first time that slot/timestep-specific data is being associated with an SCT. In the past, the SCT was simply a view onto model data, and could reasonably be applied to different (but similar) models. Once an SCT was configured, it had previously been unusual -- at least, fundamentally -- to resave the SCT Configuration in the normal course of project or modeling operations.
In a sense, this new feature is essentially a custom extension of series timestep flags with explicity configured visual characteristics. The custom colors being assigned to specific slot/timestep cells will often serve as an annotation to the series data appearing in that cell -- and that series data lives in the RiverWare model, not in the SCT. It is conceivable that some modelers will, in the near future, want to use these custom flags as inputs, e.g. taken into account in special circumstances by RPL-based policies.
With these concerns in mind, in this short-term development, both the set of Custom Slot/Timestep Flag definitions, and their association with specific Slot/Timestep cells, will be implemented using data structures which could, in the future, be moved into the RiverWare model. The serialization of this data will be done with XML records, instead of directly with the form of Flex/Bison-parsable format typical of the SCT configuration serialization.
Date/Time Serialization
The serialization of timestep date/times must not be done as the number of seconds since the epoch start date (i.e., RiverWare's internal "seconds_t" values). Although that would be very efficient, it makes changing the beginning of the epoch period (currently starting at the beginning of 1800) difficult. (Such a mistake, I believe, has been made with certain DMI-handled data, without any provision to associate epoch-start information with that data).
The set of Custom Slot/Timestep Flag Specifications (possibly presented with a different semantic "framing" in the user interface -- TBD) will be edited with a gridded widget-based design already used in several similar applications within RiverWare. Here is one example:
![]() |
The widget columns will be:
- Plus button ... insert a row
- Minus button ... delete the row
- Label (line editor)
- Text Color square pushbutton ... shows color chooser
- Background Color square pushbutton ... shows color chooser
- Numeric sample, e.g. 21.123, shown with currently selected colors.
As previously mentioned, a content menu's submenu will be populated with the set of entered labels (and a "Clear" item).
--- (end) ---