CWMS-HMS Advanced - Managing References
- Anytime the main HMS project’s DSS file is listed as a data source in .gage, .grid, .pdata, and .dsv files, modelers should investigate and set the correct data input filename, if needed.
- Anytime the DSS file resides outside the HMS project folder, then the reference is at risk being lost whenever the HMS project folder is moved to a new location on disk, or copied to a teammate. CWMS modelers are strongly encouraged to keep data required for “base model” computes within the HMS project tree, where HMS will automatically manage the relative pathnames.
- Anytime the DSS file is referenced by an absolute pathname, then it is also at risk being lost whenever the HMS project folder is moved to a new location on disk, or copied to a teammate.
Five file types within the HMS folder structure can contain links to DSS files and should be investigated:
- .gage - contains the linkage information for all time series (e.g. flow, stage, SWE, etc)
- .grid - contains the linkage information for all grid sets (e.g. gridded precipitation, temperature, SWE, etc)
- .pdata - contains the linkage information for all paired data objects (e.g. flow-stage, stage-storage, storage-discharge, etc)
- .dsv - contains the linkage information for all-time series and grid sets that are linked within either a forecast alternative (i.e. CWMS) or an uncertainty analysis (i.e. HEC-WAT). This information is only accessible/editable within the model linking editor in either CWMS or HEC-WAT
- .forecast - contains zonal adjustments, initial baseflow, initial reservoir, and initial reach states along with simulation variant information (ID, name, input DSS file name, and output F-Part)
Review these files using any text editor, making sure to pay special attention to the lines containing “DSS File Name:”. If the file name starts with a “\” or a Windows drive letter (such as “c:\”) then it is an absolute path that is unlikely to remain correct if the model is copied or shared with others. HEC recommends storing these as relative pathnames, such as “data\Curwensville.dss” (a DSS file contained within the “data” directory under the “hms” folder).
Example model file entries:
Relative “DSS File Name: data\DS_Stevenson.dss”
Absolute “DSS File Name: E:\NAB_West_Branch_Susquehanna\forecast\ DS_Stevenson.dss”
This page provides instructions for seeing all the relevant DSS file names in one list: Generating a List of Potential DSS File Prompts in an HMS Project
Relative paths to reference files outside of the “hms” folder hierarchy are strongly discouraged. This may seem appropriate for data used by other applications in addition to HMS, such as rating curves or gridded precipitation, but will most likely lead to problems when copying HMS projects from one place to another. DSS files outside the HMS project folder tree should be copied into a location within the HMS project. If the files are large, try to copy just the records needed for your base model to compute (these files will be copied per each forecast created in the CAVI). Then update the references in the HMS model to point to the files now within the HMS project.
In situations with a small number of corrections to implement for DSS files residing in the HMS project tree, modelers are encouraged to use the HMS interface to re-select the files. If the file is contained within the “hms” folder hierarchy, then HMS file chooser dialogs will save the pathnames as relative. Even though HMS shows an absolute pathname in the “DSS Filename:” field, the HMS data file will contain a relative name (see highlighted fields in Figure 1).
More numerous corrections may be more manageable by editing HMS project files directly to "search-and-replace" references to bogus filenames or directories. Users need to be cautious using this approach and make sure other dependent files are modified accordingly (still suggest using HMS UI).
Also, note that the HMS "Save As" Feature can create a new HMS project with all DSS records from files outside the HMS project "localized" to a DSS file contained within the HMS project.
Modelers may choose to delete the pre-existing HMS model alternatives and re-import the new HMS project back into CAVI. Or copy the new "localized" DSS file into the existing HMS project folder, and update the HMS project files using the HMS interface (or a text editor).