-
Notifications
You must be signed in to change notification settings - Fork 280
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
Add Attenuation Model of Campbell Bozorgnia 2003 For All Conditions #10114
base: master
Are you sure you want to change the base?
Conversation
The attenuation model developed by Campbell_Bozorgnia (2003) is added to perform the calculations for all conditions (soil types, ...) and for both horizontal and vertical components.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this contribution. Overall the PR looks good to me. There are some functions that are receptions of function already implemented in campbell_bozorgnia_2003.py
best would be to import rather that duplicating them.
C['c8'] * mag + C['c9'] * (8.5 - mag) ** 2) * g) ** 2 | ||
|
||
def _get_site_type_dummy_variables(vs30): | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pls remove this space
return C['c1'] + f1 + C['c4'] * np.log(np.sqrt(f2)) + f3 + f4 + f5 | ||
|
||
|
||
def _compute_magnitude_scaling(C, mag): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function seems a repetition of https://github.com/gem/oq-engine/blob/master/openquake/hazardlib/gsim/campbell_bozorgnia_2003.py#L41 Another possibility would have been to import this function rather than repeating it
sfr[idx] = 1.0 | ||
return svfs, ssr ,sfr | ||
|
||
def _compute_faulting_mechanism(C, rake, dip): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as a previous comment https://github.com/gem/oq-engine/blob/master/openquake/hazardlib/gsim/campbell_bozorgnia_2003.py#L61
The attenuation model developed by Campbell_Bozorgnia (2003) is added to perform the calculations for all conditions (soil types, ...) and for both horizontal and vertical components.
The changes made are:
1- A gsim library of "campbell_bozorgnia_2003_world" is added to openquake\hazardlib\gsim
2- A test file of "campbell_bozorgnia_2003_world_test" is added to openquake\hazardlib\tests\gsim
3- The verification tables of "campbell_bozorgnia_2003_world" is added to openquake\hazardlib\tests\gsim\data\CB03_W.
4- The "openquake.hazardlib.gsim.rst" file is modified so that it includes "campbell_bozorgnia_2003_world".