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

grdvolume.sh 615 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
25
26
27
28
29
30
31
32
33
34
35
36
  1. #!/usr/bin/env bash
  2. #
  3. makegrd () {
  4. gmt xyz2grd -I1 -Gt.nc -Z $1 <<%
  5. 1
  6. 1
  7. 1
  8. 1
  9. 1
  10. 0
  11. 1
  12. 0
  13. 0
  14. %
  15. echo
  16. echo gmt xyz2grd $1 \; gmt grdvolume $2 -Sk -fg:
  17. gmt grdvolume t.nc $2 -Sk -fg
  18. echo gmt xyz2grd $1 \; gmt grdvolume $2:
  19. gmt grdvolume t.nc $2
  20. echo gmt xyz2grd $1 \; gmt grdvolume $2 -L-1:
  21. gmt grdvolume t.nc $2 -L-1
  22. }
  23. testcase () {
  24. makegrd -R0/2/0/2
  25. makegrd "-R0/3/0/3 -r"
  26. makegrd "-R0/2/0/2 -di0"
  27. makegrd "-R0/3/0/3 -r -di0"
  28. makegrd -R0/2/0/2 "-C0/0.8/0.4"
  29. }
  30. testcase > grdvolume.log
  31. # Note: a non-zero exit status of diff is not an error
  32. diff grdvolume.log "${src:-.}"/grdvolume.out --strip-trailing-cr > log || true
Tip!

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

Comments

Loading...