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

limits.sh 904 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
  1. #!/bin/bash
  2. # $Id$
  3. # Testing gmt grdclip
  4. ps=limits.ps
  5. Rp=-21/21/-21/21
  6. Rg=-20/20/-20/20
  7. # Create grid by evaluating a Kelvin-Bessel * sqrt(r) function
  8. gmt grdmath -R$Rg -I1 0 0 CDIST 0.1 MUL KEI 0 0 CDIST 0.1 MUL SQRT ADD DUP UPPER DIV 10 MUL = tmp.nc
  9. gmt makecpt -Crainbow -T-6/10/1 > t.cpt
  10. # Draw all nodes as open circles
  11. gmt grd2xyz tmp.nc | gmt psxy -R$Rp -JX3.25i -Sc0.15c -W0.25p -Ct.cpt -P -K -B10f5 -BWSne -Xc -Y0.5i > $ps
  12. gmt psscale -D4i/4.75i/6i/0.15i -O -K -Ct.cpt -E+n >> $ps
  13. # Set values higher than 7 to NaN and values lower than 0 to -6
  14. gmt grdclip tmp.nc -Sa7/NaN -Sb0/-6 -Gout.nc
  15. gmt grd2xyz out.nc | gmt psxy -R$Rp -J -Sc0.15c -W0.25p -Ct.cpt -O -K -B10f5 -BWsne -Y3.5i >> $ps
  16. # Set values between 0 and 5 to NaN
  17. gmt grdclip tmp.nc -Si0/5/NaN -Gout.nc
  18. gmt grd2xyz out.nc | gmt psxy -R$Rp -J -Sc0.15c -W0.25p -Ct.cpt -O -K -B10f5 -BWsne -Y3.5i >> $ps
  19. gmt psxy -R$Rp -J -T -O >> $ps
Tip!

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

Comments

Loading...