<div dir="ltr">Bruce:<div><br></div><div><br></div><div>I respond in line below. </div><div><br></div><div class="gmail_extra"><br clear="all"><div><div dir="ltr"><div><b>Branden Christensen</b><br></div><div><span style="font-family:arial;font-size:small">The Seismo Guys Blog: </span><a href="http://www.osop.com.pa/blog/the-seismo-guys/" style="font-family:arial;font-size:small" target="_blank">http://www.osop.com.pa/blog/the-seismo-guys/</a></div>


<div>Take a Virtual Tour: <a href="http://www.osop.com.pa/tour" style="font-family:arial" target="_blank">http://www.osop.com.pa/tour</a></div></div></div>
<br><br><div class="gmail_quote">On Thu, Nov 21, 2013 at 12:23 AM, Bruce Worden <span dir="ltr"><<a href="mailto:cbworden@gmail.com" target="_blank">cbworden@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">


<div style="word-wrap:break-word">Hi Branden,<div><div><br></div><div><div><blockquote type="cite"><div dir="ltr"><div><div class="gmail_extra"><div class="gmail_quote"><div>

<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><div>This appears to occur at line 165 of Distance.pm. </div><div><br></div><div><span style="white-space:pre-wrap">   </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></blockquote><div><div>osop@osop-displays2:/opt/shakemap/bin$ cat ../data/9583161/richter/xRGN1Kclm2.xy</div><div>-118.900000 34.563000</div></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">


<div style="word-wrap:break-word"><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></blockquote><div>Can you be more specific? In the grind binary?  </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">


<div style="word-wrap:break-word"><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>


<span><font color="#888888"><div><br></div><div>Bruce</div></font></span><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></div>
</blockquote></div><br></div></div>