Skip to content

Instantly share code, notes, and snippets.

@yudhastyawan
Created January 9, 2020 07:32
Show Gist options
  • Save yudhastyawan/4cfd0713ea2ee1659bd1da0a70e092ab to your computer and use it in GitHub Desktop.
Save yudhastyawan/4cfd0713ea2ee1659bd1da0a70e092ab to your computer and use it in GitHub Desktop.
Convert a *.grid file to ASCII using GMT 5 (Tracking Mode)
#!/bin/bash
inputgrd='data.grd'
start=100/-2
end=93/5
gmt project -C$start -E$end -G1 -Q | gmt grdtrack -G$inputgrd > data.xyz
awk '{print $1, $2, $4}' data.xyz > datarev.xyz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment