shakyground2 issueshttps://git.gfz-potsdam.de/shakemap/shakyground2/-/issues2022-03-31T15:36:36+02:00https://git.gfz-potsdam.de/shakemap/shakyground2/-/issues/25Revise Shakemap objects in line with OpenQuake GMM API changes2022-03-31T15:36:36+02:00Graeme WeatherillRevise Shakemap objects in line with OpenQuake GMM API changesFor the first time in a decade the OpenQuake Ground Motion Model library is undergoing a major refactoring (explanation here: https://github.com/gem/oq-engine/blob/master/doc/breaking-hazardlib.md). This impacts on how the ground motion ...For the first time in a decade the OpenQuake Ground Motion Model library is undergoing a major refactoring (explanation here: https://github.com/gem/oq-engine/blob/master/doc/breaking-hazardlib.md). This impacts on how the ground motion models are called inside of the Shakemap calculation, and though some effort has been made to maintain backward compatibility it has not been entirely possible to do so and it would be better to transition to the new GMM API sooner rather than later.
The preferred way to call the GMPEs is via the `.get_mean_stds` function of the `openquake.hazardlib.contexts.ContextMaker` class. This class is already used in `Shakemap` to retrieve the rupture, distance and site attributes that are needed for the GMMs themselves. The change would be to migrate the rest of the steps of the call to the GMPE into the same framework.Graeme WeatherillGraeme Weatherill