Feature #463

supporting of irregular grid file in grdimage

Added by chuan over 3 years ago. Updated about 3 years ago.

Status:FeedbackStart date:2013-12-18
Priority:NormalDue date:
Assignee:-% Done:


Target version:Candidate for next minor release



I konw irregular grid files are not supported in grdimage and xyz2grd in GMT4, and it seems that this feature still not be supported in GMT5. I am strongly hoping that it can be supported in new GMT5 cause many of my colleagues in geophysics have the same wish too.

thanks a million.

irregular01.png - mantle convection temperature and composition fields (150 KB) chuan, 2013-12-28 16:59

irregular02.png - the matlab implementation of irregular grid (3.67 KB) chuan, 2013-12-28 16:59


#1 Updated by Paul over 3 years ago

  • Tracker changed from Support to Feature
  • Status changed from New to Feedback
  • Target version set to Candidate for next minor release

We've had these sorts of discussions before. grdimage uses the PostScript image operator which requires a rectangular grid. Thus, any irregular grid would first need to be reiinterpolated onto an equidistant grid anyway before plotting. The same is true of most GMT operations on grids: A first step would be to resample onto an equidistant lattice. Stuff like FFTs and many other operations only work on such grids. We are aware that modeling using finite element meshes produces irregular grids and at the extreme end we are talking triangulation or other tesselations. It is not clear to me if there is any inherent benefit to GMT to be able to read such grids or if all that is needed is a pre-processing step of producing an equidistant grid. It would help if you could be very specific with examples where irregular grid support would enhance GMT operations. I have changed the tracker from Support to Feature request.

#2 Updated by chuan about 3 years ago

Sometimes I need to draw the temperature and composition field of mantle, cause I am working on geodynamics. The grid nodes in the direction of depth usually be tuned more fine in the temperature boundary layers or phase change interfaces for better accuracy. So I am great hoping the irregular grid file can be support in GMT5.

Add this feature seems can be easily implemented in matlab, for example:

x = [-10, -8, -6, -4, -2, -1, 0 , 1, 2, 4, 6, 8, 10];
y = x;
[xx, yy] = meshgrid(x, y);
zz = xx .* yy;
pcolor(xx, yy, zz);

I think rather than using the Postscript image operator, maybe we could just draw each rectangle one by one according to their sizes like matlab.

Thanks a lot.

Also available in: Atom PDF