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
Dynamic Exposure
Global Dynamic Exposure
losscalculator
Commits
445d4bd9
Commit
445d4bd9
authored
Dec 02, 2021
by
Marius Kriegerowski
Browse files
add maintainer
parent
527ac864
Pipeline
#35580
failed with stage
in 1 minute and 43 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Dockerfile
View file @
445d4bd9
FROM
python:3.9
LABEL
maintainer="marius.kriegerowski@gfz-potsdam.de"
WORKDIR
/usr/src/loss-calculator
RUN
apt-get clean
&&
apt-get
-y
update
&&
apt-get
install
-y
libgdal-dev
...
...
examples/example_cell/run_example_cell.sh
View file @
445d4bd9
...
...
@@ -3,4 +3,4 @@ t='data/taxonomy_mapping.csv'
e
=
'data/exposure.csv'
g
=
'data/ground_motion_values.csv'
m
=
'data/intensity_measure_map.csv'
python3 ../../
losscalculator
/
damage
_calculator.py
-f
$f
-m
$m
-g
$g
-e
$e
-t
$t
-
o
losscalculator
damage
-f
$f
-m
$m
-g
$g
-e
$e
-t
$t
-
w
losscalculator/api.py
View file @
445d4bd9
...
...
@@ -33,10 +33,11 @@ class ShakemapiService:
def
request_shakemap_data
(
self
,
event_quakeml
:
str
)
->
GMField
:
"""Retrieve shakemap data from shakemap webservice"""
print
(
"requesting shakemap"
)
print
(
"requesting shakemap
at
"
)
responses
=
{}
for
imt
in
self
.
_im_types
:
shakemap_url
=
f
"
{
SHAKEMAP_HOSTNAME
}
/shakemap?imt=
{
imt
}
&gmpe=
{
self
.
gmpe
}
"
print
(
f
"url:
{
shakemap_url
}
"
)
r
=
requests
.
post
(
shakemap_url
,
data
=
event_quakeml
,
headers
=
{
'Content-Type'
:
'application/text'
})
responses
[
imt
]
=
r
.
json
()
...
...
Write
Preview
Markdown
is supported
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