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

lonjump.sh 1.0 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
  1. #!/usr/bin/env bash
  2. # Addresses #message-6444 (no crossing near pole where longitudes change quickly).
  3. # Solution is to process lon-array to avoid jumps. This requires -fg since we cannot
  4. # know if x is lon otherwise. If range is 360 it may still fail; we issue a warning if so.
  5. ps=lonjump.ps
  6. # L1 has longitude jump across dateline but no -fg was given: No green circle
  7. gmt psxy L1.txt -R-1/1.5/150/152+uk -JS0/90/6i -P -BWSne -Bafg1m -W0.5p,red -K -Xc > $ps
  8. gmt psxy L1.txt -R -J -O -K -Sc0.2c -Gred >> $ps
  9. gmt psxy L2.txt -R -J -O -K -W0.5p,blue >> $ps
  10. gmt psxy L2.txt -R -J -O -K -Sc0.2c -Gblue >> $ps
  11. gmt spatial L1.txt L2.txt -Ie -Fl | gmt psxy -R -J -O -K -Sc0.3c -Ggreen >> $ps
  12. # Using -fg adjusts longitudes to have no jump: Green circle appears
  13. gmt psxy L1.txt -R -J -O -Bafg1m -BWsNe -W0.5p,red -K -Y5i >> $ps
  14. gmt psxy L1.txt -R -J -O -K -Sc0.2c -Gred >> $ps
  15. gmt psxy L2.txt -R -J -O -K -W0.5p,blue >> $ps
  16. gmt psxy L2.txt -R -J -O -K -Sc0.2c -Gblue >> $ps
  17. gmt spatial L1.txt L2.txt -Ie -Fl -fg | gmt psxy -R -J -O -Sc0.5c -W0.5p >> $ps
Tip!

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

Comments

Loading...