<div dir="ltr">Bruce:<div><br></div><div><br></div><div>Top of the morning. I must have been feeling lazy last night :) Adding the print statement was breezy:</div><div><br></div><div><div>osop@osop-displays2:/opt/shakemap/bin$ ./grind -event 9583161 -qtm -verbose -lonspan 20.0</div>
<div>Using Borcherdt-style site corrections.</div><div>Map bound: -128.900000/-108.900000/26.323000/42.803000</div><div><font color="#ff0000"><b>HELLO WORLD!!!!!!! Printing grdpars variable: -R-128.900000/-108.900000/26.323000/42.803000 -I0.025/0.025 -fg</b></font></div>
<div>GMT_grd_is_global: no!</div><div>GMT_boundcond_param_prep determined edgeinfo: gn = 0, gs = 0, nxp = 0, nyp = 0</div><div>GMT_grd_is_global: no!</div><div>/opt/shakemap/bin/../bin/topo2grd 9583161 -128.900000/-108.900000/26.323000/42.803000 0.025/0.025 regime=active </div>
<div>Using /opt/shakemap/dem. Final resolution fixed at 0.025.</div></div><div><br></div><div><br></div><div style>Kind Regards from Panama,</div><div><br></div></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 1:53 AM, Branden Christensen <span dir="ltr"><<a href="mailto:branden.christensen@osop.com.pa" target="_blank">branden.christensen@osop.com.pa</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="im">Bruce:<div><br></div><div><br></div><div>I respond in line below. </div><div><br></div>
</div>
<div class="gmail_extra"><div class="im"><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><div class="gmail_quote"><div class="im">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><div>osop@osop-displays2:/opt/shakemap/bin$ cat ../data/9583161/richter/xRGN1Kclm2.xy</div><div>-118.900000 34.563000</div></div><div class="im"><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><div>Can you be more specific? In the grind binary? </div><div class="im"><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></div><br></div></div>
</blockquote></div><br></div>