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

sample.sh 582 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
  1. #!/usr/bin/env bash
  2. # Testing gmt grdsample
  3. ps=sample.ps
  4. Rg=-20/20/-20/20
  5. # Create grid by evaluating a Kelvin-Bessel * sqrt(r) function
  6. 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
  7. gmt makecpt -Crainbow -T-6/10/1 > t.cpt
  8. # Draw all nodes as open circles
  9. gmt grdimage tmp.nc -JX4.5i -Ct.cpt -P -K -B10f5 -BWSne -Xc -Y0.75i > $ps
  10. gmt psscale -Dx5i/4.75i+w6i/0.15i+jML+e+n -O -K -Ct.cpt >> $ps
  11. # Resample to 0.2 spacing
  12. gmt grdsample tmp.nc -I0.2 -Gout.nc
  13. gmt grdimage out.nc -JX4.5i -Ct.cpt -O -B10f5 -BWSne -Xc -Y5i >> $ps
Tip!

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

Comments

Loading...