Using shakemap + scenario_damage with a consequences file

76 views
Skip to first unread message

Nick Horspool

unread,
Oct 25, 2021, 6:15:19 PM10/25/21
to OpenQuake Users
Hello OQ'ers,

I am trying to run a scenario_damage calculation with a consequences file using a locally imported ShakeMap. 

I can run the scenario_damage calculation with a consequences files using a fault rupture and it produces outputs of the consequence 'losses'. However, when I run it with the ShakeMap following the guidelines here (https://docs.openquake.org/oq-engine/advanced/risk-features.html#scenarios-from-shakemaps) it runs through to completion and gives me damage statistics but does not produce the consequence losses column in the output files. 

I specified the consequence file in the prep job.ini file as noted above. Just wondering if there is some other place I am meant to specify the consequences file when using ShakeMap imports for scenario damage mode. 

Thanks!
Nick

Michele Simionato

unread,
Oct 26, 2021, 12:31:37 AM10/26/21
to OpenQuake Users
Did you check the scenario damage demo in https://github.com/gem/oq-engine/tree/master/demos/risk/ScenarioDamage ?
That one is meant to demonstrate the calculation of consequences. HTH,

      Michele Simionato

Nick Horspool

unread,
Oct 26, 2021, 1:00:06 AM10/26/21
to openqua...@googlegroups.com
Hi Michele, 

Yes I can get the scenario damage calculator to work with calculation of consequences(with a fault rupture model) but it seems when I try using a shakemap for the hazard with scenario damage it doesn’t compute the consequences. 

I wonder if it’s to do with preparing the risk model as a first step then running the scenario damage when using shakemaps? 

Nick

--
You received this message because you are subscribed to a topic in the Google Groups "OpenQuake Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/openquake-users/mW-RJBXwqHQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to openquake-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openquake-users/802e0eb5-5d08-4bca-9ba5-568f718fc347n%40googlegroups.com.

Michele Simionato

unread,
Oct 26, 2021, 1:09:57 AM10/26/21
to OpenQuake Users
Perhaps, I cannot say without seeing the files that you are using.

         Michele

Nick Horspool

unread,
Oct 26, 2021, 1:49:07 AM10/26/21
to OpenQuake Users
Thanks Michele. I appreciate your help. You can download a zip file of the working directory here (https://share.gns.cri.nz/8RW1Y5LS5IVA/ScenarioDamageShakeMap.zip.html) . It is the scenario_damage demo and extended to use ShakeMaps (using a shakemap of the 2016 Nepal earthquake). 

I first ran the normal demo to get consequence losses:
oq engine --run job_hazard.ini job_risk.ini --exports csv

and this produces the losses (from the consequences file) in avg_losses-mean_XXX.csv and also as second to last column in risk_by_event_XXX.csv

I then set up the shakemap option using your instructions here (https://docs.openquake.org/oq-engine/advanced/risk-features.html#scenarios-from-shakemaps). I set up a parent calculation as instructed to prepare the risk inputs. I referenced the consequence file in that, and ran that:

oq engine --run job_prepare_risk.ini

This ran fine. Then I ran the scenario_damage calculator importing a local shakemap:

oq engine --run job_shakemap_risk.ini --hc=-1 --exports csv

This ran through and produced damage outputs. But didnt produce the avg_losses-mean_XXX.csv file or the losses column risk_by_event_XXX.csv

Any assistance would be very welcome. 

Michele Simionato

unread,
Nov 8, 2021, 9:14:33 AM11/8/21
to OpenQuake Users
It took a long time, but today I was free to look at your issue, Nick. The problem is that in your job_shakemap_risk.ini you have
the lines

[consequence]
consequence_file = {'taxonomy': 'consequences.csv'}

Change that to

[consequence]
consequence_file = {'taxonomy': 'consequences.csv'}
structural_fragility_file = structural_fragility_model.xml

and the engine will magically work. In the next version I am going to raise an error if the user specifies the consequences
without the fragilities.

             Michele

Nick Horspool

unread,
Nov 8, 2021, 4:58:38 PM11/8/21
to OpenQuake Users
Many thanks for looking into that Michele! That works now :) 

Nick
Reply all
Reply to author
Forward
0 new messages