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

spheres.sh 668 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
  1. #!/usr/bin/env bash
  2. #
  3. # Computes the gravity anomaly of a sphere both analytical and discrete triangles
  4. ps=spheres.ps
  5. r=10; z0=-15; ro=1000;
  6. echo -50 0 > li
  7. echo 50 0 >> li
  8. gmt sample1d li -Fl -I1 > li1.dat
  9. gmt gmtgravmag3d -Tr@sphere_raw.txt -C$ro -Fli1.dat > ptodos_g.dat
  10. # xyzokb solution
  11. gmt psxy ptodos_g.dat -i0,2 -R-50/50/0/0.125 -JX14c/10c -Bx10f5 -By.01 -BWSne+t"Anomaly (mGal)" -W1p -P -K > $ps
  12. gmt psxy ptodos_g.dat -i0,2 -R -JX -Sc.1c -G0 -O -K >> $ps
  13. # Profile of analytic anomaly
  14. gmt math -T-50/50/1 T $z0 HYPOT 3 POW INV 6.674e-6 MUL 4 MUL 3 DIV PI MUL $r 3 POW MUL $ro MUL $z0 ABS MUL = ztmp.dat
  15. gmt psxy ztmp.dat -R -JX -W1p,200/0/0 -O >> $ps
Tip!

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

Comments

Loading...