Note: This is documentation for version 5.4 of Source. For a different version of Source, select the relevant space by using the Spaces menu in the toolbar above

IQQM Network Converter

Plugin was written by Hong Zhang (Unlicensed) (Queensland Government Department of Science, IT, Innovation and the Arts) and Geoff Davis from eWater, with help from gpodger (Unlicensed) at CSIRO. Robert Carr (Deactivated) from eWater has also contributed significantly with detailed functionality design and testing through project funds provided by AUSAID to pilot Source with the Mekong River Commission.

General Info

LicenseAs-is, use at your own risk
Typefree
Current version2.0

Plugin Description

(warning) Note: May not work on 32bit machines.

The plug-in will convert an INTEGRATED QUANTITY-QUALITY MODEL (IQQM) river system network to its Source formatted counterpart. It will generate the river system network under the schematic and geographic views, and then load the necessary input files for the generated node-link network. It requires an IQQM system file as input (format: xxxxxx.sys), and an optional input file for node coordinates (format: xxxxxx.COO). If the coordinate file is not provided, the plug-in will build the river network as a linear river system.

For details on progress please see: IQQM Conversion Jira Issues

The plugin functions as follows:

  1. Load the IQQM system file and check for errors;
    The original IQQM network is reformatted as there are significant differences between IQQM and Source networks (see the notes below).

  2. Build the river system network;
    The node-link network is displayed in the schematic editor. If the user specified a coordinate file, a spatial view of the network can also be displayed in the geographic editor.

  3. Load the IQQM input files.
    The original IQQM input files are converted to CSV/XML format using the csvidx application so that Source can import them. These include flow files, rainfall files, evaporation files, and crop files etc. 

  4. Configure Source node and link parameters.

The following table shows the node types which can be built automatically through the plug-in:

IQQM node name

IQQM node type

Source node type

Source node name

Gauge

0.0 0.1 0.2

0

Gauge

Inflow

1.0-1.3     

1

Inflow

Effluent off-take

4.0-4.1

4

Loss/controlled Splitter

Storage

2.0-2.2; 2.5-2.6

2

Storage

Confluence

11.0

11

Confluence

Irrigation demand

8.0-8.7        

8

Supply Point

Fixed Demand

/Demand/Thermal power station

3.0-3.5; 3.9

3

Supply Point

Minimum Flow

9.0-9.2

9

Minimum Flow Requirement

Effluent return

5.0-5.1

5

 

Combinations of Controlled Splitter, Confluence and Lagged Flow Routing

N/A

            N/A

20

Water User

Maximum flow

9.4

94

Maximum Order Constraint

Wetland

10.0-10.3

10

Wetlands Hydraulic Connector

(Storage part is still in progress)


 

The plugin can load:

  • inflow time-series data for inflow nodes;
  • loss factor files for loss nodes;
  • monthly or daily pattern files (under Function Editor) for minimum/maximum flow nodes; and 
  • the input files associated with storage nodes, which include:
    • precipitation and evaporation time series files;
    • storage dimension files (level-volume-surface area relationship);
    • storage detail files (full storage volume, initial storage volume and interactive storage volume);
    • spillway curve and valve curve files to set up the outlet paths.
  • the input files associated with selected water user nodes, which corresponds to IQQM node type 3 for town water supplies and industrial demands. 
    • Monthly or Daily Pattern Demand (under Function Editor) has been set up.
  • the input files associated with selected water user nodes, which corresponds to IQQM node type 8 for irrigation demand.
    • IQQM Crop Demand Model has been set up;
    • Irrigator Demand Model has been partially set up;
    • precipitation and evaporation time series files;
    • Return flow parameters;
    • Crop files and parameters.
  • The input files associated with effluent off-take and return nodes, which corresponds to IQQM node type 4 and 5.
    • Maximum and minimum effluent data have been set up;
    • Lagged Flow Routing has been set up;
    • Other effluent parameters.

The functionality for loading the input files for other nodes is currently under development (February 2014).

Using the plugin

The plugin consists of two major parts: Fortran part and C# part (and now they have been merged into one package). Fortran part uses the csvidx application to convert the IQQM input files to a CSV/XML format. csvidx is originally a standalone Fortran application that was developed by   gpodger (Unlicensed). We have modified Geoff's code so that the output can be read directly by Source. The modified version is distributed with the plugin. 

To convert the input files, csvidx requires the IQQM system file and all of the associated input files to be stored in the same directory. For more details about the CSV and XML files, see the Notes table (below).

In order to use the plugin, you need to load the plugin library (IQQMNetworkConverter.dll) and follow these steps:

  1. Open Source. Click "Tools" -> "Plugin Manager" -> "Add...". Then load the plugin dll file "IQQMNetworkConverter.dll"

  2. Click "File" -> "New" -> "Scenario...";

  3. Choose  the "IQQM Network Converter Form" scenario option, then click "OK";



  4. Specify the IQQM system file and select (tick) the input files you wish to load. Disabled options haven't yet been implemented or have to be done.
    For example, tick the option "Run Fortran code ..." if you want to run fortran part.


     

  5. Click "Create Network"; 

  6. Notes are added to each Node / Link (with routing) to show what came from the original IQQM file:


  7. Check to see that the input files were successfully loaded.



  8. Configure and run the simulation.

 

      Notes:

  1. The IQQM network must be reformatted to enable IQQM nodes to be mapped to Source nodes. In some cases there is not a straightforward mapping between IQQM and Source nodes. For example, the fixed/irrigation demand node in IQQM is mapped to an "extraction node pair" consisting of a “Supply Point” node and a  “Water User” node in Source.
  2. Source requires all nodes to have a unique name. Consequently the plugin renames nodes in the IQQM network to avoid duplicate names. In addition, symbols such as “/” and "," are removed from nodes names as they cause problems when loading data from CSV files (the special symbols are replaced by other symbols).  

Source Code

The plugin source code is available in the Source Community repository: http://hg.ewater.com.au/SourcePlugin.IQQMNetworkConverter