Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

ex17.bat 1.2 KB

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
  1. REM GMT EXAMPLE 17
  2. REM
  3. REM Purpose: Illustrates clipping of images using coastlines
  4. REM GMT modules: grd2cpt, grdimage, coast, text, makecpt
  5. REM DOS calls: del
  6. REM
  7. gmt begin ex17
  8. REM First generate geoid image w/ shading
  9. gmt grd2cpt @india_geoid.nc -Crainbow -H > geoid.cpt
  10. gmt grdimage @india_geoid.nc -I+d -JM16c -Cgeoid.cpt
  11. REM Then use gmt coast to initiate clip path for land
  12. gmt coast -R@india_geoid.nc -Dl -Gc
  13. REM Now generate topography image w/shading
  14. gmt makecpt -C150 -T-10000,10000 -N
  15. gmt grdimage @india_topo.nc -I+d
  16. REM Finally undo clipping and overlay basemap
  17. gmt coast -Q -B+t"Clipping of Images" -Ba10f5
  18. REM Put a colorbar on top of the land mask
  19. gmt colorbar -DjTR+o0.8c/0.2c+w10c/0.5c+h -Cgeoid.cpt -Bx5f1 -By+lm -I
  20. REM Add a text paragraph
  21. echo ^> 90 -10 12p 8c j > tmp.txt
  22. echo @_@%%5%%Example 17.@%%%%@_ We first plot the color geoid image >> tmp.txt
  23. echo for the entire region, followed by a gray-shaded @REMetopo5@REM >> tmp.txt
  24. echo image that is clipped so it is only visible inside the coastlines. >> tmp.txt
  25. gmt text tmp.txt -M -Gwhite -Wthinner -C+tO -D-8p/8p -F+f12,Times-Roman+jRB
  26. REM Clean up
  27. del geoid.cpt tmp.txt
  28. gmt end show
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...