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

Add new module under "seis" to read seismicity files stored with the ISF format #8552

Merged
merged 4 commits into from
Jul 26, 2024

Conversation

joa-quim
Copy link
Member

No description provided.

@joa-quim
Copy link
Member Author

Ah, the module name "gmtisf" is, ofc, open to discussion.

@joa-quim joa-quim requested a review from a team July 24, 2024 21:07
@Esteban82
Copy link
Member

Do you have a test file?

I try it with this file: https://download.isc.ac.uk/isf/bulletin/2020/202001.gz

When I use:

gmt isf *.isf -R-15/0/30/45
I got a file like this with 560 records.

-2.3599998951	36.9799995422	0	3.70000004768	2020	1	1	9	9
-3.06480002403	42.9123001099	0	1.20000004768	2020	1	1	12	16
-8.3109998703	37.5	6.09999990463	0.10000000149	2020	1	1	12	45
-7.43499994278	36.5089988708	14.6000003815	1	2020	1	1	13	11
-4.51800012589	32.891998291	7.19999980927	1.29999995232	2020	1	1	14	48
-13.404999733	36.952999115	68.1999969482	2.09999990463	2020	1	1	15	18

But when I try to use -D I got an empty file. I think there is something wrong here.

gmt isf 202001.isf -R-15/0/30/45 -D2020-01-01/2020-01-02

@Esteban82
Copy link
Member

I wonder if would be good to add a link with the explanation of the isf format (in the rst file).

Maybe this one? https://download.isc.ac.uk/isf/isf_ext.pdf

@seisman
Copy link
Member

seisman commented Jul 25, 2024

Are you sure you want to add this?

  1. The seismological community already has the ObsPy package for reading the ISF format.
  2. The ISF format itself is also complicated (https://www.isc.ac.uk/standards/isf/) with different versions (ISF1.0, ISF2.0, ISF2.1).
  3. ISC provides bulletin in inconsistent ways. For example, the ISC Bulletin provides ISF files while ISC-EHB Bulletin provides RES and HDF formats.
  4. For each Bulletin, ISC implements the standard web service (https://www.isc.ac.uk/fdsnws/event/1/) to search for earthquakes and the output can be in QuakeML (the current standard format in the seismological community) and CSV format.

@joa-quim
Copy link
Member Author

Well, I think yes.

1- ObsPy is ... Python
2- Don't know exactly the consequences of that. Does it mean that not all versions will be readable by this code?
3- Just tried the ISC-EHB Bulletin and it found me 3 events in a 4 year period over an area of 20x10 degrees and the output was in a web page, not in HDF.
4- This is a different option, good for quick queries but not good for large downloads. It's very slow and:

  • The CSV version has columns with almost no data. GMT fails (no error but looses data) here because it finds that lines have not the same number of columns. A GMT limitation but a one very boring and time consuming to fix.
  • GDAL cannot read QuakeML file.

So, unless the HDF, that I did not find how to get, works well, yes I still want to add this.

@joa-quim
Copy link
Member Author

But when I try to use -D I got an empty file. I think there is something wrong here.

gmt isf 202001.isf -R-15/0/30/45 -D2020-01-01/2020-01-02

Yes, there is a bug in the time filtering.

@joa-quim
Copy link
Member Author

Fixed the date filter bug.

@Esteban82
Copy link
Member

Fixed the date filter bug.

I try it. Now I got an output but it seems to me that there was NO filtering. I got the same 560 records that before.

@joa-quim
Copy link
Member Author

Damn it. I can't be so complicated. Done another fix.

Copy link
Member

@Esteban82 Esteban82 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now looks it is working. Also, the -F seems to be working fine.

@joa-quim joa-quim merged commit 586699f into master Jul 26, 2024
15 of 18 checks passed
@joa-quim joa-quim deleted the gmtisf branch July 26, 2024 10:49
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

Successfully merging this pull request may close these issues.

3 participants