G13PC00027 Task Order G13PD00866 (No. 0001) Attachment A Page 1 of 7 Attachment A INDEX 1. StreamStatDB ............................................................................................................................................................... 2 1.1 Convert to .NET........................................................................................................................................................................ 2 1.2 Corrections and Enhancements ........................................................................................................................................ 2 1.2.1 Release Locked Database ................................................................................................................................................................ 2 1.2.2 Station Filters - bug........................................................................................................................................................................... 2 1.2.3 Administration Privileges – minimize requirements .......................................................................................................... 2 1.2.4 BCF Button – remove ........................................................................................................................................................................ 2 1.3 Percent Correct field in DepVars table ........................................................................................................................... 3 1.4 Documentation........................................................................................................................................................................ 3 2. SEE .................................................................................................................................................................................... 3 2.1 Convert to .NET........................................................................................................................................................................ 3 2.2 Report Citations ...................................................................................................................................................................... 3 2.2.1 Add Citation tool ................................................................................................................................................................................. 4 2.2.2 Citation pick list on the Region Values grid ............................................................................................................................. 4 2.2.3 DataSourceID numbers in import files ...................................................................................................................................... 4 2.3 Percent Correct interactive editing ................................................................................................................................. 4 2.4 Documentation........................................................................................................................................................................ 4 3. NSS.................................................................................................................................................................................... 5 3.1 Editing Scenarios for two regions .................................................................................................................................... 5 3.2 Region of Influence (ROI) process bug ........................................................................................................................... 5 3.3 Report Citations ...................................................................................................................................................................... 5 3.4 Input Data Rounding – warning ........................................................................................................................................ 5 3.5 Replace Standard Error columns with Percent Correct ........................................................................................... 6 3.6 Documentation........................................................................................................................................................................ 6 4. SSDBMerge ................................................................................................................................................................... 6 4.1 Convert to .NET........................................................................................................................................................................ 6 4.2 Update to new StreamStatsDB format ............................................................................................................................ 6 4.3 Produce Error Reports ......................................................................................................................................................... 6 4.4 Documentation........................................................................................................................................................................ 7 G13PC00027 Task Order G13PD00866 (No. 0001) Attachment A Page 2 of 7 1. StreamStatDB 1.1 Convert to .NET The StreamStatsDB program has several behavioral problems when operated on Windows 7 computers that are related to the fact that it was written in Visual Basic 6 (VB6), which is no longer supported by Microsoft Corporation. Convert StreamStatsDB and SSDBMerge from VB6 to Visual Basic .NET (VB.NET) so that the programs will run under both Windows 7 32-bit and Windows 7 64-bit operating systems, as well as Windows 8. Done. 1.2 Corrections and Enhancements Modifications to the StreamStatsDB program are needed improve the user experience and to fix bugs. 1.2.1 Release Locked Database When the StreamStatsDB program is started, it opens the StreamStatsDB database, which creates a StreamStatsDB.ldb file, locking the database from being used by other programs. When the program is closed, it should cause the StreamStatsDB.ldb file to close, unlocking the database so that it can then be used by other programs, but that is not happening. Fix StreamStatsDB so that it deletes the StreamStatsDB.ldb file and releases the database upon closing. Done. 1.2.2 Station Filters - bug When a user chooses to filter the listing of stations for a State by County or Hydrologic Unit Code (HUC) in the StreamStatsDB user interface, if they then decide to turn the filter off so that the stations will be listed simply by State, the result is that no stations are listed on the Station Selection frame, thus making it impossible to use the program. Fix the StreamStatsDB program so that the station filters can be turned on and off. Done. 1.2.3 Administration Privileges – minimize requirements StreamStatsDB users often have difficulty running the program after installation. The program needs file writing privileges on users’ computers for output files and other files created by the program. Administrative rights are needed to set the complex file writing privileges, and it often is not obvious where these privileges need to be set. The program crashes when privileges are not set properly, and users often do not have administrative rights to set them. Modify StreamStatsDB so that administrative privileges are not needed to set file handling properly. If this is not possible, then minimize the need for administrative privileges and document in the User Manual or installation READ_ME file precisely what and where privileges should be set. Admin privileges are now not needed to install the program, but they are needed to run it. Previously, the opposite conditions existed. [Removed reflection call, might resolve this] 1.2.4 BCF Button – remove The StreamStatsDB user interface includes a “BCF” button, which was initially used to enter data that were taken from a defunct database known as the Basin Characteristics File (BCF). This tool was used to initially populate the database, but all data that were once in the BCF are now in StreamStatsDB or they have been superseded by newer G13PC00027 Task Order G13PD00866 (No. 0001) Attachment A Page 3 of 7 data. As a result, there is no longer a need for this tool to be available, and its continued availability leads to some confusion among users. Discussion on how to use this tool also shall be removed from the documentation. Eliminate the BCF button from the StreamStatsDB user interface and remove instructions for using it from the documentation. Done. 1.3 Percent Correct field in DepVars table Currently, seven States have developed equations for estimating the probability of zero flow or other low-flow statistics. Probability equations do not have the standard indicators of errors, such as the standard error of estimate or prediction, which normally are available for other types of regression equations. A method for computing prediction intervals was provided with a probability equation for Massachusetts, and that method has been implemented in SEE and NSS, but those programs do not provide any error indicators for the probability equations for the six other states. Of those, four of the reports that describe the equations provide the percent of stations that were correctly predicted as an indicator of potential errors associated with use of the equations; two reports provide percent of stations that were incorrectly predicted, and one report provides no indicators of potential errors. As it is a USGS goal to provide indicators of potential errors with all streamflow estimates provided by the NSS program, modifications will be needed to the StreamStatsDB database, SEE (2.3) and NSS (3.5) to allow the display of the percent correct for probability equations. Modify the StreamStatsDB database by inserting a “Percent Correct” field in the DepVars table. This field will only be used for probability equations. Done. 1.4 Documentation Update documentation for StreamStatsDB, reflecting changes for items 1.1 – 1.3. Partly done; needs substantial improvement. 2. SEE 2.1 Convert to .NET As with the StreamStatsDB program, SEE has several behavioral problems when operated on Windows 7 computers that are related to the fact that it was written in Visual Basic 6 (VB6), which is no longer supported by Microsoft Corporation. Convert SEE from Visual Basic 6 (VB6) to Visual Basic .NET (VB.NET) so that the program will run under Windows 7 32-bit and Windows 7 64-bit operating systems as well as Windows 8. 2.2 Report Citations The Region table of the StreamStatsDB database was modified in 2012 by inserting the DataSourceID field. Although the field has not yet been fully populated, this change to the table allows the association of a report to an individual hydrologic region. Currently, there is no way in the SEE program to specify the report citation when entering new equations or editing equations that already are in the database. There is, however, similar functionality in the StreamStatsDB program for specifying reports associated with information for streamgages. Similar functionality shall be added to SEE. Modify the SEE program to (1) add an “Add Citation” tool to the user interface, (2) add a citation pick list to the Region Values grid, and (3) allow specification of DataSourceID numbers in import files. Details on the desired changes are below; however, if the contractor determines that a different G13PC00027 Task Order G13PD00866 (No. 0001) Attachment A Page 4 of 7 approach would be preferable, then the contractor shall describe the alternate approach to the USGS and gain approval before proceeding. 2.2.1 Add Citation tool This added button would be used to establish new reports in the DataSource table. Upon clicking the button, the user will be presented with fields for entering report citations and URLs of the online versions of the reports. The user should be able to scroll through existing citations and URLs to assure that the report of interest has not already been added, similar to how reports are entered using the Excel import tool in the StreamStatsDB program except that the SEE tool also shall present the DataSourceID number for existing reports and for new ones after they are added. This tool shall have a cancel button so that it can be used to look up DataSourceID numbers for subsequent manual entry into import files without actually adding a new citation. The tool also shall have a delete button to allow the deleting of existing citations, either because they are no longer needed or they are erroneous. Users shall be prompted to check if they are sure that they want to delete the citation before the actual deletion is done. 2.2.2 Citation pick list on the Region Values grid The pick list will allow interactively selecting a different citation than the one that is already selected or specifying a citation if the field has not already been filled. All available citations will appear alphabetically in the pick list, and when one is selected, the corresponding DataSourceID will be assigned to the region in the Regions table of the database. 2.2.3 DataSourceID numbers in import files The format of the import files shall be modified to allow entry of a DataSourceID number for each hydrologic region in the file. 2.3 Percent Correct interactive editing Currently, seven States have developed equations for estimating the probability of zero flow or other low-flow statistics. Probability equations do not have the standard indicators of errors, such as the standard error of estimate or prediction, which normally are available for other types of regression equations. A method for computing prediction intervals was provided with a probability equation for Massachusetts, and that method has been implemented in SEE and NSS, but those programs do not provide any error indicators for the probability equations for the six other states. Of those, four of the reports that describe the equations provide the percent of stations that were correctly predicted as an indicator of potential errors associated with use of the equations; two reports provide percent of stations that were incorrectly predicted, and one report provides no indicators of potential errors. As it is a USGS goal to provide indicators of potential errors with all streamflow estimates provided by the NSS program, modifications will be needed to the StreamStatsDB database (1.3), SEE and NSS (3.5) to allow the display of the percent correct for probability equations. Modify the SEE program to allow entry and editing of the “Percent Correct” interactively through the user interface and through use of import files. 2.4 Documentation Changes described in 2.1 – 2.3 will require changes in how users interact with the SEE programs. These changes in user interaction will need to be documented. Update the documentation for the SEE program to reflect all changes in the functionality. G13PC00027 Task Order G13PD00866 (No. 0001) Attachment A Page 5 of 7 3. NSS 3.1 Editing Scenarios for two regions In NSS, when attempting to enter values for two different regions within the same Edit Scenario window, entering a value in the second cell of the second region results in an "unhandled exception" error. Details: "Object variable or With block variable not set." Modify NSS to eliminate this error when editing scenarios. 3.2 Region of Influence (ROI) process bug Region-of-Influence (ROI) regression was implemented previously for several states, but ROI does not work in the current version (6.0) of NSS. Users receive error messages when attempting to run ROI scenarios. Fix bug(s) in NSS that prevent users from obtaining flow estimates from ROI regressions. 3.3 Report Citations Modify NSS so that users will be shown the citation for the report that is associated with the hydrologic region for their selected site; a hyperlink will be provided to the on-line version of the report. The citation and the associated hyperlink can be looked up in the DataSource table of the StreamStatsDB database. This will allow users to easily access the on-line report in case they have any questions as to how to compute the basin characteristics needed to obtain the flow estimates. The report citation also shall be printed in the output report from NSS to better document the methods used to obtain the flow estimates. This functionality will rely on the population of DataSourceID field in the Region table of the StreamStatsDB database, which has not yet been completed by the USGS. Note: Program SEE Report Citations (2.2) should be completed first. Modify the NSS program to present the report citation with an embedded hyperlink to the on-line report for the user-selected hydrologic region in the Edit Scenario window. The citation also shall be printed in the output report, without the hyperlink. The USGS will provide an updated version of the StreamStatsDB database with the DataSourceID filled in for several hydrologic regions to allow testing of this functionality. 3.4 Input Data Rounding – warning When NSS users enter values of basin characteristics into the Edit Scenario window, the program uses the entered values in the flow computations, but then it stores the basin characteristics rounded to three significant digits and shows the rounded values in the NSS outputs. This has not caused significant problems for most equations. However, the peak flow equations for Georgia, North Carolina, and South Carolina include explanatory variables that are the percentages of the basin that are within each of 5 hydrologic regions. Users must enter percentages that add precisely to 100 percent or NSS will estimate zeros for all of the peak-flow statistics. As a result of rounding by NSS, if a user has entered values of greater than 3 significant digits, those values will be rounded and re-running of the saved scenario will result in erroneous flow estimates of zero. Users shall be warned of this potential problem. Modify NSS to provide a warning on the Edit Scenario window and in the documentation, such as “Userentered values of basin characteristics will be used in the initial NSS flow computations, but the values G13PC00027 Task Order G13PD00866 (No. 0001) Attachment A Page 6 of 7 will be rounded to three significant digits before being saved and presented in the NSS output. As a result, the values that appear in the outputs may be slightly different than those entered by the user. Also, re-running of a scenario may result in different flow estimates than those originally provided by NSS." 3.5 Replace Standard Error columns with Percent Correct Currently, seven States have developed equations for estimating the probability of zero flow or other low-flow statistics. Probability equations do not have the standard indicators of errors, such as the standard error of estimate or prediction, which normally are available for other types of regression equations. A method for computing prediction intervals was provided with a probability equation for Massachusetts, and that method has been implemented in SEE and NSS, but those programs do not provide any error indicators for the probability equations for the six other states. Of those, four of the reports that describe the equations provide the percent of stations that were correctly predicted as an indicator of potential errors associated with use of the equations; two reports provide percent of stations that were incorrectly predicted, and one report provides no indicators of potential errors. As it is a USGS goal to provide indicators of potential errors with all streamflow estimates provided by the NSS program, modifications will be needed to the StreamStatsDB database (1.3), SEE (2.3) and NSS to allow the display of the percent correct for probability equations. Modify NSS so that when probability equations are presented the “Standard Error” column that currently appears is replaced with a column labeled “Percent Correct.” 3.6 Documentation USGS has modified the NSS documentation. Program changes described in 3.1 – 3.5 will require changes in how users interact with the NSS programs. These changes in user interaction will need to be documented Update the documentation for the NSS program to reflect all changes in the functionality. 4. SSDBMerge 4.1 Convert to .NET SSDBMerge needs to be converted from Visual Basic 6 (VB6) to Visual Basic .NET (VB.NET) so that the program will run under both Windows 7 32-bit and Windows 7 64-bit operating systems, as well as Windows 8. Convert the SSDBMerge program to VB.NET. Done. 4.2 Update to new StreamStatsDB format Modifications were made during 2012 to the structure of the StreamStatsDB database, but the SSDBMerge program was not updated to work with the new structure. As a result, SSDBMerge currently does not work. Modify SSDBMerge to work with the current version of the StreamStatsDB database. Done. 4.3 Produce Error Reports The SSDBMerge program is used to merge an updated subset of the database into the master copy. The program allows the user to specify the file names of the subset and master databases, and when run it indicates progress and completion. The merge process is often unsuccessful, however, usually because of problems with the subset database, and the few error messages that the program provides give little indication of what went wrong. SSDBMerge shall be enhanced so that when the merge process does not complete successfully, the program G13PC00027 Task Order G13PD00866 (No. 0001) Attachment A Page 7 of 7 provides sufficient error messages to determine where and why it happened. Messages shall indicate such things as missing required values, or values with an incorrect or implausible value, as well as the table name and row number or station number at which the error occurred so that the source of the error can be more easily found and corrected. Messages could be presented in the form of a pop-up window or in a text file. Modify the SSDBMerge program to provide messages that will improve the ability to identify the source of errors when the merge process does not complete successfully. Done. 4.4 Documentation SSDBMerge program has no documentation. It is not a complex program and it has a very small user base, but some minimal documentation would be helpful, particularly for new users. Provide documentation for the SSDBMerge program. Describe how to use the program and the minimum requirements for the contents of the subset database. For example, the SSDBMerge program will not run successfully if each station in the Station table does not have the latitude and longitude fields populated. Document any other such requirements or dependencies, provide descriptions of any possible error messages, and describe what to do when error messages appear. No documentation was provided.