Skip to content

Verification of control files #119

@sivogel

Description

@sivogel

The intended behaviour of control files is as follows: If parameters are stored in a control file and have not been previously set, the parameter is automatically set to "?" in the control files. Attempting to read these control files will result in a syntax error, reminding the user to set these parameters.
But: no error will be thrown when reading control files if the parameter is set to None (in the control files this parameter is stored with empty brackets). This happens when, for example, an empty list or dictionary is assigned. The control files can be loaded without error, even if this parameterisation would result in a non-executable model.
Setting parameters of type Parameter or SeasonalParameter to empty lists or dictionaries in control files will result in arrays of zeros which could lead to unintentional parameterisation, perhaps we can add some safety mechanisms here.
Even more critical is the assignment of empty lists or dictionaries in control files to e.g. interpolator parameters, the simulation will abort without an ErrorCode.
Using model.parameters.verify() could help to catch this error for e.g. interpolator parameters like waterlevel2flooddischarge. Therefore, automatically applying verify() to the model parameters, after reading models from control files would be a good improvement.
This parameter verification issue is closely related to issue #55

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions