A uniform hazard spectrum gives the spectral acceleration over a range of periods, all with the same probability of exceedance within a given time span. Uniform hazard spectra are available through the EFEHR REST API under the base URL https://efehr-services.ethz.ch/hazard/api/v1. All endpoints use HTTP GET and return JSON by default; add format=nrml to receive NRML instead. Data are published under CC BY 4.0 (DOI 10.12686/a15).
The steps below find the models providing spectra at your site, narrow down the available options (intensity measure type, probability of exceedance, soil type, aggregation) and then retrieve the spectrum. The examples use Basel (47.5° N, 7.6° E) and the European Seismic Hazard Model 2020 (ESHM20, model id 81), with an annual probability of exceedance of 0.002103 (equivalent to 10% in 50 years). Long lists in the response examples are shortened with "…". The complete, interactive reference is available at efehr-services.ethz.ch/hazard/api/docs.
| User query | Which hazard models provide uniform hazard spectra for the site of my interest? |
|---|---|
| Request format | /v1/spectra/models?lat=[latitude]&lon=[longitude] |
| Parameters |
|
| Request example | https://efehr-services.ethz.ch/hazard/api/v1/spectra/models?lat=47.5&lon=7.6 |
| Response example |
{
"models": [
{
"id": 77,
"name": "Swiss Hazard Model 2015 (SUIhaz15)"
},
{
"id": 81,
"name": "European Seismic hazard Model 2020 (ESHM20)"
}
],
"count": 2
}
|
| User query | For which intensity measure types (IMT) are response spectra available from a selected model at my site of interest? Spectra are typically provided for spectral acceleration (SA). |
|---|---|
| Request format | /v1/spectra/imts?lat=[latitude]&lon=[longitude]&modelid=[modelid] |
| Parameters |
|
| Request example | https://efehr-services.ethz.ch/hazard/api/v1/spectra/imts?lat=47.5&lon=7.6&modelid=81 |
| Response example |
{
"imts": [
{
"code": "SA",
"name": "SA",
"unit_type": "g",
"unit_description": "gravity, 1g = 980.5 cm/s/s"
}
]
}
|
| User query | For which probabilities of exceedance and time spans are response spectra available from a selected model and IMT at my site of interest? ESHM20 provides annual probabilities, which correspond to the usual 50-year values: 0.00019999 (1% in 50 years, return period about 5000 years), 0.000399999 (2%, about 2500 years), 0.0010249 (5%, about 975 years), 0.002103 (10%, about 475 years), 0.00989 (39%, about 100 years) and 0.02 (63%, about 50 years). |
|---|---|
| Request format | /v1/spectra/poe?lat=[latitude]&lon=[longitude]&modelid=[modelid]&imt=[IMT] |
| Parameters |
|
| Request example | https://efehr-services.ethz.ch/hazard/api/v1/spectra/poe?lat=47.5&lon=7.6&modelid=81&imt=SA |
| Response example |
{
"poe_values": [
{
"probability": 0.00019999,
"years": 1
},
{
"probability": 0.000399999,
"years": 1
},
{
"probability": 0.0010249,
"years": 1
},
{
"probability": 0.002103,
"years": 1
},
{
"probability": 0.00989,
"years": 1
},
{
"probability": 0.02,
"years": 1
}
]
}
|
| User query | For which soil classes or surface geology conditions are uniform hazard spectra available from the model of my interest, for the selected IMT and probability of exceedance, at my site of interest? |
|---|---|
| Request format | /v1/spectra/soiltypes?lat=[latitude]&lon=[longitude]&modelid=[modelid]&imt=[IMT]&poe=[poe]×pan=[years] |
| Parameters |
|
| Request example | https://efehr-services.ethz.ch/hazard/api/v1/spectra/soiltypes?lat=47.5&lon=7.6&modelid=81&imt=SA&poe=0.002103×pan=1 |
| Response example |
{
"soil_types": [
{
"code": "rock_vs30_800ms-1",
"name": "rock_vs30_800ms-1"
}
]
}
|
| User query | Given a model, an IMT, a probability of exceedance and a soil type, how was the uniform hazard spectrum of a multi-branch logic tree model aggregated? Answers are the arithmetic mean or quantiles (ordinal aggregation with levels from 0 to 1). |
|---|---|
| Request format | /v1/spectra/fractiles?lat=[latitude]&lon=[longitude]&modelid=[modelid]&imt=[IMT]&poe=[poe]×pan=[years]&soiltype=[soiltype] |
| Parameters |
|
| Request example | https://efehr-services.ethz.ch/hazard/api/v1/spectra/fractiles?lat=47.5&lon=7.6&modelid=81&imt=SA&poe=0.002103×pan=1&soiltype=rock_vs30_800ms-1 |
| Response example |
{
"fractiles": [
{
"aggregation_type": "arithmetic",
"aggregation_level": 0.5
},
{
"aggregation_type": "ordinal",
"aggregation_level": 0.05
},
{
"aggregation_type": "ordinal",
"aggregation_level": 0.16
},
{
"aggregation_type": "ordinal",
"aggregation_level": 0.5
},
{
"aggregation_type": "ordinal",
"aggregation_level": 0.84
},
{
"aggregation_type": "ordinal",
"aggregation_level": 0.95
}
]
}
|
| User query | Given all previously selected parameters, what is the uniform hazard spectrum at my site of interest? |
|---|---|
| Request format | /v1/spectra?lat=[latitude]&lon=[longitude]&modelid=[modelid]&imt=[IMT]&poe=[poe]×pan=[years]&soiltype=[soiltype]&aggregationtype=[arithmetic | ordinal]&aggregationlevel=[0…1] |
| Parameters |
|
| Request example | https://efehr-services.ethz.ch/hazard/api/v1/spectra?lat=47.5&lon=7.6&modelid=81&imt=SA&poe=0.002103×pan=1&soiltype=rock_vs30_800ms-1&aggregationtype=ordinal&aggregationlevel=0.16 |
| Response example |
{
"spectra": [
{
"lon": 7.5821339,
"lat": 47.5,
"model_id": 81,
"model_name": "European Seismic hazard Model 2020 (ESHM20)",
"imt": "SA",
"poe": 0.002103,
"timespan": 1,
"soil_type": "rock_vs30_800ms-1",
"aggregation_type": "ordinal",
"aggregation_level": 0.16,
"damping": null,
"points": [
{
"period": 0.0,
"acceleration": 0.040773556
},
{
"period": 0.05,
"acceleration": 0.056854393
},
{
"period": 0.1,
"acceleration": 0.08881868
},
{
"period": 0.15,
"acceleration": 0.10227363
},
{
"period": 0.2,
"acceleration": 0.1016133
},
{
"period": 0.25,
"acceleration": 0.092453286
},
{
"period": 0.3,
"acceleration": 0.08032928
},
{
"period": 0.35,
"acceleration": 0.070245504
},
{
"period": 0.4,
"acceleration": 0.0620625
},
{
"period": 0.5,
"acceleration": 0.049622025
},
{
"period": 0.6,
"acceleration": 0.041263234
},
{
"period": 0.75,
"acceleration": 0.031814687
},
{
"period": 1.0,
"acceleration": 0.023731295
},
{
"period": 2.0,
"acceleration": 0.009335869
},
{
"period": 3.0,
"acceleration": 0.0052169817
},
{
"period": 4.0,
"acceleration": 0.0034016648
},
{
"period": 5.0,
"acceleration": 0.0028997352
}
]
}
],
"metadata": {
"source": "EFEHR Services FastAPI",
"timestamp": null
}
}
|