<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Bruce,<div><br></div><div>Thanks. I will try that flavor (BA08 with Youngs97). I really just want to do the type of default site corrections (Borcherdt) that version 3.2 was doing. So I do think Youngs97 is the way to go. (I had the earlier misconception that Hazus involved the generic site amplification approach, and if one had a GMPE that did not have a GMPE-specific site correction approach, then one should use Hazus.)&nbsp;</div><div><br></div><div>I'll let you all know how it goes.</div><div><br></div><div>Thanks again!</div><div>Georgia</div><div><br></div><div><br><div><div>On Dec 20, 2010, at 5:15 PM, Bruce Worden wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Hi Georgia,<br><br>Another option would be to start with BA08, which uses Rjb already. It is a fairly simple module, except for the site corrections (which are wildly complicated), but you can just toss that code and use the Youngs97 approach of forcing Borcherdt-style site corrections, or the MA2005 approach of using another module's site corrections.<br><br>Bruce<br><br>On Dec 20, 2010, at 7:03 AM, Georgia Cua wrote:<br><br><blockquote type="cite">Hi Bruce,<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Thanks very much for your pointers. I'll take a closer look at my _makeAmps() subroutine. (I copied what is currently there from Small.pm). I'll probably start over with MA2005 as my starting template and just modify the regression calculation as the first step, then switch from using hypocentral distance to Rjb as a separate step.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Thanks again!<br></blockquote><blockquote type="cite">Georgia<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">On Dec 18, 2010, at 10:29 PM, Bruce Worden wrote:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><blockquote type="cite">Hi Georgia,<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Sorry about the late response. The problem you are having is with your calls to _makeAmps(). Note that in MA2005 they supply the full compliment of arguments, but your calls have a truncated list. When _makeAmps calls siteCorrectList, some of the args are undefined, resulting in the error you are seeing.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Picking a prototype GMPE module can be tricky. I've implemented most, but not all, to make some attempt to produce ground motions to the ShakeMap default Vs30. But some modules don't have native site corrections, so I cheat a bit and use something related. In other cases, I use the native correction, but since that correction is relative to the no-correction value, I have to first remove the SM default correction and then apply the site-specific correction.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">In any event, you do not need to implement a GMPE-native site correction function. You can do what Youngs97 does, and just refuse to allow grind to run with -gmpesc or -nativesc. In this case you just configure your Borcherdt tables to be relative to the base rock type that your GMPE assumes.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Bruce<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">On Dec 15, 2010, at 5:57 AM, Georgia Cua wrote:<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">Dear Bruce,<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">I'm trying to code a new GMPE module for our ShakeMap v3.5 installation in Switzerland. It has the functional form of Cua and Heaton (unpublished) constrained with Swiss weak motion data and NGA strong motion data, and should be valid in the magnitude range 2 &lt;= M &lt;= 8.<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">I have written the new module (SwissNGA.pm) based on Small.pm (because it uses Rjb as a distance measure) and MA2005.pm (because it does not have a GMPE-spefic site amplification approach, and should thus use the Hazus module).<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">Essentially the new module is Small.pm with a few lines/subroutines replaced with portions of MA2005.pm (from Constructor, and subroutines siteCorrectGrd, siteCorrectList), and of course, changing the calculation of the regression equation.<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">In theory, should this result in a working module, or is the basic approach flawed?<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">I have installed the new module and tried running it on a scenario event (just event information, no PGM observations), resulting in the following error<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">shake@phantom:~/opt/shakemap/bin$ ./shake -event newtest -verbose<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">shake: Running: '/rdsk/projects/shake/opt/shakemap-3.5-vanilla/bin/../bin/grind -event newtest -qtm -lonspan 5.5 -boundcheck -xml -lonspan 5.5 -psa'<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">grind: Predictive map: no data in '/rdsk/projects/shake/opt/shakemap-3.5-vanilla/bin/../data/newtest/input'<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">grind: Using fixed boundary 5.6 45.6 10.8 47.8<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">grind: 47.8:45.6:10.8:5.6<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">grind:<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">arg &lt;lons&gt; must be an array ref at /rdsk/projects/shake/opt/shakemap-3.5-vanilla/bin/../perl/lib/Shake/GMPE/SwissNGA.pm line 306<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">shake: Error in grind: 65280<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">Is the approach of basing the new module primarily on Small.pm (with portions from MA2005.pm) a valid approach, or are there some subtleties that I am completely bulldozing over? Do you have any more detailed documentation/instructions for writing new modules?<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">Sorry if this is not the type of question to be sending to the developer list!<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">Thanks,<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">Georgia<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">PS. the new module SwissNGA.pm is attached<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">&lt;SwissNGA.pm&gt;&lt;ATT00001.html&gt;<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">_______________________________________________<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">Shake-dev mailing list<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><a href="mailto:Shake-dev@geohazards.usgs.gov">Shake-dev@geohazards.usgs.gov</a><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><a href="https://geohazards.usgs.gov/mailman/listinfo/shake-dev">https://geohazards.usgs.gov/mailman/listinfo/shake-dev</a><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">-----------------------------<br></blockquote><blockquote type="cite">Dr. Georgia Cua<br></blockquote><blockquote type="cite">Swiss Seismological Service<br></blockquote><blockquote type="cite">Institute of Geophysics<br></blockquote><blockquote type="cite">ETH Zurich, NO H61<br></blockquote><blockquote type="cite">Sonneggstr 5<br></blockquote><blockquote type="cite">CH-8092 Zurich<br></blockquote><blockquote type="cite">Switzerland<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Tel: &nbsp;+41-44-633-7574<br></blockquote><blockquote type="cite">Fax: +41-44-633-1065<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><a href="mailto:georgia.cua@sed.ethz.ch">georgia.cua@sed.ethz.ch</a><br></blockquote><blockquote type="cite">-----------------------------<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><br></div></blockquote></div><br><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div><br class="Apple-interchange-newline"><br class="khtml-block-placeholder"></div><div>-----------------------------</div><div>Dr. Georgia Cua</div><div>Swiss Seismological Service</div><div>Institute of Geophysics</div><div>ETH Zurich, NO H61</div><div>Sonneggstr 5</div><div>CH-8092 Zurich</div><div>Switzerland</div><div><br class="khtml-block-placeholder"></div><div>Tel:&nbsp; +41-44-633-7574&nbsp; &nbsp;</div><div>Fax: +41-44-633-1065&nbsp; &nbsp;</div><div><br class="khtml-block-placeholder"></div><div><a href="mailto:georgia.cua@sed.ethz.ch">georgia.cua@sed.ethz.ch</a></div><div>-----------------------------</div><br class="Apple-interchange-newline"></span><br class="Apple-interchange-newline">
</div>
<br></div></body></html>