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

grdimage.sh 1.1 KB

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
38
39
40
41
42
43
44
45
46
47
  1. #!/usr/bin/env bash
  2. #
  3. ps=grdimage.ps
  4. image="gmt grdimage t.nc -Ct.cpt -JX1i -B1 -BWeSn --FONT_ANNOT_PRIMARY=10p"
  5. contour="gmt grdcontour t.nc -Ct.cpt -J -R -O"
  6. makegrd () {
  7. gmt grdmath $* -I1 X Y 0.2 MUL ADD = t.nc
  8. }
  9. label () {
  10. gmt pstext -R -J -N -F+f10p+jBR -O -K <<%
  11. -1.4 1.5 grdmath $1
  12. -1.4 1.0 grdimage $2
  13. %
  14. }
  15. plots () {
  16. $image -K -R-0.5/2.5/-0.5/2.5 $1
  17. label "$3" ""
  18. $image -O -K -R0/2/0/2 -X4c
  19. $image -O -K -R-0.5/1.5/0/2 -X4c
  20. $image -O -K -R-1/3/-1/3 -X4c
  21. $image -E50 -O -K -R-0.5/2.5/-0.5/2.5 -X-12c -Y-4c -nl ; $contour -K
  22. label "$3" "-E50 -nl"
  23. $image -E50 -O -K -R0/2/0/2 -X4c -nl ; $contour -K
  24. $image -E50 -O -K -R-0.5/1.5/0/2 -X4c -nl ; $contour -K
  25. $image -E50 -O -K -R-1/3/-1/3 -X4c -nl ; $contour -K
  26. $image -E50 -O -K -R-0.5/2.5/-0.5/2.5 -X-12c -Y-4c ; $contour -K
  27. label "$3" -E50
  28. $image -E50 -O -K -R0/2/0/2 -X4c ; $contour -K
  29. $image -E50 -O -K -R-0.5/1.5/0/2 -X4c ; $contour -K
  30. $image -E50 -O -K -R-1/3/-1/3 -X4c ; $contour $2
  31. }
  32. gmt makecpt -Crainbow -T-0.1/2.5/0.2 > t.cpt
  33. makegrd -R0/2/0/2
  34. plots "-P -X4c -Y24c" -K "" > $ps
  35. makegrd -R-0.5/2.5/-0.5/2.5 -r
  36. plots "-O -X-12c -Y-4c" "" -r >> $ps
Tip!

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

Comments

Loading...