Surimposed geophysical fields and topography

Dear all, I am using GMT5 and I am trying to get on the same figure LAB depth and surface topography. But I did not understand what I misunderstood or miss to get this figure. Any comments or suggestions.


/bin/rm tmp.cpt

gmt makecpt -Crainbow -T40/300/50 -Z >tmp.cpt

Make a basemap of central and southern Africa:

gmt psbasemap -R-1.5/50.5/-35.5/11.5 -JM14 -Ba2f1 -P -X2.0 -Y15 -K >

Convert the xyz file into GRD file using xyz2grd

awk ‘{print $1, $2, $3}’ | gmt xyz2grd -R -I0.5 -Gtmp.grd
#gmt grdimage tmp.grd -JM -Ctmp.cpt -E50 -K -O >>

Resample tmp.grd from coarse (0.5 deg.) into finer resolution (0.1 degree) using grdsample.

The output file is tmph.grd.

gmt grdsample tmp.grd -Gtmph.grd -I0.1

Cut out the portion of elevation data from a global database

The output is topo0.grd

gmt grdcut etopo1_bedrock_africa.grd -Gtopo0.grd -R

Resample it into the same interval as tmph.grd

grdsample topo0.grd -Gtopoh.grd -I0.1

Produce the gradient file. This time I usd -Nt to make a more dramatic shade

gmt grdgradient topoh.grd -A45 -Nt

Produce the image using the resampled grd file and

gmt grdimage tmph.grd -Ctmp.cpt -R -J -O -K >>

Overlay with coastlines and political boudnaries

gmt pscoast -R -JM -B2f2 -A1000 -W1 -N1 -D -P -V -K -O >>

Plot the scale bar at the bottom of the plot

gmt psscale -Ctmp.cpt -Dx8c/1c+w6c/0.5c+jTC+h -Bxaf+l"LAB " -By+lkm -K -O -Y-2.5 >>

Sorry, but is the question exactly?

Sorry, my question is how can we get topography in background and LAB depth or Moho depth on the top. The script I put here doesn’t work and I dont know why.

Maybe you could add transparency (-t50) to the top grid.

which line of the script?

In this line of the script.

Thanks Esteban82. It seems that I have another problem. For mysterious reasons tmph.grd and topoh.grd are not the same size. :thinking: