Though the shakyground2 library itself is intended to be modular, specific workflows that chain together the features in order to address a particular use case can make the library easier to call. A
workflows.py module is added to begin to support such cases, and this MR in particular addresses the Earth Explorer (GEOFON) shakemap application. Here the workflow: i) creates the
Earthquake class from the GEOFON FDSNWS (via the event ID) or local QuakeML, ii) builds the site model from bounding box centered on the event location, iii) retrieves the appropriate ground motion model from the regionalisation, iv) runs the shakemap calculations, v) exports the shakemap rasters to byte objects and the corresponding contours to GeoDataFrames
The entire workflow is run via the function:
geofon_workflow(event_id, imts), where
event_id is the GEOFON event ID and
imts a list of intensity measure types (e.g.
["PGA", "SA(0.2)", "SA(1.0)"]).
There are several configurable options in the different steps of the workflow and these can be set via an optional
config input. If these are not defined (or only partially defined) then a default set of configuration properties are included in the