Grdview how to specify color palette table

#!/usr/bin/bash

minlon=120
maxlon=122.1

minlat=21.8
maxlat=25.6

gmt begin taiwan
gmt basemap -R${minlon}/${maxlon}/${minlat}/${maxlat}/-6/4 -JM3i -JZ0.8i
-p150/25 -B -Bz2+l"Topo (km)" -BSEwnZ
gmt grdview earth_relief_01m.grd -R${minlon}/${maxlon}/${minlat}/${maxlat}/-6000/4000 -p
-C -I+d -N-6000+ggray -Qi500 -Wthin
gmt basemap -p -TdjTL+w3c+l+o-2c/-1c
gmt end show

It gives me an error, grdview [ERROR]: Syntax error: Must specify color palette table
Moreover i have downloaded earth_relief_01m.grd and it is present in the working directory

See doc : grdview — GMT 6.6.0 documentation

Try to add a palette name after the -C option (-Cgeo) for example.

Or you can create the palette independently with the makecpt module.

gmt begin taiwan png
gmt grdview @earth_relief_01m.grd -R120/122.1/21.8/25.6/-6000/4000 -JM3i -JZ0.8i -p150/25 -B -Bz2000+l"Topo (km)" -BSEwnZ -Cgeo -I+d -Qi500 -Wthin
gmt basemap -p -TdjTL+w3c+l+o-2c/-1c
gmt end show