[Shake-dev] tag bug?

Peter Lombard lombard at seismo.berkeley.edu
Wed Feb 24 20:06:24 UTC 2010


ShakeMap Developers,

I think I have found a bug in "tag", the program for tagging earthquakes as
mainshocks, scenarios, historic events, etc. Apparently this has been around
since at least the addition of the mysql database.

I want an event to show up in the "Major Earthquakes" tab of the Archive page
(this is on old-style ShakeMap html pages, not the USGS php pages.) As I
understand it, I have to run the following command to make this happen:
  tag -event 1046962 -historic 'Coyote Lake' -mainshock

After I do this, I can see in the mysql database that the
earthq2uake.mainshock field is set to "historic".

But when I run "shake -event 1046962", the tag program is run again by shake
like this: 
   tag -event 1046962 -mainshock

This causes the earthq2uake.mainshock field to get changed from "historic" to
"current". And the event does not show up in the "Major Earthquakes" tab.

The only way I can make the event show up in the "Major Earthquakes" tab is to
NOT run shake on the event, but to run the commands after tag (mapping, genex,
transfer, etc.) after I run the first "tag" command above.

I see in the comments in "tag" that is specifically does not save its
arguments by calling Shake::Version->saveFlags() because this might create a
conflict with what tag writes to the earthquake table. If that is the case,
then shouldn't tag also query the earthquake table to see what was put there
previously? It appears that tag makes no such query.

Pete


More information about the Shake-dev mailing list