In CWMS, scripts provide a way to automate a prescribed set of actions with a simple click of a button. Scripting simplifies user operation, ensures repeatability and consistency of results, reduces time required to generate results, and permits scheduled operations in the future.

CWMS uses the Jython scripting language. Jython is a special implementation of the Python scripting language that is able to interact with programs written in Java.

Some example uses of scripting in CWMS: 

  • Running an existing forecast with one or more alternatives with a single button click (replacing many mouse clicks with one).
  • Creating a new forecast based on the current time, and running it with one or more alternatives.
  • Scheduling an action, such as creating a new forecast sometime in the future (possibly on a recurring basis).
  • Working with a mixture of HEC-DSS files and the CWMS database.