Skip to content

Navigating the workflow

1. Import of the calibration .ini file into the database

wf1

The calibration init file is the typical CWatM ini file that is given in the tutorials. You can re-link the file depending on where you have installed your CWatM copy. The purpose of this process is to populate the ini file entities, parameters, and parameter values into the spine DB interface. All parameters can further be modified once imported into the database. If the calibration init file is modified, a warning -❗- will be displayed on the first tool meaning that the file needs to be relinked. In this case, just drag and drop the file from the Available resources to the Tool arguments. The first tool converts the init file into a valid toml file that is standardised and can easily be imported into the SpineDatabase.

wf1

The parsing of the formatted toml file is then done and nothing should be changed unless the user changes the name of the SpineDB database in the workflow, in which case the input data needs to be re-linked as well as previously shown.

2. Resetting the database

wf2

Warning

This second section is to be used cautiously. This resets the database by deleting all its components except the Base alternative. The entities inside the Base alternative are removed and only the Base alternative remains empty.

reset_DB

By default, the second argument is set to false, which does not reset the Spine Database and just bypasses the whole tool. In case one would like to reset the entire database, set the second argument to true and the entire Spine Database will be reset.

3. Import CWatM .ini files

wf3

The third section Imports your working CWatM ini file. In essence, you would not need both connectors but for the sake of clarity, two data connectors are placed in the workflow. The first data connector defines the basic format of CWatM using the setting_CWatM_template_30min.ini file distributed by CWatM. The second data connector is used to populate any .ini file that is generated by the user. In both cases, ensure that the paths to the ini files are correct in the *Data Connection Properties window.

Attention

In the first tool, the original ini file is being converted into a valid toml file. Ensure that the file you want to use is the one you want to import in the Spine Database.

4. The Spine Database

This is the central database, also called the Spine Database, where all the data are stored. Alternative and Scenario can be created manually and if any data needs to be changed, added, or add new main section in the .ini files can be done from the database. When double clicking on database, it will open the Spine Database interface that would look like somewhat similar to what is shown below.

wf4

The Entities are shown on the left-hand side of the table. By selecting the entity, only the parameters from the selected entity will be displayed

Tip

Pay special attention to the FILE_PATHS entity as this is the one that will vary between the different alternative e.g. meteo files for the 30-arcmin or 5-arcmin spatial resolution

Tip

When importing a new CWatM ini file into the database, the workflow does not compare existing values with the new ones, therefore a lot of parameters may be duplicated compared to the Base alternative. These Parameters can be deleted. It will make the Spine Database easier to read and maintain over time if multiple ini files are imported into the database.

5. Run your calibration

Export the database for the calibration and run the calibration. It exports 2 **.ini* files: one for the calibration setup and one for the CWatM model that needs to be calibrated. The arguments from the Tool properties do not need to be updated as they are set for the model. The outputs from the calibration are then exported and setup from the best alternative is imported back into the database under the alternative "best_calib". This section can be run as is. However, by clicking the first arrow, ensure you have created a calibration and a calibration_ini scenario. The first one includes all the parameters from the Base and the calibration alternatives to build a readable ini file by CWatM and run the calibration. The second one only includes the calibration setup required by the calibration tool.

wf5

6. Run CwatM as a standalone process

Run a regular CWatM flow. This is done from the database and can be run in sequence from the calibration set up. By clicking the yellow arrow before the export tool, one can choose which scenario to run into CWatM.

wf6

7. Model coupling CWatM + IRENA FlexTool

With this section, it is possible to run the CWatM model in junction with IRENA FlexTool. The main workflow here is to be able to set a rolling period where the hydrology model is run and then pass the results to IRENA FlexTool. Extra steps to setup the IRENA FlexTool model are required and are explained in section (Soon to come)

wf7