I run the following command to download data from and it didnt’t work. If a copy the URL in a browser it works. Am I doing something wrong? Is it a bug?
gmt which -G > file.txt "https://earthquake.usgs.gov/fdsnws/event/1/query.csv?starttime=2017-09-01%2000:00:00&endtime=2017-10-01%2000:00:00&minmagnitude=3&orderby=magnitude"
I get the error:
gmtwhich [ERROR]: Libcurl Error: HTTP response code said error
With the following URL gmtwhich works gmt which -G > file.txt "http://soliton.vm.bytemark.co.uk/pub/cpt-city/heine/GTS2012_epochs.cpt"
& has special meanings on Linux, so I have to enclose the URL using single quotes on Linux:
gmt which -G 'https://earthquake.usgs.gov/fdsnws/event/1/query.csv?starttime=2017-09-01%2000:00:00&endtime=2017-10-01%2000:00:00&minmagnitude=3&orderby=magnitude'
The above command can download the file correctly, but it also gives me an error:
gmtwhich [ERROR]: File query.csv?starttime=2017-09-01%2000:00:00&endtime=2017-10-01%2000:00:00&minmagnitude=3&orderby=magnitude not found
Yes, while the download works as intended (query.cvs saved in current directory) I do get the same error message. Sigh, will look - too many incoming errors on the same day that I have faculty meeting to prep for…
I didn’t investigate how it finds the beginning of the file name (probably, starts looking after last /) but it clearly does not know where it ends (how could it generically know it?). It worked silently for the cpt case because the file name was the last thing in the URL string.
I have made some changes in that code the last months(s) and this is a regression of sorts. The ? is used by both URLS and netCDF layers and once I have time to debug I will fix this.