Based on this file: e020n40.nc
#!/bin/bash outfile=pic.ps infile=e020n40.nc invar=z colorfile=colors.cpt gmt makecpt -Cviridis -D -T-5200/2400/400 > ${colorfile} gmt psbasemap -R20/60/-10/40 -JM18 -B4/4"NSEW" -X+1.5c -P -K > ${outfile} gmt grdimage ${infile}?${invar} -R -J -C${colorfile} -O -K >> ${outfile} gmt pscoast -J -R -Di -W1,black -O >> ${outfile}
output (pic.ps
imported into GIMP v2.8.22 in 60 dpi resolution and with strong antialiasing):