[Shake-dev] tag bug?

Bruce Worden cbworden at caltech.edu
Mon Mar 1 20:15:36 UTC 2010


Hi Folks,

I've developed a new version of 'tag' that solves the problem Pete  
described, as well as cleans up a couple of other quirks of the  
program. If you are using ShakeMap v3.5, you can get the new version  
from the repository. If you are using v3.2 (or almost any other  
version), you can use the attached code; simply replace <shake_home>/ 
src/shake/tag with this new version and do 'make'.

The new code has a few differences from the existing version:

1. There is now a '-name' flag that takes an argument. This gives the  
event a name for the web pages (whether scenario or historic).

2. The various flags, -invisible, -scenario, -historic, and - 
mainshock, all now have a -no[flagname] version that makes that flag  
go away. -scenario and -historic no longer take arguments. - 
nomainshock will clear any existing designation.

3. If an event is invisible, a scenario, or historic, running tag with  
-mainshock will have no effect on the existing designation.

The program's self documentation explains some of this a bit.

Let me know if you encounter any problems.

Thanks,
Bruce

-------------- next part --------------
A non-text attachment was scrubbed...
Name: tag
Type: application/octet-stream
Size: 13000 bytes
Desc: not available
URL: <http://geohazards.usgs.gov/pipermail/shake-dev/attachments/20100301/05fcdb88/attachment.obj>
-------------- next part --------------



On Feb 24, 2010, at 12:06 PM, Peter Lombard wrote:

> 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
> _______________________________________________
> Shake-dev mailing list
> Shake-dev at geohazards.usgs.gov
> https://geohazards.usgs.gov/mailman/listinfo/shake-dev



More information about the Shake-dev mailing list