[Shake-dev] ShakeMap bug fixes

Kuo-Wan Lin klin at usgs.gov
Wed Feb 18 14:42:17 GMT 2009


Pete,

Since this is a CISN standard, and soon ANSS standard, we will support 
it.  I do want to see these CISN-specific code contained, probably with 
a new CISN class module which is also backward compatible.  This way the 
CISN folks can make changes as they see fit.  I will look into how to 
create this.


Thanks,

Wan

Peter Lombard wrote:
> Kuo-Wan,
>
> There are two perl modules (in perl/lib/Shake) that query a CISN-style Oracle
> database: Event.pm and StationInfo.pm. And there are five ShakeMap programs
> that use these modules ana2xml, db2xml, dig2xml, eq2xml, and queue.
>
> The CISN database normally stores origin times as the number of seconds since
> 1 January 1970 INCLUDING leap seconds. However, the Caltech database has
> elected to store origin times as the number of seconds since 1 January 1970
> NEGLECTING leap seconds. And Caltech is considering changing their database to
> use the leapsecond form of times.
>
> In order to handle these differences, the TrueTime SQL package is used for
> (among other things) converting the database origin time into a string to
> represent calendar time (years, months, days, etc.) The fix that I made to
> Event.pm is essential for anyone using the above programs to access a
> CISN-style database. On the other hand, if you don't have a CISN-style
> database, these programs are of no obvious use for ShakeMap users.
>
> So I ask you please to include the fix to Event.pm in the next ShakeMap
> release.
>
> Pete
>
>
> Kuowan Lin writes:
>  > Thanks Pete for the bug-fix.  We don't use the program db2xml at NEIC 
>  > that I was not aware of it.  I will check it into our repository and 
>  > distribute it and the other updates in the next release.  Is TrueTime a 
>  > PL/SQL package?  If yes, we probably need to stick with generic sql 
>  > statement and make this portion as a customized fix.
>  > 
>  > Also, we have accumulate quite a few of bug-fixes and feature 
>  > improvements for the current ShakeMap code.  Bruce is working on new 
>  > MMIPE and GMPE updates for the new grind program, a major overhaul.  I 
>  > am helping him test the code using the Atlas ShakeMap.  We are hoping to 
>  > wrap things up shortly for a new release and for the purpose of PAGER 
>  > rerun.  This also will get Dave off our back.
>  > 
>  > 
>  > Regards,
>  > 
>  > Wan
>  > 
>  > Peter Lombard wrote:
>  > > Kuo-Wan,
>  > >
>  > > I have found a bug in the ShakeMap program db2xml. This program is used to
>  > > query a CISN-style database to extract ground motion data and generate a
>  > > db_dig.xml file in an event input directory. Until recently this code was
>  > > probably used only at Caltech; as CISN software is being adopted by other
>  > > regional networks, db2xml will see more use.
>  > >
>  > > The bug is that a regular expression so search a unit string for velocity
>  > > units like "cms" also matches the acceleration string "cmss". The result is
>  > > that psa values are being transformed incorrectly.
>  > >
>  > > While I was at it, I cleaned up the code formatting and added a few
>  > > comments. Attached is the new db2xml.
>  > >   
>  > > ------------------------------------------------------------------------
>  > >
>  > >
>  > > I also found some problems in two perl modules in perl/lib/Shake. Both
>  > > Event.pm and Source.pm did not handle leapseconds correctly. The CISN-style
>  > > database has provision for leapseconds, so ShakeMap needs to handle them
>  > > properly. Attached are the two modified codes.
>  > >   
>  > > ------------------------------------------------------------------------
>  > >
>  > >
>  > > Finally, I modified retrieve to print out the time that it starts and
>  > > finishes. This is useful for diagnosing delays in ShakeMap.
>  > >   
>  > > ------------------------------------------------------------------------
>  > >
>  > >
>  > >
>  > > Hopefully these changes will make their way into any upcoming ShakeMap
>  > > release.
>  > >
>  > > Pete
> _______________________________________________
> Shake-dev mailing list
> Shake-dev at geohazards.usgs.gov
> https://geohazards.usgs.gov/mailman/listinfo/shake-dev
>
>   

-- 
Kuo-Wan Lin
U.S. Geological Survey
DFC P.O. Box 25046, MS 966
Denver, CO 80225-0046

klin at usgs.gov
(O) 303-273-8563
(F) 303-273-8600



More information about the Shake-dev mailing list