Best Practices
CAVI
Terminating an Unresponsive CAVI
If the CAVI becomes unresponsive, please use the HEC-RTSTaskList.exe (located within the CAVI folder) to ensure that all associated processes are cleared before relaunching the CAVI.
Multiple CAVI Forecast Runs and CAVI Map Window Displays
When working with multiple CAVI forecast runs, the results from only one forecast run can be displayed in a CAVI Forecast Simulation Map Window. To view the results that belongs to a CAVI forecast run that is not current displayed, right-clicking on the desired CAVI forecast run and select Display in Map. You will be provided with two options: replace the existing Map Window’s display; or display the selected CAVI forecast run’s models and results in a new Map Window.
Desktop Dashboard
The portability of the CAVI Desktop Dashboard is not yet a seamless process. If you plan on copying a watershed with a Dashboard already configured from one computer to another, follow the steps outlined here. The figure below shows an example within the config folder (right) of the Dashboard and the Dashboard folder itself (left). In this watershed, there are two custom Dashboard configurations: HMS Calibration and Cumulative Precipitation.
- Copy the watershed files onto the new computer.
- Prior to opening the CAVI:
- Delete the var folder within the Dashboard folder.
- Open the config folder and delete only the Preferences and Windows2Local folders.
Open the CAVI and access the Dashboard. The folders deleted in the above steps will regenerate and the Dashboard configurations will be available on their computer.
Adjusting Logging Levels
CWMS uses the Java Util Logger framework as its logging mechanism. By default, the logging level is set to INFO, but you can adjust the log levels in the CWMS client bundle to meet your needs. See Logging Levels or CWMS Client Debug Logging and "-D" Flag Options tutorial for further information on how to adjust logging levels.
CWMS-Vue
Memory and Settings Management
- The new generation CWMS-Vue tabs are memory intensive, so increasing the maximum allotted memory setting for the CAVI help the performance of its CWMS-Vue plugin. For any PCs with installed memory of 32GB or greater, it's recommended to increase the maximum allotted memory to 6GB or 8GB:
- Edit the cavi.config file in notepad
- Change the -Xmx2048m argument to -Xmx6144m or -Xmx8192m
- A tutorial to setup the CAVI-Personal.config is available here: Creating Personal CAVI Config File
- In addition to increasing the CAVI's maximum allotted memory setting, turning off a few graphical settings could help too:
- Edit the cavi.config file in notepad
- Comment out the following arguments under the "Graphical Issues" section
- #vmparam -Dsun.java2d.d3d=false
- #vmparam -Dsun.java2d.nodraw=true
- #vmparam -Dprism.order=sw
HEC-MetVue
Importing HEC-MetVue Projects
It is best practice to create an HEC-MetVue project outside the CWMS watershed before importing the HEC-MetVue project into the CAVI. The HEC-MetVue project directory should also include a maps directory with polygon shapefiles meant for basin average computations. The polygon shapefiles should have a Name filed in the attribute table, with informative location names for each polygon.
HEC-MetVue Project Setup in the CAVI
The minimum requirement to create a CAVI-MetVue alternative is to ensure that an HEC-MetVue Session and corresponding Map Windows are created in the HEC-MetVue project. For the base copy of the HEC-MetVue project, as the required definition of the necessary input data for forecast simulations are defined in the CAVI-MetVue Alternative Editor, it is optional to link data directly in the input Map Window(s) of the HEC-MetVue Project. However, adding a small amount of sample data in the base copy of the HEC-MetVue project is highly encouraged to help with customizing any desired gridset spatial extents clipping, contour layer display settings (especially scales and corresponding color palettes), and any desired temporal transformation sets.
Memory Management and Settings
Gridded datasets with large spatial extents and/or long temporal coverage can consume a large amount of memory. When possible, using clipping extents (e.g. clipping RFC input data sets to watershed extents) in the HEC-MetVue data reader can alleviate memory usage and computational processing time. Otherwise, if a minimum of 16GB of installed PC memory is available, the HEC-MetVue maximum allowable memory usage setting should be increased (from Xmx3200m to Xmx8000m) by editing the CWMS-v#.#.#\HEC-MetVue\etc\metvue.conf file, then restarting the CAVI.
HEC-MetVue Project and CAVI Model Alternative Updates
When there is a need to make updates or modifications to the watershed’s HEC-MetVue project and/or CAVI-MetVue alternative, it is best to make the changes in the base copy (i.e. from the Setup Module), update the CAVI Model Linking if necessary, and then rely on Replace-from-Base to update forecast copies of the HEC-MetVue project and/or CAVI-MetVue alternative.
Data Types and Durations
When setting up the CAVI-MetVue alternative, it important to ensure that appropriate durations and parameter types are specified for Input and Output datasets. In particular, SWE and Temperature datasets are typically instantaneous data and their CAVI-MetVue alternative’s input duration should be set to 0 and their output parameter type should be set to INST-VAL. Precipitation datasets are typically period cumulative with input duration of x-hours and output parameter type of PER-CUM.
HEC-MetVue Temporal Transformation Tool
The CAVI-MetVue model alternative will apply uniformly weighted gridded data transformation by default. But, using the HEC-MetVue Temporal Transformation Tool to set a peaked weighting pattern can be especially useful to maximize precipitation volume within a desired portion of the input interval.
CAVI-MetVue Input Data Time Window Controls (Hamon ET Support)
When planning to link HEC-MetVue to an HEC-HMS model that uses the Hamon Evapotranspiration (ET) method, supplying HEC-HMS with the required extra one days’ worth of temperature data prior to the Start of Lookback and after the End of the Simulation can be achieved by:
- Ensuring that the Extract list has a minimum of -1 Day offset from the Lookback Time for the observed Temperature extract group.
- Applying a corresponding SoS (Start of Simulation) -1 Day Offset to the Lookback Temperature Map Window in the CAVI-MetVue alternative’s Input Settings.
- Ensuring the Extract list has a minimum of +1 Day offset from the Forecast Simulation End Time for the Forecast Temperature extract group.
- Applying a corresponding EoF (End of Forecast) +1 Day Offset to the Forecast Temperature Map Window in the CAVI-MetVue alternative’s Input Settings.
- Ensuring that the Extract list has a minimum of -1 Day offset from the Lookback Time for the observed Temperature extract group.
CAVI-MetVue Input Data Time Window Controls (SWE and QPF Handling)
When the CAVI forecast simulation time window times do not coincide with the time stamps of input datasets (e.g. forecast start and end times are at 0700 while input SWE registers at 0600 every day and QPF registers at 0000/0600/1200/1800), input data beyond the forecast simulation time window will be required. Setting reasonably buffered time offsets in the relevant Extract List groups and the CAVI-MetVue alternative's input datasets can ensure that sufficient data is available before and after the Forecast Simulation’s start and end times.
HEC-HMS
Proper File Storage
Keep all the HEC-DSS records needed for an HEC-HMS compute inside the HEC-HMS project folder. This will ensure that HEC-HMS can find all the required data when the project is opened and at the start of a simulation. It also avoids prompts for HEC-DSS files when the project gets moved to a new location or new computer. The Global File Reference Table with the Visual Cues for File Reference are an easy way to ensure that all files are linked like they should.
Similarly, keep all the shapefiles and ModClark grid cell files needed by the model inside the HEC-HMS project folder.
Also, all referenced files within the HEC-HMS's watershed folder should have valid data. When HEC-HMS opens, the program checks all time-series, paired, and grid data to verify data types, units, and other information. If the data cannot be found, then it is marked as invalid and you will have to manually clean up the data every time you create a new forecast. To prevent all this extra work, ensure you have enough valid data in the base watershed project to run a simulation.
Minimize the volume of data in the HEC-HMS project tree supporting the base model test compute by cleaning up the HEC-HMS model: remove all unnecessary components, remove unnecessary HEC-DSS records, and delete old simulation results. The entire HEC-HMS project folder will be copied when a new forecast is created; therefore, whatever is in the HEC-HMS project folder will be duplicated for each forecast - the more files to duplicate, the more time it will take to copy the files and the more storage each forecast will require.
Using Save to Base
Use Save to Base sparingly. It has potential to change pathnames and cause issues later on. If you have changes in a forecast that you want to copy into the base model, it is recommended to modify the base model directly.
Terrain File
In the past, we have suggested removing the terrain file the HEC-HMS project. This is no longer needed (and can actually cause errors in HEC-HMS 4.12). HEC-HMS no longer copies terrain from the watershed folder to the forecast folder and therefore, it is safer (and a better practice) to keep your terrain file in your HEC-HMS project. Since this is for hydrology, NED 30m terrain is more than likely sufficient for model purposes.
HEC-ResSim
Spaces in Alternative Names
Although HEC-ResSim allows the use of spaces in alternative names, they are not recommended, especially if you are going to use those alternatives in CWMS. The HEC-ResSim plugin for CWMS uses a special feature called variants (separate copies of the time series mapping .fits file of an alternative) to allow an alternative to be use effectively in multiple contexts (standalone, in a CWMS forecast run, or in a WAT simulation). However, if you create more than one program order in CWMS and use an HEC-ResSim alternative with a space in its name in different forecast runs with different program orders, that alternative may not use the correct variant (.fits) file at compute time.
HEC-RAS
Avoiding Multiple Instances of HEC-RAS
If an existing HEC-RAS standalone instance is open and you open a CAVI watershed, the CAVI commandeers the HEC-RAS instance causing the existing HEC-RAS project to close immediately (terminating any ongoing computations) and opens the watershed HEC-RAS project in its place. It is recommended that you ensure all instances of HEC-RAS are closed before opening a CAVI watershed.
Proper File Storage
Ensure your base HEC-RAS model has all data necessary to run (input HEC-DSS data, terrains, projection, land use, etc.) contained within the watershed folder and verify it is referencing the correct files. A good place to store these files is in a Data directory created in the ras directory.
Boundary Conditions for 1D Storage Areas
If your model has multiple boundary conditions tied to the same 1D storage area, you must give each boundary condition a unique name. To do so, open the Unsteady Flow Data editor and from the Options menu, select Boundary Condition Names. Enter unique names for each boundary condition that is tied to the same 1D storage area in the table. From the Setup tab in the CAVI, you can now confirm that the model linking is correct for each boundary condition.
Observed Data
If observed data was configured for your HEC-RAS alternative, you may need to review and fix any broken links when updating to the latest HEC-RAS version so that the observed data can be viewed when running a forecast.
To fix the observed data links:
- Copy an example forecast.dss file that contains the observed data into the watershed's base directory.
- Edit observed data for the base HEC-RAS model in the HEC-RAS Unsteady Flow editor and use the example forecast.dss as the source file.
HEC-RAS now stores this information as relative paths, so when forecasts are created the source HEC-DSS file is the correct forecast.dss file.
HEC-FIA
Upgrading Models from Older Versions
Starting in version 3.3, HEC-FIA will not open HEC-FIA 3.0 or older projects. To update an HEC-FIA 3.0 project, first open the project in HEC-FIA 3.2.1 (or older) and save the project. Then open the project in HEC-FIA 3.3 (or newer) to complete the update.
Model Linking
Upon upgrading to a new CWMS version, it is good practice to ensure the model linking for FIA is set in base before creating new forecasts.
Testing New Forecast Runs
When a new forecast run is developed (for example a Flood Damages Reduced forecast run) it is recommended to compute a test event for the HEC-RAS and HEC-FIA alternatives in the base watershed. These computes can be completed by copying an existing forecast.dss file from a previous forecast for the watershed that has run through HEC-ResSim, and then adjusting the HEC-RAS time window as well as the flow pathnames in the Unsteady Flow Data Editor. By ensuring the HEC-RAS output is created in the base watershed (including stored depth maps), model linking can then be completed for the HEC-FIA alternative.