Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interpretation of WEL files #113

Open
TobiasRosskopf opened this issue Aug 10, 2023 · 3 comments
Open

Interpretation of WEL files #113

TobiasRosskopf opened this issue Aug 10, 2023 · 3 comments
Assignees
Labels
enhancement New feature or request question Further information is requested

Comments

@TobiasRosskopf
Copy link
Member

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

'Series in a WEL file are always interpreted as BlockRight, with the exception of volume
If ts.Title.EndsWith("_VOL") Then
ts.Interpretation = BlueM.Wave.TimeSeries.InterpretationEnum.Instantaneous
Else
ts.Interpretation = BlueM.Wave.TimeSeries.InterpretationEnum.BlockRight
End If

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)

@TobiasRosskopf TobiasRosskopf added enhancement New feature or request question Further information is requested labels Aug 10, 2023
@jamaa
Copy link
Member

jamaa commented Aug 10, 2023

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
Copy link
Member

jamaa commented Aug 10, 2023

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

If Zeile.StartsWith("$") Then
'Kommentarzeile
'TODO: store comments as metadata
Continue Do

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 jamaa mentioned this issue Sep 23, 2023
@jamaa
Copy link
Member

jamaa commented Sep 23, 2023

To get back to the original question:

  • The current implementation sets the interpretation of series read from WEL files according to what is defined by Talsim
  • It is not entirely clear what the interpretation of WEL files output by BlueM.Sim is (where did you even get the info in your table at the top, @TobiasRosskopf ?)
  • If we can clarify what interpretation(s) BlueM.Sim WEL files use, I would be happy to to implement it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants