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_esri.sh 507 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
  1. #!/usr/bin/env bash
  2. #
  3. # Paste esri ASCII grids along Y
  4. # The final grid is just f(x,y) = x
  5. gmt grdmath -R-15/15/-15/0 -I0.5 X = lixo_y1.asc=ef
  6. gmt grdmath -R-15/15/0/15 -I0.5 X = lixo_y2.asc=ef
  7. gmt grdpaste lixo_y1.asc lixo_y2.asc -Glixo_y.nc
  8. gmt grdmath -R-15/15/-15/15 -I0.5 X = answer.nc
  9. gmt grdmath lixo_y.nc answer.nc SUB 0 EQ = tmp.nc
  10. n=$(gmt grd2xyz tmp.nc -Z | uniq | wc -l | $AWK '{print $1}')
  11. if [ $n -gt 1 ]; then
  12. echo "Found $n different results instead of just 1" > fail
  13. else
  14. touch fail
  15. fi
Tip!

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

Comments

Loading...