Posts

Showing posts from December, 2017

Culling data based on coastlines in GMT

Image
This is a problem that took me way too long to figure out, but it is a simple one line command. The problem arose as I was taking a finite fault solution for the Kaikoura earthquake from a different author and forward modeling the surface displacements onto a set grid of points (in my case, either 10, 20 or 40 km). From there, I wanted to invert for a possible slip model based on this new grid of 'synthetic' GPS stations, therefore, I had to exclude any stations/grid points over water. The solution for this is the gmtselect command, and its used as follows: Since my data was in a separate file (with columns lon, lat, east, north, up), I first start with the awk command within my bash script awk '{print $1, $2, $3, $4, $5}' file.txt I then add on the gmtselect command awk '{print $1, $2, $3, $4, $5}' file.txt | gmtselect -R -Di -Ns/k/s/k/s > subset.txt See, easy. The culled solutions are now in the file 'subset.txt' with the same column order

Starting Things Out

I've decided to start this page to document the various problems and solutions I encounter during standard data analysis and mapping for geophysics problems. Most of what I will share is either Python, Matlab, or GMT (the esoteric nature of GMT is particularly vexing and could be an entire  page on its own). A bit about myself, I am a Research Scientist at the Pacific Northwest Seismic Network, working on seismological and geodetic problems. I received my PhD at Scripps Institution of Oceanography in 2013 and have been at the PNSN ever since.