Skip to content

Skip NaN-records in seis and geodesy due to unrecognized header records - #5427

Merged
PaulWessel merged 1 commit into
masterfrom
suppl-hardening
Jul 3, 2021
Merged

PaulWessel merged 1 commit into
masterfrom
suppl-hardening

Conversation

@PaulWessel

Copy link
Copy Markdown
Contributor

See this report for background. The old read-loop in the meca supplement codes (now seis with psvelo in geodesy) did not have any protection against non-GMT header records which will give x and y as NaN. This PR adds that check to avoid junk plotted at BL corner.

THe old read-loop in the meca supplement codes (now with psvelo in geodesy) did not have any protection against non-GMT header records which will give x and y as NaN.  THis PR adds that check to avoid junk lotted at BL corner.
@PaulWessel PaulWessel added the bug Something isn't working label Jul 3, 2021
@PaulWessel
PaulWessel requested a review from seisman July 3, 2021 20:53
@PaulWessel PaulWessel self-assigned this Jul 3, 2021
@PaulWessel

Copy link
Copy Markdown
Contributor Author

Not out of the woods just yet. I decided that it would be better if GMT i/o could pick up these as headers without the required leading # sign and added some code to catch cases where we found text and all "columns" were read as NaNs - that is clearly text. All tests passed with that, except pssac_geo.sh. The reason has to do with the file station.list which violates the GMT directive of numerical values followed by trailing text, since it has a text in the first column and lon, lat next to it; it should be lon lat name.

While I need to do some more work on my checking (since this file should not really say we found 3 Nans only 1), I wonder if the station.list can be changed (and hence the script - take out the -i) or if this is some old convention from elsewhere that we cannot change?

The plan is that once this work generally across GMT we can revert those module-specific fixes in seis and geodesy since those records would be correctly flagged as header records and then normally skipped

@PaulWessel

Copy link
Copy Markdown
Contributor Author

OK, so I am relearning that the station.list file has a certain format [ []]. Not sure how we wish to handle this for psxy then, since the input file actually starts with trailing text.

@PaulWessel

Copy link
Copy Markdown
Contributor Author

Solution was to only do the hard check with no -i. A PR will be coming soon.

@PaulWessel PaulWessel mentioned this pull request Jul 4, 2021

This branch was previously deployed

1 inactive deployment
Preview — 27036b08 Deployed Jul 3, 2021 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants