Closed TobiasRosskopf closed 1 year ago
yeah, thanks for the reminder, will fix asap!
there are some tricky situations:
I am a bit unsure about the following: For interpretations such as CumulativePerTimestep and Cumulative, I am implementing that the volume will be NaN. Theoretically we could also return the sum and the last value, respectively, as the volume, but I think that would cause more confusion than be helpful?
For reference, the new implementation is as follows (taken from wiki):
Wave calculates and displays the Volume property of a time series (e.g. for GoodnessOfFit analysis or in the properties window), if a time series' unit ends with "/s", "/min", "/h" or "/d" (e.g. "m³/s", "mm/h", etc.) and its interpretation is either Instantaneous, BlockLeft or BlockRight, by integrating the values over time while respecting the interpretation. Time series with other units or interpretations only have the Sum property. NaN nodes cause the adjacent timesteps to not contribute to the volume (depends on the interpretation).
Additional technical details:
The volume of a time series is calculated in the function below:
https://github.com/bluemodel/BlueM.Wave/blob/037010d9aea669d614f9bfdf5eff9f175948d54c/source/Classes/TimeSeries.vb#L402-L429
But this will always calculate the volume with linear interpretation. If it's a time series with block interpretation the volume of its should be calculated blockwise.
Additionally the volume is just calculateted if the unit of the time series matches "/s". It may be usefull to recognize "/min", "/h", "/d" as well.
Instantenious (linear) interpretation
Block Interpretation