[Shake-dev] Problems with generating scenarios

Renate Hartog renate at ess.washington.edu
Fri Mar 21 16:02:08 MST 2008


Hi Glenn,

We've run into the same problem. What happens is that genex tries to 
rebuilt the website with old events in it. It gets that info from the 
database: We had some events in our database with empty tabsol's. If you 
remove those events the problem goes away..

If you look in the shake-dev archive and search for a post from Steve 
Malone you'll find a brief descirption of this problem too and a similar 
reply.

Renate

On Fri, 21 Mar 2008, Glenn Thompson 
wrote:

> More on this. It is not a problem with the database, since when I tried to scenarios on another ShakeMap system (the database of which has not been hand edited), the same problem occurs.
>
> I found it necessary to modify /usr/local/ShakeMap/perl/lib/Genex/Html.pm.
> I was having a problem with blank tabsol & tzone values around line 700 in that routine (what are those variables?). Where the blank values were coming from I am none the wiser. So a hack for now, I simply added a line in there that if tabsol is blank, just to return timelocal(0, 0, 0, 1, 0, 0). This at least allows the ShakeMap to be generated. If anyone has any insight into where the blank tabsol/tzone values are coming from, that could help me determine the real problem.
>
>> ----------------------------------------------------------------------
>>
>> Message: 1
>> Date: Thu, 20 Mar 2008 14:13:31 -0800
>> From: Glenn Thompson <glenn at giseis.alaska.edu>
>> Subject: [Shake-dev] Problems with generating scenarios
>> To: shake-dev at geohazards.usgs.gov
>> Message-ID: <1206051211.1232.1194.camel at swarm>
>> Content-Type: text/plain; charset=ISO-8859-1
>>
>> I am having problems with the genex program, when it calls /usr/local/ShakeMapPipe/perl/lib/Genex/Html.pm, as you can see by the following run. Its actually crashing on a time subroutine, presumably because month is 0. Where the call is coming from I am not sure (note the strings 'Build' and 'Recent' are not in the programs  bin/genex).
>>
>> I have successfully generated scenarios before. But I cannot now regenerate these previously successful scenarios.
>>
>> I don't see any problems with the input xml files.
>>
>> The problem may have arisen after I had to manually edit our MySQL database. The cancel program would not remove old, unwanted, scenarios. So I went into that database, and deleted rows corresponding to scenarios we wished to disappear from the scenarios.html page from the earthquake, shake_runs and shake_version tables.
>>
>> If anyone has any insight into how to move forward, please let me know.
>>
>> Related questions:
>>
>> 1. In the event.xml file for a scenario, in the earthquake tag, does the id field have to be a number, or should it reflect the name of the scenario (e.g. 196403190336_se)? I was wondering if putting alphabetic characters in there had something to do with the cancel program not being able to remove scenarios from the database successfully. I have generally been calling my scenarios something like 'Denali_Fault_se', using this for the directory name (under data/) and for the id field.
>>
>> 2. For some scenarios my predecessor generated here, the grid.xml file is full of zeros. When I copied the input files to a new directory (and changed the id), last week I was able to generate scenarios with valid grid.xml files. Yet when I reran the original scenarios, first deleting all directories apart from input, once again there was a blank grid.xml file. What could be causing this? It seems there is absolutely no difference in the input data, so is there perhaps something in the MySQL database that stops a valid grid.xml file being generated?
>>
>> =======================================================
>> Output follows from running scenario 196403280336_se:
>> =======================================================
>>
>>
>> shake -event 196403280336_se
>> grind: Running scenario 196403280336_se with flags: -event 196403280336_se
>> -noforward -qtm -v -psa
>> Using Regression::BJF97 for regression
>> Regression: No source mechanism specified. Using default.
>> Reading QTM grid.
>> grind: Using fixed boundary -153/60/-143/71
>> grind: 71.4:59.6:-142.6:-153.4
>> grind:
>>
>> Big bound: -153.400000/-142.600000/59.666667/71.400000 :/
>> Map bound: -153.000000/-143.000000/60.066667/71.000000
>> Default site correction for 1 stations.
>> grind: Magnitude (9.2) exceeds cutoff (7.0); not flagging outliers.
>> grind: Bias 1.000 1.000 1.000 1.000 1.000
>>
>> grind: 0 stations flagged out this iteration
>> grind: Using new gridding parameters:
>> grind: X: 145 at 0.075 deg. spacing
>> grind: Y: 157 at 0.075 deg. spacing
>> grind: Total points: 22765
>> Done initializing grid, now iterating (22765).
>> Done with point 01000.
>> Done with point 02000.
>> Done with point 03000.
>> ...
>> (content omitted)
>> ...
>> 7 tvmap_bare.ps tvmap_Running: /usr/local/ShakeMapPipe/bin/../bin/echo
>> -147.648000 61.017000 | /opt/free/gmt/bin//psxy -P -R-153/-143/60.066667/71
>> -JM5.0 -Sa0.20 -W6/0 -L -O -K
>> Running: /usr/local/ShakeMapPipe/bin/../bin/echo 2.5 6.7021 96 69.5436087980631
>> 1 6 SCENARIO | /opt/free/gmt/bin//pstext -JX13.4042/5.0 -R0/13.4042/0/5.0 -N -S4
>> -O -K
>> Running: /opt/free/gmt/bin//psbasemap -P -R-153/-143/60.066667/71 -JM5.0 -Bwesn
>> -Lfx1.75/1.0/61.017/150m -O
>> Running: /opt/free/gmt/bin//psbasemap -P -R-153/-143/60.066667/71 -JM5.0
>> -Ba120mf60mWSen -O
>> Done with tvmap
>> Running: /opt/free/gmt/bin//grdimage
>> /usr/local/ShakeMapPipe/bin/../data/196403280336_se/mapping/tmp_mmi.grd -P
>> -R-153/-143/60.066667/71 -JM5.0
>> -C/usr/local/ShakeMapPipe/bin/../lib/mapping/Ii_ntsc.cpt -K
>> Running: /opt/free/gmt/bin//pscoast -Df -P -R-153/-143/60.066667/71 -JM5.0 -S0
>> -O
>> Creating 'genex' directory
>> Creating shape files
>> genex: /usr/local/ShakeMapPipe/bin/../bin/contour -g pga.grd=1 -C 0.04 -f 0.02
>> -Z 0.0087 -T 4 -o shape_hazus/pga >>
>> /usr/local/ShakeMapPipe/bin/../logs/shape.log 2>&1
>> Updating the web database with the new event info
>> Creating 'genex/ftp/196403280336_se' directory
>> Making JPEG's from PostScript files
>> genex: Running: PATH=$PATH:/usr/sfw/bin/; export PATH; /usr/sfw/bin/convert
>> -colorspace RGB -quality 90 -crop 504x1109+0+-317 tvmap.ps tvmap.jpg
>>
>> genex: /usr/local/ShakeMapPipe/bin/../bin/contour -g pgv.grd=1 -C 4.0 -f 2.0 -Z
>> 0.3423 -T 4 -o shape_hazus/pgv >> /usr/local/ShakeMapPipe/bin/../logs/shape.log
>> 2>&1
>> genex: Running: PATH=$PATH:/usr/sfw/bin/; export PATH; /usr/sfw/bin/convert
>> -colorspace RGB -quality 90 -crop +0+165 psa30.ps psa30.jpg
>>
>> genex: Running: PATH=$PATH:/usr/sfw/bin/; export PATH; /usr/sfw/bin/convert
>> -colorspace RGB -quality 90 -crop +0+165 pgv.ps pgv.jpg
>>
>> genex: Running: PATH=$PATH:/usr/sfw/bin/; export PATH; /usr/sfw/bin/convert
>> -colorspace RGB -quality 90 -crop +0+57 intensity.ps intensity.jpg
>>
>> genex: Running: PATH=$PATH:/usr/sfw/bin/; export PATH; /usr/sfw/bin/convert
>> -colorspace RGB -quality 90 -crop +0+165 psa10.ps psa10.jpg
>>
>> genex: Running: PATH=$PATH:/usr/sfw/bin/; export PATH; /usr/sfw/bin/convert
>> -crop 360x965+122+-231 -transparent black ii_overlay.ps ii_overlay.png
>>
>> genex: Running: PATH=$PATH:/usr/sfw/bin/; export PATH; /usr/sfw/bin/convert
>> -colorspace RGB -quality 90 -crop +0+165 pga.ps pga.jpg
>>
>> genex: Running: PATH=$PATH:/usr/sfw/bin/; export PATH; /usr/sfw/bin/convert
>> -colorspace RGB -quality 90 -crop 504x1109+0+-317 tvmap_bare.ps tvmap_bare.jpg
>>
>> genex: Running: PATH=$PATH:/usr/sfw/bin/; export PATH; /usr/sfw/bin/convert
>> -colorspace RGB -quality 90 -crop +0+165 psa03.ps psa03.jpg
>>
>>
>> genex: Running: PATH=$PATH:/usr/sfw/bin/; export PATH; /usr/sfw/bin/convert
>> -colorspace RGB -quality 90 -crop +0+165 psa03.ps psa03.jpg
>>
>> Preparing info for clickmaps
>> Collecting files for the web site
>> Cooking web pages
>> Build homepage
>> Build 'Most Recent Earthquake' table
>> Build 'Other Recent Earthquakes' list
>>   events [] in list
>> Month '-1' out of range 0..11 at
>> /usr/local/ShakeMapPipe/bin/../perl/lib/Genex/Html.pm line 701
>> shake: Error in genex: 65280
>> user=207.78 sec, system=12.38 sec, elapsed=3:36.50, cpu use=101.6%,
>>  swaps,  minor faults,  major faults,  reads,  writes,
>> average size:  shared  unshared  total, max:  * 2
>>
>>
>>
>> ------------------------------
>>
>> _______________________________________________
>> Shake-dev mailing list
>> Shake-dev at geohazards.usgs.gov
>> https://geohazards.usgs.gov/mailman/listinfo/shake-dev
>>
>>
>> End of Shake-dev Digest, Vol 19, Issue 2
>> ****************************************
> _______________________________________________
> 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