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

variablerho.sh 3.3 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
58
59
60
61
62
63
  1. #!/usr/bin/env bash
  2. #
  3. # Compute FAA and VGG for case of variable density
  4. ps=variablerho.ps
  5. gmt set GMT_FFT kiss
  6. order=4
  7. dx=0.5
  8. # 2 panels of topo and grav, with top profile of admittance & coherence
  9. # NOT FINISHED
  10. # 1. Create a bathymetry data set with one circular plateau
  11. # with R_base = 50 km, height = 3500 m, depth = -5000 m,
  12. # and let density contrast to from 1300 at flanks and reach
  13. # 1700 at a radius of 25 km and stay at that through the center.
  14. # The equivalent average density is 1533.33333
  15. rhoc=1533.333333
  16. echo "0 0 50 3500" | gmt grdseamount -R-256/256/-256/256 -I$dx -r -Cd -Gplateau.nc -Z-5000
  17. gmt grdmath -Rplateau.nc 50 0 0 CDIST SUB 25 DIV 0 MAX 400 MUL 1300 ADD 1700 MIN 0 0 CDIST 50 LT MUL = rho.nc
  18. # BL Plot the bathymetry
  19. gmt grdtrack -Gplateau.nc -ELM/RM -o0,2 -nn > plateau.trk
  20. gmt psxy -R-256/256/-5000/0 -JX5.5i/2.75i -P -K -Ggray -L+yb -BWSn -Baf -Bx+ukm -By+l"Depth (m)" plateau.trk -X1.5i > $ps
  21. echo "-256 0 BATHYMETRY" | gmt pstext -R -J -O -K -F+jTL+f14p,gray -Dj0.1i -Gwhite -C+tO >> $ps
  22. # Plot the variable density profile in red and constant in blue
  23. gmt grdtrack -Grho.nc -ELM/RM -o0,2 -nn > rho.trk
  24. gmt psxy -R-256/256/0/1800 -J -O -K -W1p,red rho.trk -BE -Baf -By+l"Density (kg/m@+3@+)" >> $ps
  25. gmt psxy -R -J -O -K -W1p,blue << EOF >> $ps
  26. -256 0
  27. -50 0
  28. -50 $rhoc
  29. 50 $rhoc
  30. 50 0
  31. 256 0
  32. EOF
  33. echo "+256 1800 CONSTANT DENSITY" | gmt pstext -R -J -O -K -F+jTR+f14p,blue -Dj0.1i -Gwhite -C+tO >> $ps
  34. echo "+256 1800 VARIABLE DENSITY" | gmt pstext -R -J -O -K -F+jTR+f14p,red -Dj0.1i/0.4i -Gwhite -C+tO >> $ps
  35. # 2a. Compute the VGG anomaly for variable density
  36. gmt gravfft plateau.nc+uk -Drho.nc+uk -Nf+a -Fv -E$order -Gvgg.nc
  37. # BR plot the VGG anomaly
  38. gmt grdtrack -Gvgg.nc -ELM/RM -o0,2 -nn > vgg.trk
  39. gmt psxy -R-256/256/-100/250 -J -O -K -W1p,red vgg.trk -BWSne -Bafg1000 -Bx+ukm -By+l"VGG (E\371tv\371s)" -Y3.2i >> $ps
  40. # 2b. Compute the VGG anomaly for constant density
  41. gmt gravfft plateau.nc+uk -D$rhoc -Nf+a -Fv -E$order -Gvgg.nc
  42. # BR plot the VGG anomaly
  43. gmt grdtrack -Gvgg.nc -ELM/RM -o0,2 -nn > vgg.trk
  44. gmt psxy -R -J -O -K -W1p,blue vgg.trk >> $ps
  45. echo "-256 250 VGG" | gmt pstext -R -J -O -K -F+jTL+f14p -Dj0.1i -Gwhite -C+tO >> $ps
  46. echo "+256 250 CONSTANT DENSITY" | gmt pstext -R -J -O -K -F+jTR+f14p,blue -Dj0.1i -Gwhite -C+tO >> $ps
  47. echo "+256 250 VARIABLE DENSITY" | gmt pstext -R -J -O -K -F+jTR+f14p,red -Dj0.1i/0.4i -Gwhite -C+tO >> $ps
  48. # 3a. Compute the FAA anomaly for variable density
  49. gmt gravfft plateau.nc+uk -Drho.nc+uk -Nf+a -Ff -E$order -Gfaa.nc
  50. # ML plot the FAA anomaly
  51. gmt grdtrack -Gfaa.nc -ELM/RM -o0,2 -nn > faa.trk
  52. gmt psxy -R-256/256/-25/250 -J -O -K -W1p,red faa.trk -BWSne -Bafg1000 -Bx+ukm -By+l"FAA (mGal)" -Y3.2i >> $ps
  53. # 3a. Compute the FAA anomaly for constant density
  54. gmt gravfft plateau.nc+uk -D$rhoc -Nf+a -Ff -E$order -Gfaa.nc
  55. gmt grdmath faa.nc DUP LOWER SUB = faa.nc
  56. # ML plot the FAA anomaly
  57. gmt grdtrack -Gfaa.nc -ELM/RM -o0,2 -nn > faa.trk
  58. gmt psxy -R -J -O -K -W1p,blue faa.trk >> $ps
  59. echo "-256 250 FAA" | gmt pstext -R -J -O -K -F+jTL+f14p -Dj0.1i -Gwhite -C+tO >> $ps
  60. echo "+256 250 CONSTANT DENSITY" | gmt pstext -R -J -O -K -F+jTR+f14p,blue -Dj0.1i -Gwhite -C+tO >> $ps
  61. echo "+256 250 VARIABLE DENSITY" | gmt pstext -R -J -O -K -F+jTR+f14p,red -Dj0.1i/0.4i -Gwhite -C+tO >> $ps
  62. gmt psxy -R -J -O -T >> $ps
  63. rm -f vgg.trk faa.trk plateau.trk rho.trk rho.nc plateau.nc vgg.nc faa.nc
Tip!

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

Comments

Loading...