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

added volc_arc_file to mgmpe check params #341

Merged
merged 2 commits into from
Aug 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion openquake/smt/comparison/utils_gmpes.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ def mgmpe_check(gmpe):
inputs = pd.Series(str(gmpe).splitlines()[1:], dtype = 'object')
add_inputs = {}
add_as_int = ['eshm20_region']
add_as_str = ['region', 'gmpe_table']
add_as_str = ['region', 'gmpe_table', 'volc_arc_file']

if len(inputs) > 0: # If greater than 0 must add required gsim inputs
idx_to_drop = []
Expand Down
5 changes: 4 additions & 1 deletion openquake/smt/residuals/gmpe_residuals.py
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,10 @@ def get_residuals(self, ctx_database, nodal_plane_index=1,
# Contexts is in either case a list of dictionaries
self.contexts = []
for context in contexts:

# If no rvolc provide as zero (ensure rvolc gsims usable)
if 'rvolc' not in context['Ctx']._slots_:
context['Ctx'].rvolc = np.zeros_like(context['Ctx'].repi,
dtype = float)
# convert all IMTS with acceleration units, which are supposed to
# be in cm/s/s, to g:
for a_imt in accel_imts:
Expand Down
Loading