{sections}

 

{lessontitle}

4.2 Module Definition

Modules are the activities or operations performed in CHPS. Modules appear within workflows (which are discussed in Lesson 5) and have a standard layout.

The Standard Layout

Most modules have a standard structure similar to the one illustrated below. Module structure

  1. The processing begins with a request of a specific set of data from the database as one or more input time series sets. Click here for more information on time series sets.
  2. The data is transformed using the module's functional items (i.e. interpolation, import, etc.).
  3. One or more output time series sets are used to store the data in the database under a unique id.

Note: The unique id, a unique module instance name, is defined by an instance of a module.

Module Descriptors

click hereModule Descriptors tell CHPS the module name and how it will run.

Java classes implement the workflow plug-in interface to CHPS.

The Module Descriptors define what Java classes will run each module and assign a recognizable name for the module.

Java classes are file libraries that load the Java applications associated with CHPS.

close

Define the modules in the ModuleDescriptors.xml file in the SystemConfigFiles directory.

close

Data processed or stored in CHPS is time series data in various formats. This data is handled using time series sets. Time series sets are useful for retrieving and displaying data.

Attention: This use of the word “sets” is NOT like location sets. It does not mean a group of something.

What are Time Series Sets?

time series set exampleA time series set is like a query that runs against the database. It contains all of the keys and flags uniquely identifying the set of data retrieved.

Any module in CHPS requiring data from the database or producing data stored in the database does so using time series sets. Time series sets also display time series plots.

Time series sets show up in multiple types of configurations (i.e. modules, displays, filters, etc.) and files, but the basic configuration of the time series set remains nearly the same.

Time Series Set Elements

Time series sets have required elements. If any of the required elements are omitted, the validation of the particular configuration file will fail. The list below describes the required elements.

  • moduleInstanceId -  the id of the specific module instance or module instance set that has written the time series data (i.e. module instance configuration files in ModuleConfigFIles).
  • valueType - the time series data type scalar, vector, longitudinal profile, grid, polygon, sample, or rating curve
  • parameterId - parameters of the time series data (This id is cross referenced in Parameters.xml to make sure it has been registered there.)
  • locationSetId - defines the location for which the time series data is gathered and/or displayed ( Multiple locations maybe referenced using the location set id.)
  • timeSeriesType - the time series type: external forecasting, external historical, simulated forecasting, or simulated historical
  • timeStep - the time step of the time series data (Its attributes include unit [second, minute, or, etc], multiplier/divider [defines the number of units].)
  • timeZone - the time zone of time series (Only relevant if units are for a day or longer.)

close

Module Instances

Now that you assigned a name and defined the Java class to run the module, you need to further specify what you want the module to do and what data to use.

click hereModule Instances must include the:

  • input data
  • output data
  • data processing steps
  • and the unique module instance name (from the ModuleDescriptors.xml file)

The module instance files are stored in the ModuleConfigFiles directory.

 

No single XML file defines a module instance. Instead, files are typically grouped in subdirectories based on segment, although grouping by process (import, preprocessing, etc.) is also acceptable.

close

The Link

click hereAll modules must be present (registered) in the ModuleInstanceDescriptors.xml in order to run!

The file, located in the RegionConfigFiles directory, links instances of the module in a workflow to a registered module type.

 

Module Instance Sets (optional)

click hereReduce the number of calls to module instances by grouping similar module instances into Module Instance Sets.

Group Module Instances either by location or module type.

The ModuleInstanceSets.xml file is located in the RegionConfigFiles directory.

 

Reference: For more details on configuring modules, please refer to the Deltares DELFT-FEWS Configuration Guide Configuring Available DELFT-FEWS Modules.