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 666 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
  1. #!/bin/sh
  2. # $Id$
  3. # Testing grdsample
  4. . ../functions.sh
  5. header "Test grdsample for basic resampling"
  6. ps=sample.ps
  7. Rg=-20/20/-20/20
  8. # Create grid by evaluating a Kelvin-Bessel * sqrt(r) function
  9. 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
  10. makecpt -Crainbow -T-6/10/1 > t.cpt
  11. # Draw all nodes as open circles
  12. grdimage tmp.nc -JX4.5i -Ct.cpt -P -K -B10f5WSne -Xc -Y0.75i > $ps
  13. psscale -D5i/4.75i/6i/0.15i -O -K -Ct.cpt -E+n >> $ps
  14. # Resample to 0.2 spacing
  15. grdsample tmp.nc -I0.2 -Gout.nc
  16. grdimage out.nc -JX4.5i -Ct.cpt -O -K -B10f5WSne -Xc -Y5i >> $ps
  17. psxy -R$Rp -J -O -T >> $ps
  18. rm -f tmp.nc out.nc t.cpt
  19. pscmp
Tip!

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

Comments

Loading...