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