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

mapbarlat.sh 1005 B

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
  1. #!/usr/bin/env bash
  2. ps=mapbarlat.ps
  3. gmt set FONT_LABEL 9p PROJ_ELLIPSOID sphere
  4. # Use sphere so we can compute scale between longitude and km exactly
  5. R=6371.0087714
  6. # Determine degree longitude at Equator that equals 5000 km
  7. dlon=`gmt math -Q 5000 $R DIV PI DIV 180 MUL 2 DIV =`
  8. gmt psxy -R-100/100/0/80 -JM6i -P -Baf -K -Xc -W0.25p,- << EOF > $ps
  9. >
  10. -$dlon 0
  11. -$dlon 80
  12. >
  13. $dlon 0
  14. $dlon 80
  15. EOF
  16. for lat in 76 70 60 45 30 10; do
  17. gmt psbasemap -R -J -Lg0/$lat+c0+f+w5000k+l"5000 km at Equator"+jTC -O -K >> $ps
  18. done
  19. gmt psxy -R -J -O -Baf -K -Y5i -W0.25p,- << EOF >> $ps
  20. >
  21. -$dlon 0
  22. -$dlon 80
  23. >
  24. $dlon 0
  25. $dlon 80
  26. EOF
  27. # Plot exact map scale with as function of latitude
  28. gmt math -T0/80/1 T COSD INV $dlon MUL = t.txt
  29. gmt psxy -R -J -O -K -: t.txt -W0.25p >> $ps
  30. gmt math -T0/80/1 T COSD INV $dlon MUL NEG = t.txt
  31. gmt psxy -R -J -O -K -: t.txt -W0.25p >> $ps
  32. for lat in 76 70 60 45 30 10; do
  33. gmt psbasemap -R -J -Lg0/$lat+c$lat+f/+w5000k+l"5000 km at ${lat}@.N"+jTC -O -K >> $ps
  34. done
  35. gmt psxy -R -J -O -T >> $ps
Tip!

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

Comments

Loading...