Clarification on Discrepancy in Loss Calculation Using OpenQuake

56 views
Skip to first unread message

bahar r

unread,
Jun 18, 2024, 1:54:13 AMJun 18
to OpenQuake Users
Dear OQ Group and Developers,

I previously reached out regarding a query about scenario-based risk assessment using GSC 2020 stable crust ground motion models in OpenQuake, and I would like to elaborate further on my question.

Here's a summary of the steps I followed:

1. Model and Configuration:
   - I used the GSC 2020 stable crust ground motion models, which include 16 branches.
   - I set aggregate_by = id in the job.ini file to obtain loss distribution results corresponding to each ground motion field.
   - I specified number_of_ground_motion_fields to 1000, resulting in a total of 16,000 ground motions fields(gmf).

2. Data Extraction:
   I utilized the attached Python code to extract loss values corresponding to each ground motion field from the OpenQuake HDF5 output file. 

3. Discrepancy Issue:
   OpenQuake by default generates the Average Asset Losses Statistics output. However, when I compare the mean of the results obtained from my code with the results from the OpenQuake output, I notice a discrepancy.

Do you have any insights into why this discrepancy might occur? I would greatly appreciate any guidance or suggestions on how to resolve this issue.

Thank you in advance for your assistance.

Best regards,
Bahar
OQHDF5.py

Anirudh Rao

unread,
Jun 18, 2024, 3:33:09 AMJun 18
to OpenQuake Users
Hi Bahar,

How did you obtain the weighted average of the results from the 16 branches, given that the weights are IMT-dependent?

Anirudh

bahar r

unread,
Jun 22, 2024, 6:35:03 PMJun 22
to OpenQuake Users
Hello,

Thank you for your response and sorry for the delay in my reply.

I was reviewing the results and trying to understand which results are related to which branches. The output I received contains the following columns: event_id, id (my exposures id), agg_id (this column has the same value for each of my exposures), loss_id ( structural  , non-structural, and contents), variance, and loss.

The event_id column has 16,000 values for each of my exposures, which I understand comes from 16 branches and 1,000 simulations. However, I am unsure how to determine which event_id corresponds to which ground motion model.

Could you please provide guidance on how to diagnose or identify the event_id associated with each ground motion model? Any additional information or documentation would be greatly appreciated.

Thank you for your assistance.


Bahar


Michele Simionato

unread,
Jun 24, 2024, 1:19:00 AMJun 24
to OpenQuake Users
The table "event" in the datastore contains the associations event_id -> rlz_id while the command
 `oq show realizations <calc_id>` will give you the associations rlz_id -> GMPE.

HTH,

                               Michele

bahar r

unread,
Jun 24, 2024, 6:34:09 PMJun 24
to OpenQuake Users

Thank you for your prompt response.

I am currently using the WebUI version of OQ and download results directly from the WebUI. However, for obtaining the distribution of loss, I utilize a Python script to extract data from the HDF5 file.

Could you please advise if any additional command or modification is needed in the job.ini file to include a separate column for the rlz_id in the output?

I have attached the Python code used for this process for your reference. The details of the script can also be found in this discussion: https://groups.google.com/g/openquake-users/c/IsM4kV7ut-U/m/KfcSxIScAAAJ

Thank you for your assistance.


Bahar


Michele Simionato

unread,
Jun 25, 2024, 12:16:14 AMJun 25
to OpenQuake Users
I am sorry Bahar, but you must realize that the OpenQuake engine is free software and as a such we help on a best effort basis. The mailing list is for helping people to install the engine and solving simple questions; you are now asking  many deep questions that would require hours to reply. For that level of help you would need to become sponsor or get some kind of support contract.

    Michele

Reply all
Reply to author
Forward
0 new messages