Zalachoris and Rathje 2019 gmpe

57 views
Skip to first unread message

Erika Schiappapietra

unread,
Jan 24, 2024, 6:49:17 AMJan 24
to OpenQuake Users
Hi All,

I think I spotted an error in the Zalachoris and Rathje 2019 gmpe script. 
The magnitude scaling factor (eq. 5) is valid for Mb <= Mw < 5.8, whereas the "=" is missing in the python code [between = (mag > Mb_) & (mag < 5.8)].

This lead to an error when you plot the spectra for some magnitude values. 
I'm sorry but I cannot upload any figure that show the possible error.

Have a nice day,
Erika

Peter Pažák

unread,
Jan 30, 2024, 4:33:05 PMJan 30
to OpenQuake Users
Hi Erika, I think you are right, this is the illustration of the problem:

from openquake.hazardlib import imt
import numpy as np
from openquake.hazardlib.gsim.zalachoris_rathje_2019 import ZalachorisRathje2019
from openquake.hazardlib.gsim.zalachoris_rathje_2019 import _get_ZR19_magnitude_term

zr = ZalachorisRathje2019()
C_ZR19 = zr.COEFFS_ZR19[imt.SA(0.45)]
print(C_ZR19["Mb"]) #this will be = 4

mag = np.array([3.0,3.5,4.0,4.5,5.0,5.5,6.0,6.5])

print(_get_ZR19_magnitude_term(C_ZR19,mag))

#output: [ 0.4038   0.4038  -0.35472  0.1931  -0.0176  -0.2283  -0.35472 -0.35472]
#for magnitude 4 it is the term is incorrect

should be
between = (mag >= Mb_) & (mag < 5.8)

Dátum: streda 24. januára 2024, čas: 12:49:17 UTC+1, odosielateľ: erika.schi...@gmail.com

Michele Simionato

unread,
Jan 31, 2024, 12:32:33 AMJan 31
to OpenQuake Users
This is fixed in current master.
Thanks for signalling the issue!

             Michele
Reply all
Reply to author
Forward
0 new messages