Does GMT have a way of extracting the z variable of a grid file into a vector form without going through grd2xyz? The use of grd2xyz on a large file takes some time. I want to plot the histogram of QQQ.nc, and I am thinking if there could be an easier way of getting only the z part of the file. For instance, in MATLAB, I would’ve done:
Python and the Python gdal module could be used to read your GMT grid, extract the z values to an array, and then reshape it to a vector. Then you can plot with PyGMT.