Skip to content

Commit

Permalink
Fix example 4 (#10)
Browse files Browse the repository at this point in the history
Co-authored-by: HouseJaay <[email protected]>
  • Loading branch information
core-man and HouseJaay authored Aug 10, 2021
1 parent edcbecb commit e53f973
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 10 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -256,3 +256,12 @@ dx=0.5, dy=0.5, dz=0.5 ! forward grid size
```shell
$ ./workflow_inversion.sh
```
#### 5. plot figure
Adjust region of cross-section, change `lineEnds` to
```
0.0 0.0 90.0 0.0
```
Then run:
```shell
$ ./plot-cross-section-real.sh
```
Binary file added example4.pdf
Binary file not shown.
22 changes: 12 additions & 10 deletions figure/plot-cross-section-real.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,28 @@ rm zCutVelocity

gmt begin vcut-example pdf
gmt set FONT_LABEL 10p
gmt subplot begin 2x1 -Fs12c/2.0c -A -SCb -Bxa20.0f10.0+l"Distance (km)" -Bya10.0f5.0+l"Depth (km)" -BWSen
gmt subplot begin 1x1 -Fs12c/2.0c -SCb -Bxa20.0f10.0+l"Distance (km)" -Bya10.0f5.0+l"Depth (km)" -BWSen

# Plot velocity model (a)
gmt subplot set 0
gmt basemap -R0.0/240.0/0.0/36.0 -JX?/-?
awk ' { print $1,$2,$5 }' dvelCut001 | gmt surface -R0.0/240.0/0.0/36.0 -I0.2 -Gtomo.grd
gmt basemap -R0.0/90.0/0.0/36.0 -JX?/-?
awk ' { print $1,$2,$5 }' dvelCut001 | gmt surface -R0.0/90.0/0.0/36.0 -I0.2 -Gtomo.grd
T=$(gmt grdinfo -T+s tomo.grd)
gmt makecpt -Cpsrgb.cpt $T -I
gmt grdimage tomo.grd
gmt colorbar -DJRM+w1.8c/0.2c+e -Ba+u"%"


# Plot kernel (b)
gmt subplot set 1
gmt basemap -R0.0/240.0/0.0/36.0 -JX?/-?
awk ' { print $1,-1.0*$3,$4 }' ../inversion/kernel | gmt surface -R0.0/240.0/0.0/36.0 -I0.2 -Gtomo.grd
T=$(gmt grdinfo -T+a5+s tomo.grd)
gmt makecpt -Cpsrgb.cpt $T -I
gmt grdimage tomo.grd
gmt colorbar -DJRM+w1.8c/0.2c+e -Ba
# gmt subplot set 1
# gmt basemap -R0.0/90.0/0.0/36.0 -JX?/-?
# awk ' { print $1,-1.0*$3,$4 }' ../inversion/kernel | gmt surface -R0.0/90.0/0.0/36.0 -I0.2 -Gtomo.grd
# T=$(gmt grdinfo -T+a5+s tomo.grd)
# gmt makecpt -Cpsrgb.cpt $T -I
# gmt grdimage tomo.grd
# gmt colorbar -DJRM+w1.8c/0.2c+e -Ba
# awk '{print $3, -$2}' ../data/receivers | gmt plot -Si0.2c -Gblue -N
# awk '{print $3, -$2}' ../data/sources | gmt plot -Sp0.025c -Ggrey

gmt subplot end
gmt end show

0 comments on commit e53f973

Please sign in to comment.