oq-engine
oq-engine copied to clipboard
IMPACT: improve rupture conversion, both from ShakeMap fault rupture and from finite-fault model
Supersedes https://github.com/gem/oq-engine/pull/10668
The workflow Use finite rupture from the USGS was replaced by two different options:
- Use ShakeMap fault rupture from the USGS (similar to the one that was replaced, but using Anirudh's code to make it possible to convert a wider set of ruptures from the USGS json format)
- Use finite-fault model from the USGS (using Anirudh's code to convert the rupture from the finite-fault model associated to the given usgs_id)
I also added a check to identify cases in which the input data indicate that the hypocenter coordinates are outside the surface of the rupture. In those cases a warning is logged and presented to the user in the WebUI, and the hypocenter is relocated to the center of the surface of the rupture.
I made a number of little fixes and refactoring, so perhaps it would be good to let the Risk team test this branch on the impact-staging machine before merging it into master.