gmtset BASEMAP_TYPE plain MEASURE_UNIT inch PAPER_MEDIA letter PLOT_DEGREE_FORMAT D TICK_LENGTH 0.15c LABEL_FONT_SIZE 12 ANOT_FONT_SIZE 10  HEADER_FONT 1 ANOT_FONT 1 LABEL_FONT 1 HEADER_FONT_SIZE 12 FRAME_PEN 1p TICK_PEN 1p D_FORMAT %g
makecpt -C/home/carltape/gmt/color_maps/Romanian_flag_smooth.cpt -T0.000000/3.000000/0.03 -D > color3.cpt
psbasemap -JM6i -R-121.9/-114/32/37 -Ba2.000f1.000d:" ":/a1.000f1.000d:" "::." ":WESN -K -V -P -X1 -Y3 > onesub_reason_3D.ps
awk '{print $1,$2,$5/1e-07}' /home/carltape/SURFACEVEL2STRAIN/matlab_output/socal_d01_q03_q07_b1_3D_s1_u1_strain.dat | surface -Gtemp.grd -I0.04 -T0 -S0 -R-121.9/-114/32/37
grdimage temp.grd -R-121.9/-114/32/37 -JM6i -Ccolor3.cpt -T -K -O -V >> onesub_reason_3D.ps
echo mask file is /home/carltape/SURFACEVEL2STRAIN/matlab_output/socal_d01_q03_q07_b1_3D_s1_u1_masked_pts.dat
psmask /home/carltape/SURFACEVEL2STRAIN/matlab_output/socal_d01_q03_q07_b1_3D_s1_u1_masked_pts.dat -R-121.9/-114/32/37 -JM6i -I0.1 -G200 -S0.2 -K -O -V >> onesub_reason_3D.ps
psmask -C -K -O -V >> onesub_reason_3D.ps
psscale -Ccolor3.cpt -D1/-0.35/1.2/0.1h -B1.50:"  ": -Ef10p -K -O -V >> onesub_reason_3D.ps
pscoast -JM6i -R-121.9/-114/32/37 -Ba2.000f1.000d:" ":/a1.000f1.000d:" "::." ":weSn -A500 -Df -W1.5p,255/255/255 -Na/1.5p,255/255/255,t -K -O -V >> onesub_reason_3D.ps
psxy /home/carltape/gmt/faults/jennings_more.xy -JM6i -R-121.9/-114/32/37 -M -W0.75p,0/0/0 -K -V -O >> onesub_reason_3D.ps
pstext -N -JX6 -R0/1/0/1 -K -O -V >>onesub_reason_3D.ps<<EOF
 0.5 0.88 14 0 1 CM Strain rate, 10@+-7@+ yr@+-1@+, from cGPS, wavelet scales 3-7 (Tape et al, GJI 2009, Fig 11c)
EOF
pstext -N -JX10 -R0/1/0/1 -O -V >>onesub_reason_3D.ps<<EOF
 10 10 10 0 1 CM junk
EOF
echo done with onesub_reason_3D.ps
convert onesub_reason_3D.ps onesub_reason_3D.jpg
gv onesub_reason_3D.ps &
