Created
April 10, 2017 08:21
-
-
Save emolch/9714b57f5daee441c654379e36415a71 to your computer and use it in GitHub Desktop.
How download extract and save some topography data as .grd file for GMT.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pyrocko import topo, gmtpy | |
wesn = (171., 176., -44., -40.) | |
for dem in ('ETOPO1', 'SRTMGL3'): | |
t = topo.get(dem, wesn) | |
gmtpy.savegrd( | |
t.x(), t.y(), t.data, | |
filename='topo_%s_%g_%g_%g_%g.grd' % ((dem, ) + wesn), | |
naming='lonlat') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment