Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • S shakyground2
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 11
    • Issues 11
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 1
    • Merge requests 1
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Shakemap
  • shakyground2
  • Merge requests
  • !13

Implements classes to handle Regionalization and assignment of ground motion models

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Graeme Weatherill requested to merge gweather/shakyground2:feature/regionalisation_v1 into master Mar 15, 2021
  • Overview 3
  • Commits 16
  • Pipelines 8
  • Changes 20

For shakemap applications a set of ground motion models (and their corresponding weights) needs to be defined for each earthquake. Though these can be defined manually, it also desirable to define a Regionalization, i.e. a set of geographical regions each with their own associated set of ground motion models. This is explained in #7 (closed)

This MR implements two classes for handling regionalizations at any scale:

  1. A Regionalization class, that loads and stores a given regionalisation and can, for a given earthquake, apply the geographical selection procedure to identify the region to which the earthquake is associated and its corresponding ground motion models.

  2. A RegionalizationSet class, that manages multiple regionalizations, the order of which defines their own hierarchy. For example, a different regionalization may be required for A) a country, B) a continent (the spatial domain of which may include part or all of the country A), and C) a global scale regionalization. The order in which the Regionalization objects are input into the RegionalizationSet defines the hierarchy, e.g. if the three regionalizations are input in the order A B C then regionalization A will be applied if the earthquake falls within its domain, then B or C otherwise. If the order were reversed (C B A) then the global regionalization (C) would be applied in favour of the local regionalizations (A or B).

The geographical regions are managed within the Regionalization class as a GeoPandas GeoDataFrame, which must include the attributes id, REGION, LOWER DEPTH, UPPER DEPTH and geometry. The ground motion model mapping is manages as a dictionary, the structure of which reflects the json definition explained in #7 (closed).

A classmethod is include in both Regionalization and RegionalizationSet that allows the user to define the regionalization in the form of a GeoJSON, and the corresponding ground motion model mapping as a standard json. If a region type is found in the GeoJSON for which the ground motion model mapping is not defined in then an error is raised. A set of files defining the "standard GFZ" ground motion model is also included, though further edits to these may be made in future merge requests.

For the geometry configurations tested so far, a reasonable amount of speed is gained by using Rtree for spatial indexing in order to determine the polygon in which the earthquake falls. This dependency is added to the setup.py file.

Edited Mar 16, 2021 by Graeme Weatherill
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: feature/regionalisation_v1