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

paste_gridreg_underlap.sh 981 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
23
24
  1. #!/usr/bin/env bash
  2. #
  3. # Paste grid registered grids that do NOT share a row/column along X & Y edges
  4. # We simulate this by creating pastable pixreg grids and toggle their registration
  5. ps=paste_gridreg_underlap.ps
  6. # The final grid is just f(x,y) = x*y
  7. gmt grdmath -R-14.75/14.75/-14.75/14.75 -I0.5 X Y MUL = lixo.nc
  8. # The 4 pieces to assemble into final grid
  9. gmt grdmath -R-15/0/-15/0 -I0.5 X Y MUL -r = lixo_x1.nc
  10. gmt grdedit lixo_x1.nc -T
  11. gmt grdmath -R0/15/-15/0 -I0.5 X Y MUL -r = lixo_x2.nc
  12. gmt grdedit lixo_x2.nc -T
  13. gmt grdmath -R-15/0/0/15 -I0.5 X Y MUL -r = lixo_y1.nc
  14. gmt grdedit lixo_y1.nc -T
  15. gmt grdmath -R0/15/0/15 -I0.5 X Y MUL -r = lixo_y2.nc
  16. gmt grdedit lixo_y2.nc -T
  17. gmt grdpaste lixo_x1.nc lixo_x2.nc -Glixo_x.nc
  18. gmt grdpaste lixo_y1.nc lixo_y2.nc -Glixo_y.nc
  19. gmt grdpaste lixo_x.nc lixo_y.nc -Glixo_xy.nc
  20. # Top is single source, bottom is assembled
  21. gmt grdcontour lixo_xy.nc -JX10c -C10 -B5 -P -K -Xc > $ps
  22. gmt grdcontour lixo.nc -J -C10 -B5 -O -Y12c >> $ps
Tip!

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

Comments

Loading...