<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Branden,<div><br></div><div><div><blockquote type="cite"><div dir="ltr"><div><div class="gmail_extra"><div class="gmail_quote"><div style="">

<div>grdmath: Given domain implies y_inc = 0.0250076</div><div>grdmath: (/opt/shakemap/bin/../data/9583161/output/aoAW4ogoKK.xy) PDIST 27.47 HYPOT = /opt/shakemap/bin/../data/9583161/output/piUp3VSmhj.grd</div><div><font color="#ff0000">*** buffer overflow detected ***: /usr/lib/gmt/bin/grdmath terminated</font></div>

</div></div></div></div></div></blockquote></div><br></div><div>This appears to occur at line 165 of Distance.pm. </div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">      </span>`$gmtbin/grdmath$v $grdpars $epifile PDIST$hypot = $distfile`;</div><div><br></div><div>My approach would be to cd to <shake_home>/src/lib and edit Distance.pm. Immediately following this line, add a line with "exit(0);" on it. Save the file and quit the editor. Then do "make". Go back to bin and run grind as usual. It will quit, but should leave the .xy file behind. See what's in that file; it should be just a line with a longitude and latitude. If it's something else, that's an issue. </div><div><br></div><div>Also, I'm not seeing the grid parameters in the output you supplied. You can put a "print" statement just before the grdmath line and print out what's in "$grdpars". That may tell us something as well.</div><div><br></div><div>Finally, you can try to run the command manually: "grdmath <whatever is in $grdpars> <file.xy> PDIST HYPOT = junk.grd". Does that still produce the error?</div><div><br></div><div>Bruce</div><div><br></div><div>P.S. Don't forget to remove the exit line from Distance.pm and do "make" when you're done.</div></body></html>