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

WL_example_2.sh 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
35
36
37
38
39
40
41
42
43
44
45
46
  1. #!/usr/bin/env bash
  2. #
  3. # Bourne shell replica of GMT/MEX example 2 (Japan trench)
  4. # This is Figure 3 in Wessel & Luis, 2017
  5. # Need JP.txt which we replicate here
  6. #
  7. cat << EOF > JP.txt
  8. # Trace of the Japan Trench
  9. 143.0175 36.3400
  10. 143.1533 36.5193
  11. 143.2774 36.6477
  12. 143.4073 36.8615
  13. 143.5182 37.0583
  14. 143.6350 37.2884
  15. 143.7445 37.4783
  16. 143.8438 37.7106
  17. 143.8891 37.9295
  18. 143.9299 38.1662
  19. 143.9737 38.3595
  20. 144.0161 38.5352
  21. 144.0628 38.7093
  22. 144.1197 38.9092
  23. 144.1869 39.1233
  24. 144.2044 39.3741
  25. 144.2380 39.5575
  26. 144.2263 39.7673
  27. 144.2540 39.9282
  28. 144.2818 40.0686
  29. 144.3285 40.2042
  30. 144.3985 40.3674
  31. 144.4803 40.5503
  32. 144.6117 40.7204
  33. EOF
  34. gmt begin WL_example_2 ps
  35. gmt grdcut @earth_relief_01m -R135/150/30/45 -GJP.nc
  36. gmt grdtrack JP.txt -GJP.nc -C300k/1k/25k -Sm+a+sstack.txt > profiles.txt
  37. gmt convert -Ef -T profiles.txt > area.txt
  38. gmt convert -El -T -Is profiles.txt >> area.txt
  39. gmt makecpt -Cearth -T-10000/4000
  40. gmt grdimage -R141/147/35/42 -JM6i -Baf JP.nc -I+a45+nt0.2
  41. gmt coast -W0.25p -Dh
  42. gmt plot -Ggreen@75 area.txt
  43. gmt plot -W1p JP.txt
  44. gmt plot -W0.25p,red profiles.txt
  45. rm -f JP.*
  46. gmt end show
Tip!

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

Comments

Loading...