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

cut.sh 769 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. #!/bin/bash
  2. # $Id: subset.sh 12115 2013-09-03 23:22:48Z fwobbe $
  3. # Testing gmt grdcut -Zmin/max
  4. ps=cut.ps
  5. gmt grdmath -R0/10/0/10 -I1 X Y MUL = t.nc
  6. cat << EOF > replace.txt
  7. 0 1 NaN
  8. 0 2 NaN
  9. 0 3 NaN
  10. 3 10 NaN
  11. 4 10 NaN
  12. 8 9 NaN
  13. 8 10 NaN
  14. 9 10 NaN
  15. 10 10 NaN
  16. 7 4 NaN
  17. EOF
  18. gmt grdedit t.nc -Nreplace.txt
  19. gmt makecpt -Cjet -T0/100/5 > t.cpt
  20. gmt grdcut t.nc -Z20/70 -Gnew.nc
  21. gmt psscale -Ct.cpt -A -D0/4.2i/8.4i/0.2i -Ba10 -P -K > $ps
  22. gmt grdimage new.nc -Ct.cpt -JX4i -R -Baf -O -K -X1i >> $ps
  23. echo 10 5 -Z20/70 | gmt pstext -R -J -O -K -N -Dj0.5i/0 -F+f24p+jLM >> $ps
  24. gmt grdcut t.nc -Zr20/70 -Gnew.nc
  25. gmt grdimage new.nc -Ct.cpt -JX4i -R -Baf -BWsNe+t"Find region with 20 < z < 70" -O -K -Y4.4i >> $ps
  26. echo 10 5 -Zr20/70 | gmt pstext -R -J -O -N -Dj0.5i/0 -F+f24p+jLM >> $ps
Tip!

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

Comments

Loading...