Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Riccardo Zaccarelli
shakyground2
Commits
bf7ede6e
Commit
bf7ede6e
authored
Oct 04, 2021
by
g-weatherill
Browse files
Small edit to adapt to OQ changes, fixes broken quakeml test
parent
27c09a3c
Pipeline
#28649
failed with stage
in 0 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
shakyground2/shakemap.py
View file @
bf7ede6e
...
...
@@ -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
,
...
...
tests/earthquake_test.py
View file @
bf7ede6e
...
...
@@ -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.39
3825
(29.48
394
E, -1.78
596
N, 10.00 km) M 4.59"
,
"gfz2021kduj 2021-05-25 09:03:03.39
0000
(29.48
400
E, -1.78
600
N, 10.00 km) M 4.59"
,
]
results
=
[]
for
event_id
in
event_id_set
:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment