Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

initial production of cb19 IA and CAV. #9535

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

emabcede30
Copy link

@emabcede30 emabcede30 commented Mar 20, 2024

I have issue with calc of phi for total aleatory stddev. I want to know which is the correct formula for phi.

phi equation in CB14:

$$\phi = \sqrt{\phi_{\ln(Y_B)}^2 + \phi_{\ln(AF)}^2 + \alpha^2 \phi_{\ln(\text{PGA}_B)}^2 + 2\alpha\rho_{\ln(\text{PGA}),\ln(Y)} \phi_{\ln(Y_B)} \phi_{\ln(\text{PGA}_B)}}$$

phi equation in CB19 spreadsheet:

$$\phi = \sqrt{\phi_{\ln(Y)}^2 + \alpha^2 \phi_{\ln(\text{PGA})}^2 + 2\alpha\rho_{\ln(\text{PGA}),\ln(Y)} \phi_{\ln(Y)} \phi_{\ln(\text{PGA})}}$$

spreadsheet in cb19:
https://journals.sagepub.com/doi/suppl/10.1193/090818EQS212M/suppl_file/10_eeri_35_3_suppl_es1_online.xlsx

spreadheet in cb14:
https://journals.sagepub.com/doi/suppl/10.1193/100614EQS151M/suppl_file/14_eeri_32_2_suppl1_es1-es1_online.xlsx

Reference:

Bozorgnia, Y., & Campbell, K. W. (2016). Ground motion model for the vertical-to-horizontal (V/H) ratios of PGA, PGV, and response spectra. Earthquake Spectra, 32(2), 951-978.

Campbell, K. W., & Bozorgnia, Y. (2014). NGA-West2 ground motion model for the average horizontal components of PGA, PGV, and 5% damped linear acceleration response spectra. Earthquake Spectra, 30(3), 1087-1115.

Campbell, K. W., & Bozorgnia, Y. (2019). Ground motion models for the horizontal components of Arias intensity (AI) and cumulative absolute velocity (CAV) using the NGA-West2 database. Earthquake Spectra, 35(3), 1289-1310.

@ftbernales
Copy link
Contributor

$$ \phi = \sqrt{\phi_{\ln(Y_B)}^2 + \phi_{\ln(AF)}^2 + \alpha^2 \phi_{\ln(\text{PGA}B)}^2 + 2\alpha\rho{\ln(\text{PGA},\ln(Y))} \phi_{\ln(Y_B)} \phi_{\ln(\text{PGA}_B)}} $$

$\phi$ equation in CB14:
$$\phi = \sqrt{ \phi_{\ln(Y_{B})}^2 + \phi_{\ln(AF)}^2 + \alpha^{2}\phi_{\ln(PGA_{B})}^2 + 2\alpha\rho_{\ln(PGA),\ln(Y)}\phi_{\ln(Y_{B})}\phi_{\ln(PGA_{B})} }$$

$\phi$ equation in CB19 spreadsheet:
$$\phi = \sqrt{ \phi_{\ln(Y)}^2 + \alpha^{2}\phi_{\ln(PGA)}^2 + 2\alpha\rho_{\ln(PGA),\ln(Y)}\phi_{\ln(Y)}\phi_{\ln(PGA)} }$$

@micheles micheles requested a review from mmpagani March 22, 2024 07:29
@micheles micheles added this to the Engine 3.20.0 milestone Mar 22, 2024
…low and high Q. open issue: ia and cav were computed from geom-mean instead of RotD50 from cb19. should i spearate the code for RotD50 for other imts in cb19?
@micheles
Copy link
Contributor

Notice that we have strict conventions on the naming of the modules, this is why you get the error

RuntimeError: /home/runner/work/oq-engine/oq-engine/openquake/hazardlib/gsim/campbell_bozorgnia_2019_IA_CAV.py is not lowercase!

You need to change the name of the module to campbell_bozorgnia_2019_ia_cav.py

@micheles
Copy link
Contributor

Now you have an error /doc/api-reference/openquake.hazardlib.gsim.rst: campbell_bozorgnia_2019_ia_cav.py is not documented. The solution is to update the file /doc/api-reference/openquake.hazardlib.gsim.rst

@emabcede30 emabcede30 marked this pull request as ready for review April 12, 2024 09:53
@emabcede30 emabcede30 marked this pull request as draft April 12, 2024 10:56
@emthompson-usgs
Copy link

Hi @emabcede30, @kslytherin has been working on an implementation of this also. It is unfortunate that we've duplicated effort a bit. One difference is that he added the new metrics within the existing CB14 module rather than creating a new one for these metrics, as discussed here.

@mmpagani @micheles Any thoughts on how we should proceed? We can abandon our implementation if the approach in this merge request is fine.

@emabcede30 emabcede30 marked this pull request as ready for review May 11, 2024 12:26
@kslytherin
Copy link

I have issue with calc of phi for total aleatory stddev. I want to know which is the correct formula for phi.

phi equation in CB14:

phi equation in CB19 spreadsheet:

spreadsheet in cb19: https://journals.sagepub.com/doi/suppl/10.1193/090818EQS212M/suppl_file/10_eeri_35_3_suppl_es1_online.xlsx

spreadheet in cb14: https://journals.sagepub.com/doi/suppl/10.1193/100614EQS151M/suppl_file/14_eeri_32_2_suppl1_es1-es1_online.xlsx

Reference:

Bozorgnia, Y., & Campbell, K. W. (2016). Ground motion model for the vertical-to-horizontal (V/H) ratios of PGA, PGV, and response spectra. Earthquake Spectra, 32(2), 951-978.

Campbell, K. W., & Bozorgnia, Y. (2014). NGA-West2 ground motion model for the average horizontal components of PGA, PGV, and 5% damped linear acceleration response spectra. Earthquake Spectra, 30(3), 1087-1115.

Campbell, K. W., & Bozorgnia, Y. (2019). Ground motion models for the horizontal components of Arias intensity (AI) and cumulative absolute velocity (CAV) using the NGA-West2 database. Earthquake Spectra, 35(3), 1289-1310.

@emabcede30 I have emailed Yousef Bozorgnia on the phi discrepency. He has informed Kenneth Campbell on the issue and I am currently waiting for a response.

@mmpagani
Copy link
Member

Thank you for this work and sorry for the late comment. As suggested by @emthompson-usgs I would find it more useful for the user to have these intensity measures (IMTs) added to the original model rather than into a separate GMM implementation. The advantage is that in a single hazard analysis, the user can compute hazard for the already-supported IMTs and the new ones you are currently adding. We are keen to help with the refactoring. Maybe you can also leverage from the draft implementation from Eric.

@ftbernales
Copy link
Contributor

ftbernales commented May 22, 2024

Hi, @emthompson-usgs. Thanks for the heads up. The reason for this approach in implementation by my colleague @emabcede30 is the difference in the cross-correlation coefficient $\rho_{\ln(PGA),\ln(Y)}$ between CB14 and CB19 (you can verify this by simply comparing the "HOR_Coeffs" sheets in their respective supplementary Excel files). Even though the median estimates stay the same, the inter-event standard deviations $\phi$ are different between CB14 and CB19. In relation to this, we actually thought of including the updated CB19 GSIM for RotD50 PGA & Sa in this PR as well; fortunately, this discussion has been already brought up.

Regardless, thanks @kslytherin for reaching out to the GMM developers directly. I think their response will bring more clarity to our final direction.

I would like to request for further advice, @mmpagani @micheles, given these additional considerations/constraints. Thanks!

@emthompson-usgs
Copy link

Unfortunately, @kslytherin is out of the office and won't be back for a while. I will point out that his draft changes to the CB14 model are on a branch on his fork of the repo here:
https://github.com/kslytherin/oq-engine/blob/new-models/openquake/hazardlib/gsim/campbell_bozorgnia_2014.py

@ftbernales I see what you mean about rho. For the 2019 model, it is a function of magnitude, and in 2014 it is just a constant. If I'm not mistake, the CampbellBozorgnia2019_IA_CAV implementation in this PR inherits from the GMPE class and so it isn't taking advantage of the code that could be re-used. We could have a 2019 class that at least inherits from the 2014 class and only changes the method for computing rho. This seems like a better design to me, but I'm less familiar with the full implications for the hazard calculations so I defer to @mmpagani.

@mmpagani
Copy link
Member

Dear Francis, Eric and Enrico thanks for your comments (@ftbernales @emthompson-usgs @emabcede30).

I downloaded the implementation of @kslytherin and the one of @emabcede30 and compared the two. Indeed the differences between the implementations (and the current CB14 implementation) are minor apart from a few details.

Some notes below:

To complete the implementation, I suggest using the current implementation of CB14 without creating a new class.

if imt.string in ['CAV', 'IA']:
   .... compute phi as in CB19
else:
   .... compute phi as before
  • Update coeff tables
  • Use the verification tables and tests for the new IMTs as already prepared by @emabcede30 and @ftbernales

... I hope I got everything with this. I will be glad to examine it further otherwise. Many thanks again. Marco

@micheles micheles modified the milestones: Engine 3.20.0, Engine 3.21.0 Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants