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

general_p.sh 1007 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
  1. #!/usr/bin/env bash
  2. # We have a weakness in how the jumps are detected in GMT_split_line. It does
  3. # not work well for this gmt projection but seems OK for regular orthographic.
  4. # The problem shows up for the 2000 km distance which has a jump.
  5. ps=general_p.ps
  6. # station lat,long
  7. LON_E='-57.93229950'
  8. LAT_E='-34.90674529'
  9. LAT_C='20'
  10. LON_C='-40'
  11. RADIUS='1000'
  12. gmt psbasemap -Rg -JG$LON_C/$LAT_C/25000/-23/10/0/0/0/7i -Ba0f30g30 -P -K -Xc > $ps
  13. # distances from north pole to station
  14. rm -f lines.dat
  15. touch lines.dat
  16. gmt project -C$LON_E/90 -E$LON_E/-90 -G$RADIUS -Q > distances.xyp
  17. for LD in `awk '{if ( ( $2 > 0 ) && ( $3 > 0 ) ) {print $2"/"$3}}' distances.xyp`
  18. do
  19. LAT=`echo $LD | awk -F '/' '{print $1}'`
  20. DIST=`echo $LD | awk -F '/' '{print $2}'`
  21. echo "> -L$DIST" >> lines.dat
  22. LON='0'
  23. while [ $LON -le 360 ]
  24. do
  25. echo "$LON $LAT" >> lines.dat
  26. LON=$(($LON+1))
  27. done
  28. done
  29. gmt psxy lines.dat -R -J -Sqxdistances.xyp:+f8p,Helvetica,black+gwhite+Lh+u" km"+v -W0.5p,red -O >> $ps
Tip!

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

Comments

Loading...