bluemodel / BlueM.Wave

Wave is a tool for displaying, analyzing and importing and exporting time series.
https://wiki.bluemodel.org/index.php/BlueM.Wave
GNU Lesser General Public License v3.0
4 stars 2 forks source link

Interpretation of WEL files #113

Open TobiasRosskopf opened 1 year ago

TobiasRosskopf commented 1 year ago

Since Wave version 1.6.2 (commit 4d4712e) nearly all time series in WEL-files are interpreted as block right (except title includes "_VOL"):

https://github.com/bluemodel/BlueM.Wave/blob/037010d9aea669d614f9bfdf5eff9f175948d54c/source/FileFormats/WEL.vb#L207-L212

Why is there a differation between volume curves (from BlueM.Sim) and everything else?

Could it be an enhencement to catch up multiple curve types from BlueM.Sim (and maybe other simulation models) and map it to the diffrent interpretation types?

Such as:

curve type unit appendices (BlueM.Sim) interpretation
(presipitation) heights mm _NIE, _NEF, _ETP, _IZP, _TRA, _EVA, _ETA, _SCH blockright
temperature °C _TEM instantaneous
soil moisture mm/m _BOF instantaneous
discharge m3/s _QOB, _QBA, _QIN, _1AB, _1ZU instantaneous
water level m _WSP instantaneous
velocity m/s _ v instantaneous
volume m3 _VOL instantaneous
everything else - undefined

(Maybe uncomplete)

jamaa commented 1 year ago

The current implementation of how WEL series are interpreted actually corresponds to how Talsim calculates/outputs its results. All results are the average for the timestep, except for volume, which is instantaneous for the timestamp (don't ask me why). Are you sure BlueM.Sim is different?

jamaa commented 1 year ago

Actually it does seem to be different for BlueM.Sim:

Die Interpretation der ausgegeben Ganglinien variiert mit dem ausgegebenen Wert. So gilt z.B. für Temperatur und Abfluss die Interpretation "Block rechts", für Niederschlag und Verdunstung aber "Summenlinie pro Zeitschritt".

https://wiki.bluemodel.org/index.php/WEL-Format_(BlueM)

Unfortunately the information in the wiki is incomplete. Do you know more? We would have to figure out a way to distinguish BlueM WEL files from Talsim WEL files in order to implement this though.

maybe other simulation models

Unfortunately interpretation is often neglected when storing time series (and also in model documentation!), most file formats do not even support specifying it. But whatever we can find out should also be added to Wave. Let me know if you have any info.

For example, I have seen $ib Funktion-Interpretation: Summenlinie in the header of UVF files, but I have never been able to find any specification for this. I have the impression that only some software adds this kind of information (I don't even know which software), basically in the form of a comment, and we would be guessing on how exactly to read it. So until now, it has been ignored. There is a TODO in the code to at least store these comments as metadata, but I'm not sure how useful that would actually be to anyone https://github.com/bluemodel/BlueM.Wave/blob/037010d9aea669d614f9bfdf5eff9f175948d54c/source/FileFormats/UVF.vb#L143-L146

Because of this and other issues with file formats, I have sometimes even thought about defining a new time series file format, but you know how it is with standards :-) https://xkcd.com/927/

jamaa commented 12 months ago

To get back to the original question: