GenericMappingTools / gmt-for-geodesy

Material for the annual GMT for EarthScope short course
35 stars 16 forks source link

URL query downloads linger #35

Open PaulWessel opened 1 year ago

PaulWessel commented 1 year ago

When I get the earthquake data from NEIC I run something like this

gmt convert ${URL} -i2,1,3,4+s50,0 -hi1 > 3_quakes.txt

where URL is built by the 3_get_quakes.sh script and is

https://earthquake.usgs.gov/fdsnws/event/1/query.csv?starttime=2018-01-01%0000:00:00&endtime=2018-12-31%0000:00:00&minmagnitude=5&orderby=time-asc

What happens is that we receive a query.csv file which gmt convert reads and converts as indicated. However, query.csv remains in the directory. Anyone who thinks that is bad and that we should find a way for GMT (here gmt convert) to delete it at the end?

Esteban82 commented 1 year ago

I think that should be optional to remove the data. I would prefer to keep the data.

BTW, I have modified your script to allow to filter by region https://github.com/Esteban82/FCEN-2022/blob/main/2_NuevosEjercicios/Sismos/Get_Quakes_USGS_2.sh

PaulWessel commented 1 year ago

Yep, I have done that too for regions. OK, we will leave the URL query file as is.

Esteban82 commented 1 year ago

Great. I wanted to add a way to avoid getting a bad request in the cases when the search limit of 20000 is excedeed.