#!/usr/bin/env bash
region and projection
R=“-R95/97/18/23/-10/0” # 3D region including depth
J=“-Jx3c -Jz0.2c”
P=“-p160/35” # azimuth/elevation
files
TOPO=“topo.nc”
SHADE=“shade.nc”
CPT_SLIP=“slip.cpt”
CPT_TOPO=“topo.cpt”
OUT=“fault3d.png"
DEM
gmt grdcut C:/Users/CDS-LAB1/Desktop/PhD_Work/study_area/topo30.grd ${R} -G$TOPO #@earth_relief_01m
hillshade
gmt grdgradient $TOPO -A135 -Ne0.8 -G$SHADE
Begin modern GMT session
gmt begin ${OUT} png A4
Basemap
gmt basemap $R $J $P -Bxa1f0.5+l"Longitude" -Bya1f0.5+l"Latitude" -Bza2f1+l"Depth (km)" -BwSnEZ+b
Draped topography
gmt grdimage $TOPO $J $P -I$SHADE -C$CPT_TOPO -t40
gmt grdimage C:/Users/CDS-LAB1/Desktop/aditya/devika/dataset1s.grd -C$CPT_TOPO -t40 $R $J $P -I+a135+nt1+m0
Coastlines
gmt coast $R $J $P -W0.5p,black -N1/0.5p,black
Plot slip points (TEMPORARY — until using real polygons)
awk ‘{print $1, $2, -$3, $7}’ test.txt | gmt plot3d $R $J $P -C$CPT_SLIP -W0.1p -Ss0.25c
gmt plot3d fault_patches.xyz $R $J $P -C$CPT_SLIP -W3p -t10
colorbar
gmt colorbar -C$CPT_SLIP -Dx2c/-1.2c+w3c/0.3c+h -Baf+l"Slip (m)"
gmt end show
echo “Saved: $OUT”
I wanted to plot the similar figure. Couldnot figure out where is the issue in the script. But its not doing.
Kindly help


