Add support for netCDF4 and padding with NaN values. #77
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
By default, the NetCDFReporter does zero oder hold for reported ports with a lower data rate. If we set the reportOnlyNewdata flag of the reporter, its fills the missing values with some funny, arbitrarily high values (for float and double that is 9.9692099683868690e+36 as defined in netcdf.h). This totally destroys any visualisation.
The newer NetCDF4 format supports defining a different placeholder value (e.g. NaN would make more sense and is something that most visualisation software supports).
This patch adds a flag to the NetCDFReporter to switch to the newer netCDF4 format. Then missing values are automatically padded with NaN. netCDF4 does not allow shared access to the .nc files any more (this is why we still support the old format).