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

crosstrack_geo.sh 1.3 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
  1. #!/usr/bin/env bash
  2. # Test non-orthogonal modifier +d in -C for grdtrack, geographic version
  3. # Also try +l for left-side only
  4. gmt begin crosstrack_geo ps
  5. # Fake geographic grid
  6. gmt set PS_MEDIA letter
  7. gmt grdmath -R-10/10/-5/5 -I0.1 -fg X Y MUL = geo.grd
  8. gmt subplot begin 3x1 -Fs14c/7c -Sc -Srl -A -T"Geographic cross-tracks"
  9. gmt subplot set 0 -A"No deviation"
  10. # Sample it along profiles orthogonal to the line y = 0
  11. gmt grdtrack -Ggeo.grd -C800k/50k/100k -E-7/0/7/0 -Dline.txt > cross.txt
  12. # Plot it
  13. echo -9 0 9 0 | gmt plot -Jm? -Sv12p+s+e+p0.5p -Gred -W0.5p,-
  14. gmt plot line.txt -W3p
  15. gmt plot cross.txt -W1p
  16. gmt subplot set 1 -A"+30 deviation, left-side only"
  17. # Sample it along profiles with 30 degree deviation to the line y = 0
  18. gmt grdtrack -Ggeo.grd -C800k/50k/100k+d30+l -E-7/0/7/0 -Dline.txt > cross.txt
  19. # Plot it
  20. echo -9 0 9 0 | gmt plot -Jm? -Sv12p+s+e+p0.5p -Gred -W0.5p,-
  21. gmt plot line.txt -W3p
  22. gmt plot cross.txt -W1p
  23. # Sample it along profiles with -30 degree deviation to the line y = 0
  24. gmt subplot set 2 -A"-30 deviation"
  25. gmt grdtrack -Ggeo.grd -C800k/50k/100k+d-30 -E-7/0/7/0 -Dline.txt > cross.txt
  26. # Plot it
  27. echo -9 0 9 0 | gmt plot -Jm? -Sv12p+s+e+p0.5p -Gred -W0.5p,-
  28. gmt plot line.txt -W3p
  29. gmt plot cross.txt -W1p
  30. gmt subplot end
  31. gmt end show
Tip!

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

Comments

Loading...