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_cart.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, Cartesian version
  3. # Also try +r for right-side only
  4. gmt begin crosstrack_cart ps
  5. # Fake Cartesian grid
  6. gmt set PS_MEDIA letter
  7. gmt grdmath -R-10/10/-5/5 -I0.1 X Y MUL = cart.grd
  8. gmt subplot begin 3x1 -Fs14c/7c -Sc -Srl -A -T"Cartesian cross-tracks"
  9. gmt subplot set 0 -A"No deviation"
  10. # Sample it along profiles orthogonal to the line y = 0
  11. gmt grdtrack -Gcart.grd -C8/0.1/1 -E-7/0/7/0 -Dline.txt > cross.txt
  12. # Plot it
  13. echo -9 0 9 0 | gmt plot -Jx? -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"
  17. # Sample it along profiles with 30 degree deviation to the line y = 0
  18. gmt grdtrack -Gcart.grd -C8/0.1/1+d30 -E-7/0/7/0 -Dline.txt > cross.txt
  19. # Plot it
  20. echo -9 0 9 0 | gmt plot -Jx? -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, right side only"
  25. gmt grdtrack -Gcart.grd -C8/0.1/1+d-30+r -E-7/0/7/0 -Dline.txt > cross.txt
  26. # Plot it
  27. echo -9 0 9 0 | gmt plot -Jx? -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...