gmt-for-geodesy
gmt-for-geodesy copied to clipboard
URL query downloads linger
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?
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
Yep, I have done that too for regions. OK, we will leave the URL query file as is.
Great. I wanted to add a way to avoid getting a bad request in the cases when the search limit of 20000 is excedeed.