How to calculate the occurrence_rate for a rupture?

213 views
Skip to first unread message

Aulia Khalqillah

unread,
Jul 18, 2023, 4:14:04 AM7/18/23
to OpenQuake Users
Hi,

I just simulate the hazard calculation by using event based. In the hdf5 file, there is rupture dataset. In this file, each rup_id has its own occurrence_rate. How to calculate this occurrence_rate for each rup_id? Is the Gutenberg-Richter relationship used for occurrence_rate calculation?

I hope anyone can help answer these questions. Thanks

Aulia K

Peter Pažák

unread,
Jul 21, 2023, 4:34:13 AM7/21/23
to OpenQuake Users
Hi,

all these calculations are done by the engine in the background and the output is saved to hdf5 during the runs,
if you want to understand in more detail, you can study the code and/or calculate the rates using a sample script:

from openquake.hazardlib.source import PointSource
from openquake.hazardlib.mfd import TruncatedGRMFD
from openquake.hazardlib.scalerel import WC1994
from openquake.hazardlib.geo import Point, NodalPlane
from openquake.hazardlib.pmf import PMF
from openquake.hazardlib.tom import PoissonTOM

src = PointSource(
    source_id='1',
    name='point',
    tectonic_region_type='Active Shallow Crust',
    mfd=TruncatedGRMFD(min_mag=5., max_mag=6.5, bin_width=0.1, a_val=0.01, b_val=0.98),
    rupture_mesh_spacing=2,
    magnitude_scaling_relationship=WC1994(),
    rupture_aspect_ratio=1,
    temporal_occurrence_model=PoissonTOM(50.), #50 years investigation time
    upper_seismogenic_depth=2.,
    lower_seismogenic_depth=12.,
    location=Point(9.1500, 45.1833,30),
    nodal_plane_distribution=PMF([(1., NodalPlane(strike=45, dip=50, rake=0))]),
    hypocenter_distribution=PMF([(1, 10.)]) #depth 10 km
)

ruptures = [r for r in src.iter_ruptures()] #sample the ruptures in 50 years

print(ruptures[0].mag) #gives 5.05 as magnitude of the first rupture
print(ruptures[0].occurrence_rate) #gives 2.6023325356665764e-06 as a corresponding occurrence rate

which is indeed the occurrence rate for magnitude 5.5:

print(TruncatedGRMFD(min_mag=5., max_mag=6.5, bin_width=0.1, a_val=0.01, b_val=0.98).get_annual_occurrence_rates()) #gives among others 5.05, 2.6023325356665764e-06

Hope this helps
Peter

Dátum: utorok 18. júla 2023, čas: 10:14:04 UTC+2, odosielateľ: auliakhalq...@gmail.com

Aulia Khalqillah

unread,
Oct 21, 2023, 9:51:17 AM10/21/23
to OpenQuake Users
Thank you for your response. This is very helpful information.

Based on the script that you showed, we need the parameters of a-value and b-value in truncated GR MFD. How do we calculate these parameters for the simple fault source. Do we need the earthquake distribution around the correspond fault ?

Thank you for the attention.

Aulia K

Aulia Khalqillah

unread,
Jul 2, 2025, 1:22:45 AMJul 2
to OpenQuake Users
Hi Peter and everyone.

I came back to this thread because I want to get the confirmation about the occurrence rate that I have calculated through the event-based mode for the single source model (subduction interface). I applied the TruncatedGRMFD to calculate the occurrence rate where the a-value = 5.9, b-value = 0.79, bin_width = 0.1, min_mag = 6.5, and max_mag = 9.1.

I have tried to calculate this through the OpenQuake engine, then produced the ruptrue file corresponding to each magnitude and its occurrence rate. Also, I have tried to calculcate the occurrence rate directly using TruncatedGRMFD module in a Python script (attached) by using the above parameters.

Both method gives different results for the occurrence rate given each magnitude. Example,

Mag | Occurrence Rate OQ-engine | Occurrence Rate Direct Calculation
6.55 | 0.00269678886979818 | 0.968147176087502

Is my Python code correct to calculate the occurrence rate? I attach the corresponding files.

Many thanks for the attention.

Aulia K
ruptures.xlsx
calculate_occurrence_rate.ipynb

Peter Pažák

unread,
Jul 14, 2025, 6:31:31 AMJul 14
to OpenQuake Users
Hi Aulia,

the calculation in the notebook, essentially setting up a truncated GR MFD which calculates the rates per magnitude bin is correct.
The output in the excel: the occurrence rates are per each location, so if you for example sum all the frequencies in the excel for M 6.55, it gives 0.7281.
Some of the ruptures are most probably missing, because they are too far from the exposure/hazard sites.
I believe if you would have sites covering the whole source zone densely, you would get exactly the total rate of 0.9681 as from the MFD, the main reason for
the observed difference is that the rate is divided into all discretized points in the (area) source.

Peter


Dátum: streda 2. júla 2025, čas: 7:22:45 UTC+2, odosielateľ: auliakhalq...@gmail.com

Aulia Khalqillah

unread,
Jul 20, 2025, 5:37:51 PMJul 20
to openqua...@googlegroups.com

Dear Peter,

Thank you for your explanation.

Best regards,
Aulia K


--
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.
To view this discussion visit https://groups.google.com/d/msgid/openquake-users/24a49ae5-33d5-4716-a32c-a68fd369e130n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages