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

gview_caps.sh 912 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
  1. #!/usr/bin/env bash
  2. # Testing a S polar cap using -JG in a variety of views
  3. ps=gview_caps.ps
  4. gmt grdmath -R0.5/6.5/0.5/9.5 -I1.5 XCOL 36 MUL 72 SUB = lat.nc
  5. gmt grdmath -R0.5/6.5/0.5/9.5 -I1.5 YROW 50 MUL 5 ADD = lon.nc
  6. gmt grd2xyz lat.nc > lat.txt
  7. gmt grd2xyz lon.nc > lon.txt
  8. gmt convert -A lon.txt lat.txt -o0:2,5 > tmp.txt
  9. gmt pstext -R0/8.5/0/11 -Jx1i -P -Xa0 -Ya0 -K -F+f10+j -N << EOF > $ps
  10. 1.25 0.45 CT 72S
  11. 2.75 0.45 CT 36S
  12. 4.25 0.45 CT 0
  13. 5.75 0.45 CT 36N
  14. 7.25 0.45 CT 72S
  15. 0.45 10.25 RM 5E
  16. 0.45 8.75 RM 55E
  17. 0.45 7.25 RM 105E
  18. 0.45 5.75 RM 155E
  19. 0.45 4.25 RM 155W
  20. 0.45 2.75 RM 105W
  21. 0.45 1.25 RM 55W
  22. EOF
  23. while read x y lon lat; do
  24. gmt pscoast -Rd -JG${lon}/${lat}/1.45i -Glightgray -Xa${x}i -Ya${y}i -O -K -A50000 -Dc >> $ps
  25. gmt psxy pol_S.txt -Rd -J -Gred -Xa${x}i -Ya${y}i -O -K >> $ps
  26. gmt psxy pol_N.txt -Rd -J -Gblue -Bg30 -Xa${x}i -Ya${y}i -O -K >> $ps
  27. done < tmp.txt
  28. 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...