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

transrot.sh 693 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
  1. #!/usr/bin/env bash
  2. # Test grdedits grid transpose and rotations
  3. ps=transrot.ps
  4. # Original grid
  5. gmt grdmath -R-1800/2600/-600/600 -I10 Y 100 DIV 2 POW NEG EXP Y 1000 DIV ADD X 1000 DIV MUL = w.nc
  6. gmt makecpt -Crainbow -T-1.8/2.65 > t.cpt
  7. gmt grdimage w.nc -Ct.cpt -Jx0.00147727i -Baf -P -K -BWSne -Y8.5i > $ps
  8. # Transpose grid
  9. gmt grdedit w.nc -Gt.nc -Et
  10. gmt grdimage t.nc -Ct.cpt -J -Baf -BWSne+tTRANSPOSE -Y-7.5i -O -K >> $ps
  11. # grid after 90 CCW rotation
  12. gmt grdedit w.nc -Gp.nc -El
  13. gmt grdimage p.nc -Ct.cpt -J -O -K -Baf -BWSne+t"90@. CCW" -X2.363632i >> $ps
  14. # grid after 90 CW rotation
  15. gmt grdedit w.nc -Gm.nc -Er
  16. gmt grdimage m.nc -Ct.cpt -J -O -Baf -BWSne+t"90@. CW" -X2.363632i >> $ps
Tip!

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

Comments

Loading...