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

poldecimate.sh 781 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
  1. #!/usr/bin/env bash
  2. # Testing gmt spatial decimation near poles
  3. #
  4. # Input was made this way.
  5. #gmt math -T0/2000/1 -o1 0 360 RAND = x
  6. #gmt math -T0/2000/1 -o1 60 90 RAND = y
  7. #gmt math -T0/2000/1 -o1 0 100 RAND = z
  8. #paste x y z > polar.txt
  9. ps=poldecimate.ps
  10. DATA=$(gmt which -G @nn_polar.txt)
  11. # NN averaging
  12. gmt spatial -Aa100k -fg $DATA > results.txt
  13. gmt psxy -R0/360/60/90 -JA0/90/4.5i -P -K -Bafg -BWsne $DATA -Sc0.05i -Ggreen -X1.5i -Y0.75i > $ps
  14. echo "90 60 N = 2000" | gmt pstext -R -J -O -K -N -F+f12+jLM -Dj0.25i >> $ps
  15. gmt psxy -R -J -O -K $DATA -Sc0.05i -Bafg -BWsne -Gdarkseagreen1 -Y5i >> $ps
  16. gmt psxy -R -J -O -K results.txt -Sc0.05i -Gred >> $ps
  17. N=$(wc -l results.txt | awk '{printf "%d\n", $1}')
  18. echo "90 60 N = $N" | gmt pstext -R -J -O -N -F+f12+jLM -Dj0.25i >> $ps
Tip!

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

Comments

Loading...