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

deflections.sh 3.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
48
49
50
51
52
53
54
55
56
57
  1. #!/usr/bin/env bash
  2. #
  3. # Compute E-W and N-S deflections over synthetic seamount
  4. ps=deflections.ps
  5. order=2
  6. gmt set GMT_FFT kiss
  7. # 1. Create a bathymetry data set with one circular conical truncated seamount
  8. # as in Fig 3. of Marks & Smith, 2007 [GRL], with R_base = 35 km,
  9. # R_top = 10 km, height = 3751 m, depth = -5084 m, density d_rho = 2800-1030
  10. # = 1670 kg/m^3, so the flattening is 10/25 = 0.4.
  11. echo "0 0 25 3751" | gmt grdseamount -R-256/256/-256/256 -I1 -r -Cc -Gsmt.nc -F0.4 -Z-5084
  12. # BL Plot the bathymetry
  13. gmt makecpt -Crainbow -T-5100/-1000 > t.cpt
  14. gmt grdimage smt.nc -R-100/100/-100/100 -JX3i -P -Bag -BWSne -Ct.cpt -K > $ps
  15. gmt grdtrack -Gsmt.nc -ELM/RM+d > smt.trk
  16. gmt psxy -R -J -O -K -W5p,white smt.trk >> $ps
  17. gmt psxy -R -J -O -K -W1p smt.trk >> $ps
  18. echo "-100 100 BATHYMETRY" | gmt pstext -R -J -O -K -F+jTL+f14p -Dj0.1i -Gwhite -C+tO >> $ps
  19. # 2. Compute the E-W deflection anomaly
  20. gmt gravfft smt.nc+uk -D1670 -Nf+a -Fe -E$order -Gdef_e.nc
  21. # ML plot the E-W deflection anomaly
  22. gmt makecpt -Cpolar -T-120/120 > t.cpt
  23. gmt grdimage def_e.nc -R-100/100/-100/100 -JX3i -O -Bag -BWSne -Ct.cpt -K -X3.5i >> $ps
  24. gmt grdtrack -Gdef_e.nc -ELM/RM+d > def_e.trk
  25. gmt psxy -R -J -O -K -W5p,white def_e.trk >> $ps
  26. gmt psxy -R -J -O -K -W1p,blue def_e.trk >> $ps
  27. echo "-100 100 @~h@~" | gmt pstext -R -J -O -K -F+jTL+f14p -Dj0.1i -Gwhite -C+tO >> $ps
  28. # 3. Compute the VGG anomaly
  29. gmt gravfft smt.nc+uk -D1670 -Nf+a -Fv -E$order -Gvgg.nc
  30. # BR plot the VGG anomaly
  31. gmt makecpt -Crainbow -T-50/250 > t.cpt
  32. gmt grdimage vgg.nc -R-100/100/-100/100 -JX3i -O -Bag -BWsne -Ct.cpt -K -X-3.5i -Y3.25i >> $ps
  33. gmt grdtrack -Gvgg.nc -ELM/RM+d > vgg.trk
  34. gmt psxy -R -J -O -K -W5p,white vgg.trk >> $ps
  35. gmt psxy -R -J -O -K -W1p,red vgg.trk >> $ps
  36. echo "-100 100 VGG" | gmt pstext -R -J -O -K -F+jTL+f14p -Dj0.1i -Gwhite -C+tO >> $ps
  37. # 4. Compute the N-S deflection anomaly anomaly
  38. gmt gravfft smt.nc+uk -D1670 -Nf+a -Fn -E$order -Gdef_n.nc
  39. # MR plot the N-S deflection anomaly
  40. gmt makecpt -Cpolar -T-120/120 > t.cpt
  41. gmt grdimage def_n.nc -R-100/100/-100/100 -JX3i -O -Bag -BWsne -Ct.cpt -K -X3.5i >> $ps
  42. gmt grdtrack -Gdef_n.nc -EBL/TR+d > def_n.trk
  43. gmt psxy -R -J -O -K -W5p,white def_n.trk >> $ps
  44. gmt psxy -R -J -O -K -W1p,orange def_n.trk >> $ps
  45. echo "-100 100 @~x@~" | gmt pstext -R -J -O -K -F+jTL+f14p -Dj0.1i -Gwhite -C+tO >> $ps
  46. # 5 Plot crossections of bathy and vgg crossections
  47. # TL plot the bathy and vgg anomaly
  48. gmt psxy -R-100/100/-5100/1000 -JX3i/2.5i -O -K -W1p -i0,3 smt.trk -Baf -BWsN -X-3.5i -Y3.2i >> $ps
  49. echo "-100 1000 TOPO" | gmt pstext -R -J -O -K -F+jTL+f12p -Dj0.1i >> $ps
  50. gmt psxy -R-100/100/-50/250 -J -O -K -W1p,red -i0,3 vgg.trk -Bafg1000 -BENs >> $ps
  51. echo "100 250 VGG" | gmt pstext -R -J -O -K -F+jTR+f12p,Helvetica,red -Dj0.1i >> $ps
  52. # Add the two deflection crossections
  53. # TRL plot the E-W and N-S deflection anomaly
  54. gmt psxy -R-100/100/-120/120 -JX3i/2.5i -O -K -W1p,blue -i0,3 def_e.trk -Bafg1000 -BwsN -X3.5i >> $ps
  55. echo "-100 120 @~h@~" | gmt pstext -R -J -O -K -F+jTL+f12p,Helvetica,blue -Dj0.1i >> $ps
  56. gmt psxy -R -J -O -K -W1p,orange -i1,3 def_n.trk -Baf -BE >> $ps
  57. echo "100 120 @~x@~" | gmt pstext -R -J -O -F+jTR+f12p,Helvetica,orange -Dj0.1i >> $ps
Tip!

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

Comments

Loading...