Commit bf7ede6e authored by g-weatherill's avatar g-weatherill
Browse files

Small edit to adapt to OQ changes, fixes broken quakeml test

parent 27c09a3c
Pipeline #28590 passed with stage
in 15 minutes and 47 seconds
......@@ -124,7 +124,9 @@ class Shakemap(object):
ground motion models
"""
cmaker = ContextMaker(
self.tectonic_region, [gmm[1] for gmm in self.ground_motion_model]
self.tectonic_region,
[gmm[1] for gmm in self.ground_motion_model],
param={"imtls": {"PGA": []}}, # param is a dummy object to mock an OQ config
)
# Always calculate rupture distance regardless of whether it is needed by the GMM
if "rrup" not in cmaker.REQUIRES_DISTANCES: # pylint: disable=no-member
......@@ -372,12 +374,12 @@ class Shakemap(object):
"crs": "+proj=latlong",
# As we create a lot of those geotiff files in the earthquake event explorer
# and want to store them on a map server, we want to make sure that the resulting
# geotiffs are small.
# That is why the we want to use a compression algorithm with some more custom options.
# The deflate algorithm is a loss less algorithm that is also used for the zip format.
# It features level and predictor arguments.
# geotiffs are small. That is why the we want to use a compression algorithm with
# some more custom options. The deflate algorithm is a loss less algorithm that is
# also used for the zip format. It features level and predictor arguments.
# The chosen level is the maximum of 9, so that our files are small.
# The predictor is 3 to work better with floating point numbers (which the shakemaps are).
# The predictor is 3 to work better with floating point numbers (which the
# shakemaps are).
"compress": "deflate",
"zlevel": 9,
"predictor": 3,
......
......@@ -215,7 +215,7 @@ class EarthquakeTestCase(unittest.TestCase):
target_string_set = [
"gfz2021kdvq 2021-05-25 09:41:17.200000 (29.35200E, -1.74600N, 10.00 km) M 4.39",
"gfz2021keus 2021-05-25 22:21:36.400000 (122.49800E, 24.83200N, 10.00 km) M 4.56",
"gfz2021kduj 2021-05-25 09:03:03.393825 (29.48394E, -1.78596N, 10.00 km) M 4.59",
"gfz2021kduj 2021-05-25 09:03:03.390000 (29.48400E, -1.78600N, 10.00 km) M 4.59",
]
results = []
for event_id in event_id_set:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment