Closed adrien-ga closed 6 years ago
I see two ways to make the input files a bit more flexible:
In the case of the depth output, the first line could contain the flag 'depths' or 'interval' to specify what kind of information follows below.
If the user specifies 'depths' and only provides one number, this is the only depth written to the output. If the user specifies 'interval' and still provides a list of numbers, this could either interpreted as an interval pattern that is repeated to the bottom of the lake or it results in a warning that only the first value is used.
Solved. Output times and depths can be specified in the par-file (which is in json): A single number (integer or double) is interpreted as interval and a vector (specified by []) even with only a single value is directly interpreted as output value. Additionally, you can still specify the path to separate files in the json file to ensure backwards compatibility.
If there's a single number x in the output depths file, Simstrat understands "write output every x meters". Should there be a possiblity to output a single depth out? For instance if the value is zero or negative? Can be useful for calibration purposes / when simstrat is run from a script.