Coupling CWatM and IRENA FlexTool¶
Required modifications¶
A series of modifications are needed in order to operate CWatM in a loop with any other models. In this implementation, the models are run in sequence with a given time window.
New variables are introduced in the ini file used by CWatM and are readily available in the toolbox workflow basic_model.json file. If you import an existing init file, you may create these variables manually from the spinedatabase.
entity name | Parameter name | Role |
---|---|---|
FILE_PATHS | PathCombinednc | This variable defines the location where the final output is located. |
OPTIONS | loopcount | This is a boolean value that starts with the value FALSE for every new iteration |
OPTIONS | looptoolbox | Boolean to tell if you are running CWatM in a loop (TRUE) or not (FALSE). |
TIME-RELATED_CONSTANTS | RollFlexTool | Time duration of the CWatM model (D, M, Y) |
TIME-RELATED_CONSTANTS | StepFlexTool | The date for the end of the simulation |
These variables are already defined in the CWatM template and may be changed directly after importing the template.
In case an existing init file is imported into an empty database (see the import section), users must create these variables manually. The preferred way however is to first create a database with the template, then import your existing init file as all variables are already pre-defined within the template.
Some of the existing variables from CWatM need to be modified to access init values generated by CWatM