Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Issues related to the development of the Kisters Hydstra adapter (Deltares internal access only):

https://issuetracker.deltares.nl/browse/FEWS-16402

https://issuetracker.deltares.nl/browse/FEWS-20429

Contents

Table of Contents

Introduction

...

Download of the model adapter is not available is not available here: please e-mail to Delft-FEWS Product Management for more information.

Interface between FEWS and Hydstra

The adapter described here provides the following tasks in running Hydstra model engine from FEWS. The Hydstra adapter is developed in Java and is configured to run from the Delft FEWS configuration through a suitably configured General Adapter run. The tasks supported by the adapter include:

...

Each of the basin models that can be run through the Hydstra adapter is defined in the Hydstra Model Definition File (Model TSO file). This defines all model inputs and outputs, model structure and model parameters. The format of the file is JSON, which is loaded into the Hydstra adapter as a JSON object. While the Hydstra adapter does not interpret the full file, there are specific sections that are important. The model structure is made up of a series of nodes and links,, where each node is a modelling element of a defined type (this refers to a specific modelling algorithm such as the Synthetic Streamflow and Reservoir Routing - SSARR, or Unit Hydrograph - UH, algorithms). Links are important in this context to identify the inputs to the model as external time series are connected to the algorithms defined in the nodes though these links.

Identifying input time series to be provided from FEWS

When setting up the Hydstra model to run from FEWS, it is important to identify all expected input time series, where each time series is read from a TSF file. These are identified through the key word Source=TimeSeries. An example is provided below:

Source=TimeSeries(59.233,28.893,Text(C:\fews_systems\FEWS-Alberta\FEWS_ARFS\FEWS_ARFS\Modules\hydstra\Work\05DB006_QR.tsf),Agg)

To run the model from FEWS, the configuration must be set up that each named TSF file is exported. Note that the path to which the file is exported need not be set as the adapter when exporting the TSF file to be used by the model will set the path in the TSO file to ensure the file is found.  Note that the adapter will check that all names TimeSeries are available as a TSF file prior to the model being run. If there is a file missing then an error will be generated. Additionally the adapter also checks that all time series exported are linked to a TSF ile defined in the TSO file (with the exception of time series that are explicitly flagged as being time series pertaining to model states).

Identifying parameters and initial state values that can be changed

The Hydstra adapter allows the values of model parameters and initial state values to be changed by the user. These are changed within the node element of the Hydstra model definition file These values can be changed either through providing the value to be defined using a PI-XML parameter file, or through using a PI-XML time series of the values. To set this up, the nodes for which parameters are to be changed need to be identified, as well as the names of the parameter and/or initial state variables.  The snippet of a TSO file (in this case for a UH model) below shows an example of a node element definition.  To be able to change values in this element from FEWS, is it important to 


No Format
Node
    {
    Name="Uh_05DB006"
    Description=
        {
        Dimensionless unit hydrograph node.
        }
    ObjectColour=RGB(0,255,0)
    Location=39.032000,46.747000
    Type="DimHgraphNode"
    Symbols=
        {
        float Theta = 0.2
        const int TimeToPeak = 45
        float Area = 2253
        float Baseflow = 13.0
        int FileOutput = 0
        String NodeName = "Uh_05DB006"
        String PrecipSourceName = ""
        float Outflow = 0
        int Outflow.Quality = 255
    }