Course Summary
Lesson 1 Introduction
The CHPS Configuration Focal Point has many responsibilities that includes configuring new sites, adding data from new sources, configuring modules and workflows, and overall maintenance of CHPS configuration.
CHPS configuration files are in XML format. XML stands for eXtensible Markup Language.
XML contains elements, root elements, sub (child) elements, values, and attributes.
The main set of CHPS configuration files are located in the /Config directory. All of these directoriesare synchronized.
While there is no required naming standard, as a configuration focal point, you should follow a consistent naming convention to make managing configuration files easier.
As with the naming convention, there is not a required file retention policy. The Hydrologic Support Branch, however, suggests keeping patches and releases in the /install directory (located in chps_share) for at least one year after the release.
Lesson 2 Configuration Basics
The Basic Steps to configurations are:
- Download the most recent configuration from the database.
- Export the configuration from the OC to your local file system.
- Edit the files using an XML or text editor and validate changes.
- Import the configuration from your local file system.
- Upload the configuration to the Central Database.
To acquire a copy of the latest configuration files for your SA, you can copy another user's up-to-date files using simple linux commands or copy the office's main copy of the base configuration files. To acquire a copy of the latest configuration for your OC, download the configuration into your local datastore.
Once you acquire files to edit, make sure to close CHPS before making changes. Once the changes are made, be sure that the code is "well formed" and "valid". Then restart CHPS.
Once your changes are made you upload your file(s) to the Central Database using the Configuration Manager. Make sure to set the correct version active and to use a consistent naming scheme for version control.
As creating and maintain configuration files is part of the focal point duties, deleting files is part of the job as well. Focal points should identify candidates for deletion, discuss with office members, and follow/create office policy on archive and deleting files.
Lesson 3 Configure Input Data
CHPS uses two types of data -- static and dynamic data. Static data includes location, parameter, unit and unit conversions, filters, and grid data. Dynamic data includes temperature and precipitation.
Static
- Location data references the time series data to a geographic location. All of this information is stored Locations.xml and LocationSets.xml.
- Some static data require parameters, or forecast variables, to be defined, such as discharge or stage. This information is located in the Parameters.xml file.
- Some units may need to be converted as it is imported. The conversion of units occurs due to coding within the UnitsConversionFiles directory. For example, the ImportSHEF.xml file.
- Filters make it easier to find what you need to make a forecast. You can organize filters in the Filters.xml file located in the RegionConfigFiles directory.
- Use the Grids.xml file to reference each point in a gridded time series to a location in a grid structure.
Dynamic
- When dealing with dynamic data, use the Parameters.xml file to define how many decimal places to store the data in and TimeSeriesDisplayConfig.xml for display characteristics. Reducing the number of decimal places reduces the size of the database.
- Expiry times determine how long the data remains in the database. Only keep data as long as it is needed. Smaller databases mean faster processing times and CHPS is more efficient.
- Synch levels are assigned to data to determine how often it is synchronized. Some synch levels are synchronized more frequently than others. Some synch levels are not synchronized at all.
Lesson 4 Modules
Modules are the activities or operations performed in CHPS.
There are several modules built into CHPS, but some of the most commonly used (and arguably the most important) include: Import, Export, Transformation, Interpolation and General Adapter Modules.
The standard structure of modules are:
- Request data from the data store
- Do something...
- Write data to the data store
The basic steps to configuring a module include:
- Create a module instance configuration file in the ModuleConfigFiles directory.
- Register the module in the ModuleInstanceDescriptors.xml file.
- Register parameters in ModuleParFiles (if needed).
- Register external datasets in ModuleDataSets (if needed).
- Ensure module is registered in ModuleDescriptors.xml file.
One way you can optimize CHPS using modules is to create conditional modules such as a conditional transformation module. These modules only run given a specific incident that would trigger the module.
Lesson 5 Workflows
Workflows identify specific tasks and outline the order in which they are completed.
Workflow configuration files are located in the WorkflowConfigFiles directory and are broken up into System+Preprocessing and forecast group subdirectories.
Configuring a workflow includes:
- Create a workflow file in the Workflows directory.
- Add the workflow to the WorkflowDescriptors.xml file in the RegionConfigFiles directory.
- Inspect the results in the Workflow Navigator.
Adding a module to workflow requires following the same steps outlined in Lesson 4 to creating new module. Follow those steps with:
- Add the new module to a workflow file.
- Add the model display for the forecast group to the DisplayGroups.xml file located in /SystemConfigFiles.
The Workflow Navigator shows all of the registered workflows for the entire forecast are and its associated structure.
As a configuration focal point, you can design and clean up the code within workflows to optimize performance within CHPS.
Another way to optimize performance is to create conditional workflows that only run when triggered by a situation.
Lesson 6 Troubleshooting
When troubleshooting CHPS issues, use three techniques:
- Technique 1: Maintenance
- Technique 2: Communication Strategy
- Technique 3: Working from Common to Rare Possibilities
When troubleshooting, be aware of three types of errors: user, machine, and server/program errors.
Follow troubleshooting steps when tackling each issue.
- Identify the Problem
- Isolate the Issues
- Gather Data
- Take Action
CHPS provides access to log files using many interfaces. You can use the log.txt file, the Administration Interface, System Monitor, Log Panel in the FEWS IFD, and the Workflow Navigator to view the log messages. These applications may also help you troubleshoot your issue.
To receive a more verbose log message, edit the Log4jConfig.xml file to change the priority value to DEBUG. Just make sure to change this back to INFO when you resolve your issue as this change results in huge files.
If you cannot resolve your issue or want to share with others how you found a solution, use FogBugz. FogBugz is the reporting forum used by the Hydrologic Support Branch and other RFCS to support CHPS and its users. This is also a good place to search when at the beginning of troubleshooting an issue.