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

crash on "-nan" ClockDrift #69

Open
RJSLA opened this issue Apr 11, 2023 · 4 comments
Open

crash on "-nan" ClockDrift #69

RJSLA opened this issue Apr 11, 2023 · 4 comments

Comments

@RJSLA
Copy link

RJSLA commented Apr 11, 2023

The convertor dies when encountering "-nan" as the value for ClockDrift in StationXML. This results from automated StationXML creation software at fdsnws sites (such as SeisComP) when samplerate is given as 0. I have requested that the authors of SeisComP address the issue on their end, but there is no guarantee that that will resolve every case, especially if fdsnws operators are slow to update their software.
I suggest the convertor treat ClockDrift as 0 if it is found as anything other than a number.
Here's the error report:
dies with java.lang.NullPointerException
at edu.iris.dmc.seed.control.station.B052.setMaxClockDrift(B052.java:194)
Here is an example fdsnws request that will generate the problem:
https://www.orfeus-eu.org/fdsnws/station/1/query?format=xml&level=response&nodata=404&channel=*&network=OE&station=ABTA
Thanks.

@timronan
Copy link
Collaborator

timronan commented Apr 11, 2023

ClockDrift is a double type according to the StationXML schema [clockdrift] "-nan" is not a valid double value. The example document is not stationxml schema compliant. The SeisComP developers should consider excluding the optional ClockDrift field rather than generating an invalid stationxml document.

We will discuss adding this enhancement in the next stationxml-seed-converter release. Thank you for posting this issue.

@RJSLA
Copy link
Author

RJSLA commented Apr 11, 2023

Thanks for checking that. I did not check first if '-nan' was a valid XML double, and I now see it is not, only 'NaN' would be. Therefore, it looks like SeisComP not only produced an unhelpful ClockDrift, but failed to render NaN correctly. However, neither '-nan' nor 'NaN' is helpful as a ClockDrift value. The developers of SeisComP did tell me they would address that general issue, but I did not specifically ask about '-nan' vs 'NaN'.

@timronan
Copy link
Collaborator

Thanks for this additional information. Let us know if the SeisComP developers get to this issue. I will keep you updated on future stationxml-seed-converter releases.

@RJSLA
Copy link
Author

RJSLA commented Apr 12, 2023

I received this from Jan Becker:
The StationXML standard even required ClockDrift to be >= 0 if set. I have fixed the issue in SeisComP and an invalid ClockDrift will be omitted from the XML.

Of course, it may be some time before network and data center operators update SeisComP at their sites.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants