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
  • !34

Set explicit maximum distance for OQ ContextMaker

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Graeme Weatherill requested to merge gweather/shakyground2:bug/shakemap_31032022 into master Mar 31, 2022
  • Overview 0
  • Commits 1
  • Pipelines 1
  • Changes 5

Fixes problem of different number of sites input into GMM than expected (as mentioned in the thread here: #25)

Recent changes in OpenQuake meant that a default maximum distance of 1000 km for the ContextMaker calculations has been introduced when the maximum_distances is not specified in the OQ mock config dictionary. For some larger earthquakes the points in the SiteModel at the edge of the bounding box were being filtered out and only those within the maximum distance retained. As the pre-allocated array size for the shakemaps is based on the SiteModel size, this meant that ground motions were being calculated at fewer sites than expected; hence the array size mismatch.

This MR sets an explicit maximum distance of 10,000 km for the ContextMaker, which should avoid the problem for all conceivable earthquake magnitudes.

A couple of minor edits were added to remove some warnings regarding deprecated numpy datatype usage (e.g. np.float, np.bool etc), and a black fix.

Edited Mar 31, 2022 by Graeme Weatherill
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: bug/shakemap_31032022