Eawag-AppliedSystemAnalysis / Simstrat

Simstrat - 1D lake model
http://www.eawag.ch/en/department/surf/projects/simstrat/
GNU General Public License v3.0
18 stars 8 forks source link

Impossibility to output a single depth #15

Closed adrien-ga closed 6 years ago

adrien-ga commented 6 years ago

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.

zimmermm commented 6 years ago

I see two ways to make the input files a bit more flexible:

  1. all input files come in JSON format
  2. the first line of an input file is reserved for keywords that define the type/structure of the input file

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.

f-baerenbold commented 6 years ago

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.