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

grdflip.sh 714 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 rotations
  3. ps=grdflip.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. # Flip grid left-to-right
  9. gmt grdedit w.nc -Gh.nc -Eh
  10. gmt grdimage h.nc -Ct.cpt -J -Baf -BWSne+tFLIPLR -Y-2.5i -O -K --FONT_TITLE=18p >> $ps
  11. # grid after 180 rotation
  12. gmt grdedit w.nc -Ga.nc -Ea
  13. gmt grdimage a.nc -Ct.cpt -J -O -K -Baf -BWSne+t180@. -Y-2.5i --FONT_TITLE=18p >> $ps
  14. # Flip grid top-to-bottom
  15. gmt grdedit w.nc -Gv.nc -Ev
  16. gmt grdimage v.nc -Ct.cpt -J -O -Baf -BWSne+tFLIPUD -Y-2.5i --FONT_TITLE=18p >> $ps
Tip!

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

Comments

Loading...