KeyError in Classical Damage

41 views
Skip to first unread message

Liliana Oliveira

unread,
Jun 3, 2017, 7:11:41 PM6/3/17
to OpenQuake Users
Hello everyone!

I try to run the Classical Damage Calculator with my own exposure_file and fragility_file and use my previous hazard_curves. However, I receive this Error:


KeyError: '\n  File "/usr/lib/python2.7/dist-packages/openquake/commonlib/parallel.py", line 113, in safely_call\n    got = func(*args)\n  File "/usr/lib/python2.7/dist-packages/openquake/calculators/classical_damage.py", line 46, in classical_damage\n    result[r] += dict(zip(ordinals, out.damages))\nKeyError: 9'


I don't understand what's the problem.

Thanks a lot,
Liliana.

Michele Simionato

unread,
Jun 4, 2017, 1:35:07 AM6/4/17
to OpenQuake Users
This is a case where you should send all of your input files to engine....@openquake.org, otherwise we cannot debug your issue. It is a first for us, I assume there is something wrong with your exposure or fragility functions. Also, which version of the engine are you using? Perhaps it is already fixed in the latest version.

Daniele Viganò

unread,
Jun 5, 2017, 3:13:41 AM6/5/17
to openqua...@googlegroups.com

Looking at the path (/usr/lib/python2.7/dist-packages/openquake/commonlib/parallel.py) it looks like that you are still running an old version of the Engine (< 2.2, latest stable is 2.4 and has code inside /opt/openquake). As Michele suggested you should try to update the Engine first (please have a look at https://github.com/gem/oq-engine/blob/engine-2.4/doc/whats-new.md before running the upgrade).

Cheers,
Daniele

--
You received this message because you are subscribed to the Google Groups "OpenQuake Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openquake-use...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
DANIELE VIGANÒ | System Administrator | Skype dennyv85 | +39 0382 5169882
GLOBAL EARTHQUAKE MODEL | working together to assess risk

Liliana Oliveira

unread,
Jun 9, 2017, 10:26:17 AM6/9/17
to OpenQuake Users
Hello,

I'm running 2.1 version of Engine. I change to 2.4 version and it's running!
Thank you.

I have another question. In OpenQuake Engine Risk Science Book there is no explanation for an Classical PSHA Damage Calculator. In addition to OpenQuake Engine User Manual where can I find a theoretical explanation of this calculator?

Thanks a lot,
Liliana. 

Anirudh Rao

unread,
Jun 9, 2017, 10:50:22 AM6/9/17
to openqua...@googlegroups.com
Hi Liliana, 

The theoretical basis for the Classical PSHA-based Damage Calculator as implemented in OpenQuake can be found in the attached pdf.

We're working on updating the Risk Science book with the recent additions to the OpenQuake risk library, and should have a new version out soon!

Regards,
Anirudh



Best regards,
ANIRUDH RAO    seismic risk engineer    LinkedIn: Anirudh Rao    +39-0382-5169-936

GLOBAL EARTHQUAKE MODEL    working together to assess risk
To unsubscribe from this group and stop receiving emails from it, send an email to openquake-users+unsubscribe@googlegroups.com.
OpenQuake Classical PSHA-Based Damage Calculator.pdf

Liliana Oliveira

unread,
Jun 10, 2017, 7:31:09 AM6/10/17
to openqua...@googlegroups.com
Thank you very much, Anirudh!

Regards,
Liliana.

2017-06-09 15:49 GMT+01:00 Anirudh Rao <aniru...@globalquakemodel.org>:
Hi Liliana, 

The theoretical basis for the Classical PSHA-based Damage Calculator as implemented in OpenQuake can be found in the attached pdf.

We're working on updating the Risk Science book with the recent additions to the OpenQuake risk library, and should have a new version out soon!

Regards,
Anirudh



Best regards,
ANIRUDH RAO    seismic risk engineer    LinkedIn: Anirudh Rao    +39-0382-5169-936
GLOBAL EARTHQUAKE MODEL    working together to assess risk
GEM -  globalquakemodel.org     @GEMwrld      GEMwrld



--
Liliana Oliveira
Reply all
Reply to author
Forward
0 new messages