Skip to content

Set explicit maximum distance for OQ ContextMaker

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 by Graeme Weatherill

Merge request reports

Loading