Here, we specify four points where we would like contour labels to be placed. Our points are not exactly on the contour lines so we give a nonzero ``slop'' to be used in the distance calculations: The point on the contour closest to our fixed points and within the given maximum distance will host the label.
cat << EOF > fix.d 80 -8.5 55 -7.5 102 0 130 10.5 EOF pscoast -R50/160/-15/15 -JM5.5i -Glightgray -A500 -K -P > GMT_App_O_3.ps grdcontour geoid.grd -J -O -B20f10WSne -C10 -A20+d+s8 -Gffix.d/0.1i -S10 -T:LH >> GMT_App_O_3.ps
The angle of the label is evaluated from the contour line geometry, and the final result is shown in Figure O.3.