Hello,
I would like to run the following GMT lines but I got an error when I put lines in cmd:
#!/bin/sh
gmtset PLOT_DEGREE_FORMAT D
gmtset COLOR_MODEL HSV
gmtset PAPER_MEDIA letter
gmtset PAGE_ORIENTATION portrait
gmtset MEASURE_UNIT inch
# Region will need to be adjusted based on grid values
set REGION = -118.024/-117.508/36.9756/37.2681
set SCALE = 6.0
# These commands are good if you have access to
# a topography database file for the region modeled
# Note: if you uncomment these, adjust the -O -K, etc.
#######################################################
#grdraster 2 -R$REGION -I0.5m -Gwpp_topo.grd
#grdgradient wpp_topo.grd -Gwpp_topo_shade.grd -A270 -Nt -M
#grd2cpt wpp_topo.grd -Ctopo -Z >! wpptopo.cpt
#grdimage wpp_topo.grd -R$REGION -JM$SCALE -Cwpptopo.cpt -Iwpp_topo_shade.grd -P -K >! plot.ps
#######################################################
pscoast -R$REGION -JM$SCALE -Bf0.025a0.05 -Dfull -S100,200,255 -A2000 -W3 -N1t3 -N2t2a -K >! plot.ps
# computational grid region...
psxy -R$REGION -JM$SCALE -W10/255/255/0ta -O -K <<EOF>> plot.ps
-118 37
-118 37.2438
-117.533 37.2438
-117.534 37
-118 37
EOF
#SG boundary:
psxy -R$REGION -JM$SCALE -W10/255/255/0ta -O -K <<EOF>> plot.ps
-117.978 37.0172
-117.556 37.0172
-117.555 37.2265
-117.978 37.2265
-117.978 37.0172
EOF
# Sources...
cat << EOF >! event.d
-117.571 37.0287 EVENT-NAME CB
EOF
psxy -R -J -O -K -Sc0.1 -Gred -W0.25p event.d >> plot.ps
awk '{print $1, $2, 12, 1, 9, $4, $3}' event.d | pstext -R -J -O -D0.2/0.2v -Gred -N -K >> plot.ps
# Stations...
cat << EOF >! stations.d
-117.873 37.1859 ALFO1acc CB
-117.873 37.1859 ALFO-1 CB
-117.874 37.1851 ALFO-2 CB
EOF
# plot station names
psxy -R -J -O -K -St0.1 -Gblue -W0.25p stations.d >> plot.ps
awk '{print $1, $2, 12, 1, 9, $4, $3}' stations.d | pstext -R -J -O -Dj0.3/0.3v -Gblue -N >> plot.ps
I got following error:
pscoast [WARNING]: Length <unit> E not supported - revert to default unit [inch]
pscoast [WARNING]: $SCAL not a valid number and may not be decoded properly.
pscoast [ERROR]: Your scale or width ($SCALi) resulted in a zero value.
pscoast [ERROR]: Offending option -JM$SCALE
pscoast [ERROR]: Could not decode $REGION, return NaN.
pscoast [ERROR]: Option -R parsing failure. Correct syntax:
pscoast [ERROR]: Offending option -R$REGION
How Can I fix it? thank you so much